Skip to main content
POST
/
api
/
v2
/
tenants
/
{tenant}
/
databases
/
{database}
/
collections
/
{collection_id}
/
get
Retrieves records from a collection by ID or metadata filter.
curl --request POST \
  --url https://api.trychroma.com/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/get \
  --header 'Content-Type: application/json' \
  --header 'x-chroma-token: <api-key>' \
  --data '
{
  "where": "<unknown>",
  "where_document": "<unknown>",
  "ids": [
    "<string>"
  ],
  "include": [
    "distances"
  ],
  "limit": 1,
  "offset": 1
}
'
{
  "ids": [
    "<string>"
  ],
  "include": [
    "distances"
  ],
  "documents": [
    "<string>"
  ],
  "embeddings": [
    [
      123
    ]
  ],
  "metadatas": [
    "<unknown>"
  ],
  "uris": [
    "<string>"
  ]
}

Authorizations

x-chroma-token
string
header
required

Path Parameters

tenant
string
required

Tenant ID

database
string
required

Database name for the collection

collection_id
string
required

Collection ID to fetch records from

Body

application/json
where
any
where_document
any
ids
string[] | null
include
enum<string>[]
Available options:
distances,
documents,
embeddings,
metadatas,
uris
limit
integer<int32> | null
Required range: x >= 0
offset
integer<int32> | null
Required range: x >= 0

Response

Records retrieved from the collection

ids
string[]
required
include
enum<string>[]
required
Available options:
distances,
documents,
embeddings,
metadatas,
uris
documents
(string | null)[] | null
embeddings
number<float>[][] | null
metadatas
(null | object)[] | null
uris
(string | null)[] | null