POST
/
query
curl --request POST \
     --url https://index_name-project_id.svc.environment.pinecone.io/query \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
{
  "matches": [
    {
      "id": "example-vector-1",
      "score": 0.08,
      "values": [
        0.1,
        0.2,
        0.3,
        0.4,
        0.5,
        0.6,
        0.7,
        0.8
      ],
      "sparseValues": {
        "indices": [
          1,
          312,
          822,
          14,
          980
        ],
        "values": [
          0.1,
          0.2,
          0.3,
          0.4,
          0.5
        ]
      },
      "metadata": {
        "genre": "documentary",
        "year": 2019
      }
    }
  ],
  "namespace": "<string>"
}
curl --request POST \
     --url https://index_name-project_id.svc.environment.pinecone.io/query \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours at https://app.pinecone.io/.

Body

application/json

The request for the Query operation.

Response

200
application/json

A successful response.

The response for the Query operation. These are the matches found for a particular query vector. The matches are ordered from most similar to least similar.