APIs / Apps and media / NuGet

1 credit per call2 endpoints5 datapoints

NuGet API

NuGet API for .NET package search and package details with downloads, owners, licence, deprecation and recent versions as JSON. 1 credit per call.

NuGet
GET/v1/nuget/package?id=Newtonsoft.Json
{
  "success": true,
  "data": {
    "id": "Newtonsoft.Json",
    "title": "Json.NET",
    "description": "Json.NET is a popular high-performance JSON framework for .NET",
    "authors": [
      "James Newton-King"
    ],
    "owners": [
      "dotnetfoundation",
      "jamesnk",
      "newtonsoft"
    ],
    "total_downloads": 10038357843,
    "verified": true,
    "tags": [
      "json"
    ],
    "project_url": "https://www.newtonsoft.com/json",
    "deprecated": false,
    "url": "https://www.nuget.org/packages/Newtonsoft.Json",
    "latest_version": "13.0.4",
    "latest_prerelease": "14.0.1-beta2",
    "license": "MIT",
    "license_url": "https://www.nuget.org/packages/Newtonsoft.Json/14.0.1-beta2/license",
    "package_types": [
      "Dependency"
    ],
    "version_count": 55,
    "versions": [
      {
        "version": "14.0.1-beta2",
        "downloads": 151630,
        "published_at": "2026-09-21T10:12:19.923+00:00",
        "prerelease": true,
        "url": "https://www.nuget.org/packages/Newtonsoft.Json/14.0.1-beta2"
      },
      {
        "version": "14.0.1-beta1",
        "downloads": 3520,
        "published_at": "2026-09-21T06:44:49.787+00:00",
        "prerelease": true,
        "url": "https://www.nuget.org/packages/Newtonsoft.Json/14.0.1-beta1"
      },
      {
        "version": "13.0.4",
        "downloads": 368655819,
        "published_at": "2025-09-16T08:13:09.313+00:00",
        "prerelease": false,
        "url": "https://www.nuget.org/packages/Newtonsoft.Json/13.0.4"
      }
    ]
  },
  "meta": {
    "request_id": "req_694f6f924128426495da44f3184689ab",
    "credits_charged": 1,
    "credits_remaining": 489
  }
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Sample data

What one call returns

A recorded run of package: the fields and shapes you will get, shortened to 3 items.

#versionstringdownloadsintegerpublished_atstringprereleasebooleanurlurl
114.0.1-beta21516302026-09-21T10:12:19.923+00:00truehttps://www.nuget.org/packages/Newtonsoft.Json/14.0.1-beta2
214.0.1-beta135202026-09-21T06:44:49.787+00:00truehttps://www.nuget.org/packages/Newtonsoft.Json/14.0.1-beta1
313.0.43686558192025-09-16T08:13:09.313+00:00falsehttps://www.nuget.org/packages/Newtonsoft.Json/13.0.4

Recorded from our API · 3 items shown · 5 datapoints per itemGET /v1/nuget/package?id=Newtonsoft.Json

5 datapoints

Contact

  • urlurl

Other

  • versionstring
  • downloadsinteger
  • published_atstring
  • prereleaseboolean

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/nuget/package?id=Newtonsoft.Json" \
  -H "X-API-Key: $API_KEY"

NuGet · 2 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/nuget/package
id
idtitledescriptionauthorsownersverified+11 more
1 credit
GET/v1/nuget/search
none+5 optional
idversiontitledescriptionauthorsowners+6 more
1 credit

Overview

About the NuGet API

What you can get

The NuGet API returns .NET package data from nuget.org as JSON through 2 endpoints.

  • Search: search takes a query (words in the package ID, title, description or tags; leave it empty to list popular packages), with prerelease (default false), package_type (for example Dependency, DotnetTool or Template), page and per_page (1 to 100, default 20).
  • Package: package takes a package id, for example Newtonsoft.Json. It is not case-sensitive.

The recorded search for "json" found 13,285 packages (total), each with id, version, title, description, authors, owners, total_downloads, verified (a reserved ID prefix), tags, project_url, deprecated and url. The first result was Newtonsoft.Json with 10,038,357,843 downloads.

The recorded package for Newtonsoft.Json returned latest_version 13.0.4, latest_prerelease 14.0.1-beta2, license MIT, package_types Dependency and a version_count of 55. It adds license_url, a deprecation with its reasons, message and alternate_package when a package is deprecated, and versions, each with version, downloads, published_at, prerelease and url, for the most recent 30 versions.

How a call works

Search, then look up: GET /v1/nuget/search?query=json&per_page=10 with your key in the X-API-Key header returns each package's id, which package takes, for example GET /v1/nuget/package?id=Newtonsoft.Json. Check has_more before asking for the next page. A package ID nuget.org doesn't have answers 404. Answers come from a cache for up to an hour, so download counts can be up to an hour old. Every successful call costs 1 credit; failed calls cost nothing.

Apps and mediaJSONRESTMCP

More apps and media APIs

Use cases

Let a coding agent check the current stable version of a package before editing a `.csproj`

Use the NuGet API to let a coding agent check the current stable version of a package before editing a `.csproj`

Flag deprecated packages in a dependency list, with the suggested alternate package

Use the NuGet API to flag deprecated packages in a dependency list, with the suggested alternate package

Rank packages for a job by total downloads and verified prefix

Use the NuGet API to rank packages for a job by total downloads and verified prefix

Find .NET CLI tools or project templates with `package_type`

Use the NuGet API to find .NET CLI tools or project templates with `package_type`

FAQ

Questions

Is this the official NuGet API?

No. Perceptlayer is an independent service and is not affiliated with Microsoft or nuget.org. The nuget.org V3 API is free to call directly, and its terms forbid overburdening its servers. This API calls it on your behalf and adds one key for every source on Perceptlayer, search and registration data merged into one response shape, a cache of up to an hour, and no charge for failed calls.

Does `search` include pre-release versions?

Not by default. Set `prerelease=true` to include them. `package` always reports both `latest_version` (stable) and `latest_prerelease`.

Does `package` return every version?

It returns `version_count` and the most recent 30 versions, each with its downloads and publish date. Unlisted versions have no `published_at`.

Do I need a nuget.org account?

No. You call this NuGet API with your Perceptlayer key in the `X-API-Key` header, with no nuget.org login or API key.

Should I build a NuGet scraper instead?

You can, but a NuGet scraper is code you maintain: page changes break it, requests get blocked, and NuGet's terms govern how you collect data. The NuGet API gives you 2 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the NuGet API with 100 free credits

No credit card. Failed calls are never billed.