list_vectors
Use the list vectors operation to list vector records from a vector table.
Lists vector records with their IDs, embeddings, and metadata. Supports pagination for large result sets.
Parameters
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
table_name |
str |
Valid vector table identifier | Yes | No default | Name of the vector table to read. | Table must exist in the database schema. |
ids |
list[str] |
Array of strings | No | None | Optional list of vector IDs to retrieve. Example: ['id1', 'id2', 'id3']. |
Builds an ID filter when provided. |
limit |
int or float |
> 0 | No | 15 | Maximum number of results to return. | Defaults to 15. |
offset |
int or float |
>= 0 | No | None | Number of records to skip for pagination. | Omit for the service default. |
debug_flags |
dict |
Object or NULL | No | None | Debug or tracing flags for detailed logging. | Optional; omit unless diagnostics are needed. |
Raises InvalidTableNameFormatError is raised when the table name is invalid.
Get specific vectors by ID
vectors = client.list_vectors(
table_name='products',
ids=['prod_1', 'prod_2', 'prod_3']
)
Paginate through results (First 10 results)
page1 = client.list_vectors(
table_name='products',
limit=10,
offset=0
)
Next 10 results
page2 = client.list_vectors(
table_name='products',
limit=10,
offset=10
)
Return type VectorCollectionResponse
Returns JSON response containing matching vectors.
Example response:
{
"items": [
{
"id": "prod_010",
"dense_vector": [0.21, 0.19, 0.24, 0.47, 0.40],
"metadata": {
"name": "Halo Headphones",
"category": "electronics",
"price": 199.0,
"color": "onyx"
}
},
{
"id": "prod_003",
"dense_vector": [0.08, 0.25, 0.34, 0.41, 0.50],
"metadata": {
"name": "Zephyr Running Tee",
"category": "apparel",
"price": 39.95,
"color": "light grey"
}
}
],
"limit": 15,
"offset": 0,
"count": 10
}