> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyborg.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get

## Get

Retrieves, decrypts and returns items from their IDs. If an item does not exist at that ID, it will return an empty object.

```python theme={null}
def get(self,
        ids: List[str],
        include: List[str] = ["vector", "contents", "metadata"])
```

### Parameters

| Parameter | Type        | Default                            | Description                                                                                                                         |
| --------- | ----------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `ids`     | `List[str]` | -                                  | Item IDs to retrieve & decrypt                                                                                                      |
| `include` | `List[str]` | `"vector", "contents", "metadata"` | *(Optional)* List of item fields to return. Can include `vector`, `contents`, and `metadata` (`vector` only for `IVFFlat` indexes). |

### Returns

`List[Dict]`: Decrypted item fields for each item, including `id` and specified fields (e.g., `vector`, `contents`, and `metadata`).

### Exceptions

<AccordionGroup>
  <Accordion title="ValueError">
    * Throws if the item could not be retrieved or decrypted.
  </Accordion>
</AccordionGroup>

### Example Usage

```python theme={null}
# Load index
index = client.load_index(index_name=index_name, index_key=index_key)

# Retrieve the items using their IDs
items = index.get(["item_1", "item_2"])

print(items)
# Example output:
# [{"id": "item_1", "vector": [0.1, 0.2], "contents": "Example contents...", "metadata": {"type": "txt"}},
#  {"id": "item_2", "vector": [0.3, 0.4], "contents": "Example contents...", "metadata": {"type": "md"}},

# Retrieve only the item contents
items = index.get(["item_1", "item_2"], include=["contents"])
print(items)
# Example output:
# [{"id": "item_1", "contents": "Example contents..."},
#  {"id": "item_2", "contents": "Example contents..."}]
```
