POST
/vector_stores/{vector_store_id}/searchSearch a vector store
Searches a vector store for file content relevant to one or more queries. Supply query and optionally limit results, rewrite the query, filter by file attributes, or configure ranking. Use next_page from the response to retrieve additional results when has_more is true.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
vector_store_idstringrequired
The identifier of the vector store to search.
Vector store search criteria. query is required; all other fields are optional.
querystringrequired
A query string for a search
rewrite_querybooleanoptional
Whether to rewrite the natural language query for vector search.
max_num_resultsintegeroptional
The maximum number of results to return. This number should be between 1 and 50 inclusive.
filtersobjectoptional
A filter to apply based on file attributes.
ranking_optionsobjectoptional
Ranking options for search.
200Returns a search results page containing the queries used, matching result items with file identifiers, filenames, scores, attributes, and content, plus pagination fields.
objectstringrequired
The object type, which is always `vector_store.search_results.page`
search_queryarray<string>required
dataarray<object>required
The list of search result items.
has_morebooleanrequired
Indicates if there are more results to fetch.
next_pagestringrequired
The token for the next page, if any.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired
Error handling
query is required and must be a string or a non-empty array of strings. max_num_results must be between 1 and 50, score_threshold must be between 0 and 1, and ranker must be none, auto, or default-2024-11-15. A 429 is returned when the request exceeds the rate limit.