Vector Operations
Fetch records by metadata
Look up and return records by metadata from a single namespace. The returned records include the vector data and metadata. For guidance and examples, see Fetch data.
post/vectors/fetch_by_metadata
Headers
X-Pinecone-Api-Versionstring required
Required date-based version header
Request body
Example request
{
"namespace": "example-namespace",
"filter": {
"genre": {
"$in": [
"comedy",
"documentary",
"drama"
]
},
"year": {
"$eq": 2019
}
},
"limit": 12,
"paginationToken": "Tm90aGluZyB0byBzZWUgaGVyZQo="
}Response
A successful response.
Example response
{
"namespace": "example-namespace",
"pagination": {
"next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
},
"usage": {
"readUnits": 5
},
"vectors": {
"id-1": {
"id": "id-1",
"metadata": {
"genre": "documentary",
"year": 2019
},
"values": [
1,
1.5
]
},
"id-2": {
"id": "id-2",
"metadata": {
"genre": "comedy",
"year": 2019
},
"values": [
2,
1
]
}
}
}