Search documentation, code and symbols
Search documentation, source code, and symbols across packages, public repositories, and documentation sites. Results include matching text and source locations you can use to read the original page or file.
Use this endpoint to discover relevant documentation and implementations across projects. Searches can return while indexing or searching is still in progress; use GET /v1/searches/{search_ref} to retrieve subsequent results and status.
Selector catalogue
Use the following selectors with the fields query parameter to choose which fields the response includes. See Choose what the response includes for details.
| Selector | Data | Default |
|---|---|---|
results | Matching items, their text, relevance scores, source locations, and coverage information. | Yes |
results.highlights | Highlight locations within result titles and summaries. Also includes results. | No |
results.* | Results and highlights together. | No |
sources | Source status, applied filters, coverage, and suggested documentation sites. | No |
progress | Search request details, readiness counts, and available or suggested versions and refs. | No |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.
Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.
Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.
Optional session attribution: trimmed printable ASCII, at most 128 bytes. Invalid optional values are dropped; no session is created.
Query Parameters
Comma-separated results/results.highlights/results.*/sources/progress; default results, 2048 decoded bytes. No arbitrary leaf masks.
Use the case-sensitive selectors in the catalogue. Order and duplicate selectors do not affect the result. ASCII whitespace around selectors is ignored. The decoded value is limited to 2048 UTF-8 bytes. Empty or unknown selectors and repeated fields query parameters return 400 VALIDATION_ERROR. A group does not include nested groups unless the catalogue says so; only listed wildcard bundles are supported.
2048Body
Strict initial search input; selectors are parsed by HTTP before execution.
Nonblank query, trimmed once. Qualifiers and boolean/phrase syntax are parsed upstream.
1One through twenty structured targets. Exact normalized duplicates are removed.
1 - 20 elementsExactly one addressing mode; unrelated keys, including null keys, are rejected.
- Option 1
- Option 2
- Option 3
Permit a served subset of runnable pairs; false keeps runnable-pair atomicity even during background refresh.
Omission/null means no structured filters. Use upstream name:/lang [blocked]: query qualifiers for those capabilities.
Result page cap, 1..100. This does not bound all upstream preparation work.
1 <= x <= 100Nonnegative offset. A later page requires a fresh initial search.
0 <= x <= 2147483647Omission/null means AUTO; explicit docs/code/symbol lists must be nonempty. AUTO is not an explicit selector.
Content sources to search. Omission selects documentation and code for packages or repositories, and documentation for sites.
docs, code, symbol One upstream wait, 0..60000 ms; total transport deadline also includes configured request budget.
0 <= x <= 60000Response
Source-qualified immediate, interim or terminal observation
One canonical source observation; a reference does not imply active work.
Source POST completion flag; GET is true exactly for completed status. Other terminal statuses remain false.
Source expiration timestamp, not a gateway retention guarantee or exact 410 boundary.
Parser warnings from the result or inline progress, never inferred from query text.
Latest complete page; null when results is unselected or no page is available. Inspect selected_fields.
Effective-user-owned opaque reference; null for an immediate unreferenced result.
Canonical expanded selected groups in stable order; disambiguates unselected result:null.
Atomic evidence groups, independent of the transport protocol.
results, results.highlights, sources, progress Explicit source session state, null when the initial operation supplies none.
pending, indexing, searching, completed, deferred, timeout, failed Concise readiness/provenance supplied by inline progress; null when absent.
Omitted when unselected; null when selected without inline progress.
Omitted when unselected; null when selected without a source snapshot.