Skip to main content
POST

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:details,availability

Comma-separated details, availability, ranking. Omission defaults to details,availability; explicit selection replaces defaults.

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

A name to resolve, with optional ranking preferences.

name
string
required

Nonblank target name or canonical target string, at most 800 raw UTF-8 bytes.

Minimum string length: 1
intent_hints
string[]

Nonempty list of nonblank hints to help rank relevant targets.

Minimum array length: 1
limit
integer<int32>
default:8

Maximum ranked candidate count; protected and related additions may exceed it.

Required range: 1 <= x <= 20
preferred_kind
enum<string>

Preferred target kind. Influences ranking without excluding other kinds.

Available options:
package,
repository,
site
query
string

Task or question to help rank relevant targets.

registries
enum<string>[]

Optional nonempty ordered list of exact lowercase public registries.

Minimum array length: 1
Available options:
npm,
pypi,
hex,
crates,
vcpkg,
zig,
nuget,
maven,
packagist,
rubygems,
go,
swift

Response

Ranked direct and related canonical targets

Ranked targets with identity, ambiguity, and malicious-package evidence.

ambiguous
boolean
required

Whether the source considers the result ambiguous.

ambiguous_reason
enum<string>
required

Source-owned ambiguity reason; not_ambiguous accompanies false.

Available options:
not_ambiguous,
duplicate_exact_name,
close_candidates,
low_confidence
best
string | null
required

Canonical best target, null when no candidate is best.

protected_matches
string[]
required

Canonical protected exact-name matches in source order.

Whether bounded relation expansion omitted additional targets; direct entries are complete.

targets
object[]
required

Source-ordered direct and bounded relation-expanded targets.