Repositories and search
Search knowledge
Search many repositories you can read in one call and get ranked passages back.
POST
Searches several repositories by meaning and returns the best-matching passages across them, highest score first. The call is synchronous: results come back in the same response.
There is no single index across repositories. This endpoint searches each repository’s index, up to five at a time, and merges the passages by score. One call searches at most 20 repositories:
- With
repository_ids, it searches those, up to 20. - Without it, it searches the 20 repositories you can read that were used most recently.
searched_repository_ids lists the repositories the search covered. A repository whose index does not answer in time is left out of it rather than failing the search. To search one repository, or one folder in it, use Search repository.
Authentication
Requires an API key, or an OAuth token withrepositories:read.
Body parameters
What to look for, up to 1,000 characters. A question or a phrase both work, for example
"limitation of liability cap".Only search these repositories, from
1 to 20. Leave it out to search the 20 most recently used repositories the caller can read.Response
Returns200 with the passages and the repositories searched. There is no cursor: raise limit for more results.