# NuGet API

> NuGet returns package details, recent versions, and download counts as a workflow and API.

Get package looks up NuGet by package name or nuget.org link and returns package details, versions, and download data. Version history includes the 10 most recent versions, including prereleases; details describe the latest stable release when one exists.

- Page: https://fous.com/workflows/nuget
- Handle: `@nuget`
- Category: [Developer tools](https://fous.com/workflows/category/developer-tools)
- Source website: https://nuget.org
- Last verified: Sep 29, 2026
- Fous is not affiliated with NuGet.

## Methods

### Get package

Operation `get_package`, version 1. 1 credit per call.

Look up a NuGet package by name or package link. Inexact names match the top search result; version history includes prereleases, while package details describe the latest stable release when one exists.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `package` | string | yes | `"https://www.nuget.org/packages/Serilog"` | Package name or nuget.org package link, for example Newtonsoft.Json or https://www.nuget.org/packages/Newtonsoft.Json. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "package"
  ],
  "properties": {
    "package": {
      "type": "string",
      "description": "Package name or nuget.org package link, for example Newtonsoft.Json or https://www.nuget.org/packages/Newtonsoft.Json.",
      "examples": [
        "https://www.nuget.org/packages/Serilog",
        "Newtonsoft.Json",
        "json serializer"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "package": "https://www.nuget.org/packages/Serilog"
    },
    {
      "package": "Newtonsoft.Json"
    },
    {
      "package": "json serializer"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `owners` | array |  |  |
| `authors` | array |  |  |
| `license` | string or null | `"Apache-2.0"` |  |
| `versions` | array |  | The 10 most recent versions, including prereleases. |
| `versions[].date` | string or null | `"2026-09-13"` |  |
| `versions[].version` | string | `"4.4.1-dev-02447"` |  |
| `versions[].downloads` | integer | `1633` |  |
| `versions[].package_link` | string | `"https://www.nuget.org/packages/Serilog/4.4.1-dev-02447"` |  |
| `description` | string or null | `"Simple .NET logging with fully-structured events"` |  |
| `package_link` | string | `"https://www.nuget.org/packages/Serilog"` |  |
| `package_name` | string | `"Serilog"` | The matched NuGet package name. |
| `project_link` | string or null | `"https://serilog.net/"` |  |
| `total_downloads` | integer | `3319887360` |  |
| `last_updated_date` | string or null | `"2026-07-10"` |  |
| `target_frameworks` | array |  |  |
| `latest_stable_version` | string or null | `"4.4.0"` |  |

**Example input**

```json
{
  "package": "https://www.nuget.org/packages/Serilog"
}
```

**Example output**

```json
{
  "owners": [
    "serilog"
  ],
  "authors": [
    "Serilog Contributors"
  ],
  "license": "Apache-2.0",
  "versions": [
    {
      "date": "2026-09-13",
      "version": "4.4.1-dev-02447",
      "downloads": 1633,
      "package_link": "https://www.nuget.org/packages/Serilog/4.4.1-dev-02447"
    },
    {
      "date": "2026-07-31",
      "version": "4.4.1-dev-02443",
      "downloads": 10270,
      "package_link": "https://www.nuget.org/packages/Serilog/4.4.1-dev-02443"
    },
    {
      "date": "2026-07-31",
      "version": "4.4.1-dependabot-02442",
      "downloads": 3257,
      "package_link": "https://www.nuget.org/packages/Serilog/4.4.1-dependabot-02442"
    }
  ],
  "description": "Simple .NET logging with fully-structured events",
  "package_link": "https://www.nuget.org/packages/Serilog",
  "package_name": "Serilog",
  "project_link": "https://serilog.net/",
  "total_downloads": 3319887360,
  "last_updated_date": "2026-07-10",
  "target_frameworks": [
    ".NET 10.0",
    ".NET Framework 4.6.2",
    ".NET Framework 4.7.1"
  ],
  "latest_stable_version": "4.4.0"
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@nuget",
  "visibility": "public",
  "operation": "get_package",
  "version": 1,
  "input": {
    "package": "https://www.nuget.org/packages/Serilog"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@nuget\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_package\",\n  \"version\": 1,\n  \"input\": {\n    \"package\": \"https://www.nuget.org/packages/Serilog\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@nuget",
  "visibility": "public",
  "operation": "get_package",
  "version": 1,
  "input": {
    "package": "https://www.nuget.org/packages/Serilog"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@nuget","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Check a package’s authors and license
- Compare recent package versions and download counts
- Review target frameworks before evaluating a dependency
- Find a package’s latest stable version
- Check a package’s total downloads

## FAQ

### Is Fous affiliated with NuGet?

No. Fous is not affiliated with NuGet. This workflow reads the public nuget.org website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a NuGet account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from nuget.org when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What are a package’s most recent versions?

Get package returns the 10 most recent versions, including prereleases, with version numbers and dates.

### How many times has a package been downloaded?

Get package returns total package downloads and download counts for recent versions.

### Which frameworks does a package target?

Get package returns the package’s target frameworks.

## Related

- [npm API](https://fous.com/workflows/npm.md): npm provides package details, search results and latest versions, plus weekly download and publish data; daily and historical download counts may lag by a day or more.
- [PyPI API](https://fous.com/workflows/pypi.md): PyPI provides package metadata, links, and current/latest plus 10 recent versions; release dates reflect first file uploads, and keyword searches return up to 100 packages.
- [RubyGems API](https://fous.com/workflows/rubygems.md): Discover and share Ruby gems.
- [GitHub API](https://fous.com/workflows/github.md): GitHub returns public repository matches and details, up to 25 trending projects, issues, pull requests, and newest-first published releases; release or commit dates may be unavailable.
- [VS Code Marketplace API](https://fous.com/workflows/vs-code-marketplace.md): Public listings for Visual Studio Code extensions.
- [crates.io API](https://fous.com/workflows/crates-io.md): crates.io is the Rust community package registry, returning current crate details and recent releases or up to 100 keyword-matched crates with version, download, and update information.
- [Microsoft Store API](https://fous.com/workflows/microsoft-store.md): Microsoft Store returns app and game listings, country-specific searches, and ranked charts; update notes, purchase prices, and exact rating counts may be unavailable.
- [Docker Hub API](https://fous.com/workflows/docker-hub.md): Docker Hub helps find and publish container images, search public images, and view image details and recently updated tags; pull totals may lag or be unavailable.
- [All Developer tools workflows](https://fous.com/workflows/category/developer-tools)
