NuGet V3 API
Technical reference for the NuGet V3 protocol implementation.
⏱️ 8 min read
Overview
NugetHosting implements the NuGet V3 Protocol, making it fully compatible with:
- Visual Studio 2015+
- dotnet CLI
- nuget.exe CLI
- JetBrains Rider
- Any NuGet V3 compatible client
Feed URL
https://nuget.nugethosting.com/v3/index.jsonService Index
The service index describes available resources:
curl https://nuget.nugethosting.com/v3/index.jsonResponse example:
{
"version": "3.0.0",
"resources": [
{
"@id": "https://nuget.nugethosting.com/v3/package",
"@type": "PackageBaseAddress/3.0.0"
},
{
"@id": "https://nuget.nugethosting.com/v3/search",
"@type": "SearchQueryService"
},
{
"@id": "https://nuget.nugethosting.com/v3/registration",
"@type": "RegistrationsBaseUrl"
},
{
"@id": "https://nuget.nugethosting.com/v3/push",
"@type": "PackagePublish/2.0.0"
}
]
}Package Content
Download package content (.nupkg files):
GET /v3/package/{id}/{version}/{id}.{version}.nupkgExample:
curl -H "Authorization: Bearer TOKEN" \
https://nuget.nugethosting.com/v3/package/mypackage/1.0.0/mypackage.1.0.0.nupkg \
-o mypackage.nupkgSearch
Search for packages:
GET /v3/search?q={query}&skip={skip}&take={take}Parameters
| Parameter | Description |
|---|---|
q | Search query string |
skip | Number of results to skip (pagination) |
take | Number of results to return (max 100) |
prerelease | Include prerelease versions (true/false) |
Package Metadata
Get package registration (metadata and versions):
GET /v3/registration/{id}/index.jsonThis returns all versions and metadata for a package, including:
- All published versions
- Dependencies for each version
- Package description and authors
- License information
- Download URLs