Resolve a target name
Find packages, repositories, and documentation sites from a name. Results include ranked matches and related projects to help you identify the project you mean.
Use this experimental endpoint when you know a project name but need its package coordinates or repository or documentation address for another GitHits request.
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 |
|---|---|---|
details | Target display_name, description, repository_url, repository_owner, repository_name, documentation_url and license. | Yes |
availability | Target docs_available, code_available, docs_page_count, code_file_count, stars, downloads_last_month and downloads_total. | Yes |
ranking | Direct-match matched_aliases, match_tier, score and name_similarity. | 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 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.
2048Body
A name to resolve, with optional ranking preferences.
Nonblank target name or canonical target string, at most 800 raw UTF-8 bytes.
1Nonempty list of nonblank hints to help rank relevant targets.
1Maximum ranked candidate count; protected and related additions may exceed it.
1 <= x <= 20Preferred target kind. Influences ranking without excluding other kinds.
package, repository, site Task or question to help rank relevant targets.
Optional nonempty ordered list of exact lowercase public registries.
1npm, 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.
Whether the source considers the result ambiguous.
Source-owned ambiguity reason; not_ambiguous accompanies false.
not_ambiguous, duplicate_exact_name, close_candidates, low_confidence Canonical best target, null when no candidate is best.
Canonical protected exact-name matches in source order.
Whether bounded relation expansion omitted additional targets; direct entries are complete.
Source-ordered direct and bounded relation-expanded targets.