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 |
curl --request POST \
--url https://api.githits.dev/v1/experimental/targets/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 8,
"name": "Phoenix",
"preferred_kind": "package",
"query": "web framework",
"registries": [
"hex"
]
}
'{
"ambiguous": true,
"ambiguous_reason": "duplicate_exact_name",
"best": "npm:phoenix",
"protected_matches": [
"npm:phoenix",
"pypi:phoenix"
],
"related_targets_truncated": false,
"targets": [
{
"group_key": "project:1",
"kind": "package",
"latest_version": "1.0.0",
"latest_version_malicious_evidence": {
"advisories": [
{
"classification_reasons": [
"invalid_affected_range"
],
"osv_id": "MAL-2026-2"
}
],
"total_count": 1,
"truncated": false
},
"latest_version_malicious_status": "unknown",
"match": {
"confidence": "exact",
"protected": true
},
"package_name": "phoenix",
"registry": "npm",
"target": "npm:phoenix"
},
{
"group_key": null,
"kind": "package",
"latest_version": "0.1.0",
"latest_version_malicious_evidence": null,
"latest_version_malicious_status": "clear",
"match": {
"confidence": "exact",
"protected": true
},
"package_name": "phoenix",
"registry": "pypi",
"target": "pypi:phoenix"
},
{
"group_key": "project:1",
"kind": "repository",
"latest_version": null,
"latest_version_malicious_evidence": null,
"latest_version_malicious_status": "not_applicable",
"match": null,
"package_name": null,
"registry": null,
"target": "github:example/phoenix"
}
]
}Authorizations
Headers
Optional caller-defined session ID: one to 64 ASCII letters, digits, underscores or hyphens, preserved exactly. Supply the header at most once. Invalid supplied IDs return 400 INVALID_SESSION_ID; no session is created.
1 - 64^[A-Za-z0-9_-]{1,64}$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.
Response
Ranked direct and related canonical targets
Ranked targets with identity, ambiguity, and malicious-package evidence.
curl --request POST \
--url https://api.githits.dev/v1/experimental/targets/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 8,
"name": "Phoenix",
"preferred_kind": "package",
"query": "web framework",
"registries": [
"hex"
]
}
'{
"ambiguous": true,
"ambiguous_reason": "duplicate_exact_name",
"best": "npm:phoenix",
"protected_matches": [
"npm:phoenix",
"pypi:phoenix"
],
"related_targets_truncated": false,
"targets": [
{
"group_key": "project:1",
"kind": "package",
"latest_version": "1.0.0",
"latest_version_malicious_evidence": {
"advisories": [
{
"classification_reasons": [
"invalid_affected_range"
],
"osv_id": "MAL-2026-2"
}
],
"total_count": 1,
"truncated": false
},
"latest_version_malicious_status": "unknown",
"match": {
"confidence": "exact",
"protected": true
},
"package_name": "phoenix",
"registry": "npm",
"target": "npm:phoenix"
},
{
"group_key": null,
"kind": "package",
"latest_version": "0.1.0",
"latest_version_malicious_evidence": null,
"latest_version_malicious_status": "clear",
"match": {
"confidence": "exact",
"protected": true
},
"package_name": "phoenix",
"registry": "pypi",
"target": "pypi:phoenix"
},
{
"group_key": "project:1",
"kind": "repository",
"latest_version": null,
"latest_version_malicious_evidence": null,
"latest_version_malicious_status": "not_applicable",
"match": null,
"package_name": null,
"registry": null,
"target": "github:example/phoenix"
}
]
}