New Tool Radar

Local AI

Search Locally Stored Vectors in Qdrant with curl

Query a Qdrant collection over its REST API with curl, using the modern points query endpoint, and read the ranked hits.

Schematic with three steps: Send the query; Read the ranked hits; Narrow with a filter.

Qdrant answers REST calls on port 6333, and the modern search endpoint is POST /collections/{name}/points/query. A curl call with a query vector returns the nearest points in decreasing similarity order, with their scores and payloads.

What you need

  • Qdrant running locally in Docker on port 6333
  • A collection with points already stored, such as test_collection
  • curl and jq installed

Step 1: Send the query

Run: curl -sS -X POST http://localhost:6333/collections/test_collection/points/query -H ‘Content-Type: application/json’ -d ‘{“query”: [0.2, 0.1, 0.9, 0.7], “limit”: 3, “with_payload”: true}’. The query vector must have the same dimension as the collection. With an API key set, add the header api-key: <key>.

Step 2: Read the ranked hits

The reply holds result.points, each with an id, a score, and a payload. In the cited test with four city points and a cosine collection, point 4 came first with score 0.99248314, then point 1, then point 3. Higher scores mean closer meaning with cosine distance.

Step 3: Narrow with a filter

Add a filter object to the same body, for example filter must match category index, to search only points with that payload value. The filter runs before ranking, so only matching points are scored.

Worked example: query four city vectors

The table below is a synthetic example. The endpoint, the request body, and the scores come from the cited Qdrant REST guide; the collection is its documented example.

Rank Point id Score
1 4 0.99248314
2 1 0.89463294
3 3 0.83872515

Expected result (UNTESTED). the query returns three points in decreasing score order, with point 4 first, and a filtered query returns only matching points. This check was not run live; the endpoint and scores come from the cited Qdrant REST guide.

Limits

  • The query vector dimension must match the collection size exactly.
  • The older /points/search endpoint still exists, but new code should use /points/query.
  • Payload and vector data are missing from results by default unless requested.
  • Filters on unindexed fields work at small scale but degrade into full scans as collections grow.

Sources

See all