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

# Get documents

Use the [`get()`](/sdk/topk-py#get) method to retrieve documents by their `_id`.

`get()` provides direct key-based lookup, similar to a key-value store.
This operation is optimized for **high throughput** and **low latency**.

<CodeGroup>
  ```python Python theme={null}
  docs = client.collection("books").get(["lotr", "moby"])
  ```

  ```typescript Javascript theme={null}
  const docs = await client.collection("books").get(["lotr", "moby"]);
  ```
</CodeGroup>

The result is a key-value mapping: each key is a document ID and each value is a full document as it was upserted into the collection.

<CodeGroup>
  ```python Python theme={null}
  # Example response
  {
  	"lotr": {
  		"_id": "lotr",
  		"title": "The Lord of the Rings",
  		"author": "J.R.R. Tolkien",
  		"published_year": 1954
  	},
  	"moby": {
  		"_id": "moby",
  		"title": "Moby Dick",
  		"author": "Herman Melville",
  		"published_year": 1851
  	}
  }
  ```

  ```typescript Javascript theme={null}
  // Example response
  {
  	lotr: {
  	_id: "lotr",
  		title: "The Lord of the Rings",
  		author: "J.R.R. Tolkien",
  		published_year: 1954
  	},
  	moby: {
  	_id: "moby",
  		title: "Moby Dick",
  		author: "Herman Melville",
  		published_year: 1851
  	}
  }
  ```
</CodeGroup>

<Warning>
  If a document with a given ID does not exist in the collection, it is simply
  omitted from the results - no error is thrown.
</Warning>
