Skip to main content
POST
Search documentation, code and symbols

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-GitHits-Client-Name
string

Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Client-Version
string

Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Agent
string

Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.

X-GitHits-Session-ID
string

Optional session attribution: trimmed printable ASCII, at most 128 bytes. Invalid optional values are dropped; no session is created.

Query Parameters

fields
string
default:results

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.

Maximum string length: 2048

Body

application/json

Strict initial search input; selectors are parsed by HTTP before execution.

query
string
required

Nonblank query, trimmed once. Qualifiers and boolean/phrase syntax are parsed upstream.

Minimum string length: 1
targets
object[]
required

One through twenty structured targets. Exact normalized duplicates are removed.

Required array length: 1 - 20 elements

Exactly one addressing mode; unrelated keys, including null keys, are rejected.

allow_partial_results
boolean
default:false

Permit a served subset of runnable pairs; false keeps runnable-pair atomicity even during background refresh.

filters
null | object

Omission/null means no structured filters. Use upstream name:/lang [blocked]: query qualifiers for those capabilities.

limit
integer<int32>
default:10

Result page cap, 1..100. This does not bound all upstream preparation work.

Required range: 1 <= x <= 100
offset
integer<int32>
default:0

Nonnegative offset. A later page requires a fresh initial search.

Required range: 0 <= x <= 2147483647
sources
enum<string>[] | null

Omission/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.

Available options:
docs,
code,
symbol
wait_timeout_ms
integer<int32>
default:20000

One upstream wait, 0..60000 ms; total transport deadline also includes configured request budget.

Required range: 0 <= x <= 60000

Response

Source-qualified immediate, interim or terminal observation

One canonical source observation; a reference does not imply active work.

completed
boolean
required

Source POST completion flag; GET is true exactly for completed status. Other terminal statuses remain false.

expires_at
string | null
required

Source expiration timestamp, not a gateway retention guarantee or exact 410 boundary.

query_warnings
string[]
required

Parser warnings from the result or inline progress, never inferred from query text.

result
null | object
required

Latest complete page; null when results is unselected or no page is available. Inspect selected_fields.

search_ref
string | null
required

Effective-user-owned opaque reference; null for an immediate unreferenced result.

selected_fields
enum<string>[]
required

Canonical expanded selected groups in stable order; disambiguates unselected result:null.

Atomic evidence groups, independent of the transport protocol.

Available options:
results,
results.highlights,
sources,
progress
status
null | enum<string>
required

Explicit source session state, null when the initial operation supplies none.

Available options:
pending,
indexing,
searching,
completed,
deferred,
timeout,
failed
targets
object[] | null
required

Concise readiness/provenance supplied by inline progress; null when absent.

progress
null | object

Omitted when unselected; null when selected without inline progress.

sources
null | object

Omitted when unselected; null when selected without a source snapshot.