# NuGet Scraper (`crawlerbros/nuget-scraper`) Actor

Scrape NuGet.org, the .NET package registry with 600K+ packages. Search by keyword, filter by package type, get detailed metadata including versions, authors, download counts, and license info.

- **URL**: https://apify.com/crawlerbros/nuget-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NuGet Scraper

Scrape **NuGet.org** — the official .NET package registry with 600K+ packages. Extract package metadata including versions, authors, download statistics, license information, and more — all without authentication or API keys.

### What does NuGet Scraper do?

NuGet Scraper lets you:
- **Search** for packages by keyword with optional filters (package type, pre-release, sort order)
- **Look up** any specific package by its exact ID
- **Browse** all packages published by a specific author or organization
- **Retrieve** aggregate download statistics for the NuGet ecosystem

All data is sourced from the official [NuGet V3 API](https://docs.microsoft.com/en-us/nuget/api/overview), which is free, public, and imposes no rate limits for reasonable use.

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `mode` | Select | ✅ | Operation mode: `search`, `byPackageId`, `byAuthor`, or `statistics` |
| `query` | Text | mode=search | Search keyword (e.g. `Newtonsoft.Json`, `logging`, `Microsoft`) |
| `packageId` | Text | mode=byPackageId | Exact package ID (e.g. `Serilog`) |
| `author` | Text | mode=byAuthor | Author or organization name (e.g. `Microsoft`, `JetBrains`) |
| `packageType` | Select | No | Filter by type: `Dependency`, `DotnetTool`, `DotnetCliTool`, `Template` |
| `prerelease` | Boolean | No | Include pre-release packages (default: `false`) |
| `sortBy` | Select | No | Sort: `relevance`, `totalDownloads`, `lastEdited`, `newlyCreated` |
| `maxItems` | Integer | No | Max packages to return (1–1000, default: `50`) |

#### Example inputs

**Search for JSON packages:**
```json
{
  "mode": "search",
  "query": "Newtonsoft.Json",
  "maxItems": 10
}
````

**Look up a specific package:**

```json
{
  "mode": "byPackageId",
  "packageId": "AutoMapper"
}
```

**Browse Microsoft packages:**

```json
{
  "mode": "byAuthor",
  "author": "Microsoft",
  "maxItems": 50
}
```

**Get NuGet statistics:**

```json
{
  "mode": "statistics"
}
```

### Output

Each record in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Package ID (e.g. `Newtonsoft.Json`) |
| `version` | String | Latest version (e.g. `13.0.3`) |
| `description` | String | Full package description |
| `summary` | String | Short summary (if available) |
| `authors` | Array | List of author names |
| `tags` | Array | Package tags/keywords |
| `totalDownloads` | Integer | Total all-time downloads |
| `verified` | Boolean | Whether the package is verified by NuGet |
| `projectUrl` | String | Project homepage URL |
| `licenseUrl` | String | License URL |
| `iconUrl` | String | Package icon URL |
| `packageTypes` | Array | Package types (e.g. `["Dependency"]`) |
| `publishedDate` | String | Publication date (ISO 8601) |
| `nugetUrl` | String | Direct URL on NuGet.org |
| `scrapedAt` | String | Timestamp when the record was scraped |

#### Example output record

```json
{
  "id": "Newtonsoft.Json",
  "version": "13.0.3",
  "description": "Json.NET is a popular high-performance JSON framework for .NET",
  "summary": "Popular JSON framework",
  "authors": ["James Newton-King"],
  "tags": ["json", "serialization", "linq"],
  "totalDownloads": 4500000000,
  "verified": true,
  "projectUrl": "https://www.newtonsoft.com/json",
  "licenseUrl": "https://licenses.nuget.org/MIT",
  "packageTypes": ["Dependency"],
  "nugetUrl": "https://www.nuget.org/packages/Newtonsoft.Json",
  "scrapedAt": "2026-05-25T12:00:00+00:00"
}
```

### Modes

#### `search` — Search packages by keyword

Search NuGet for packages matching a keyword. Supports filtering by package type (library, tool, template) and sorting by various criteria.

#### `byPackageId` — Get a specific package

Fetch full metadata for a single package by its exact NuGet ID. Includes published date from the registration API.

#### `byAuthor` — Browse by author

Search for all packages from a specific author or organization (e.g. `Microsoft`, `JetBrains`, `Autofac`).

#### `statistics` — Download statistics

Retrieve aggregate download statistics for the entire NuGet ecosystem.

### FAQ

**Do I need an API key?**
No. NuGet's V3 API is completely public and requires no authentication.

**How many packages can I scrape?**
Up to 1,000 per run with the `maxItems` parameter. For bulk scraping, run multiple times with different queries.

**Can I get all versions of a package?**
The scraper returns the latest stable version. For version history, use `byPackageId` mode which fetches registration data.

**Are pre-release packages included?**
Set `prerelease: true` to include alpha/beta packages in search results.

**What package types are available?**

- `Dependency` — Standard .NET library
- `DotnetTool` — Global or local .NET tool
- `DotnetCliTool` — Legacy .NET CLI tool
- `Template` — Project/item template for `dotnet new`

**Is proxy required?**
No. NuGet.org's public API has no geo-restrictions and requires no proxy.

# Actor input Schema

## `mode` (type: `string`):

Operation mode: search packages, fetch a specific package by ID, browse by author, or get download statistics.

## `query` (type: `string`):

Keyword or phrase to search for packages (mode=search).

## `packageId` (type: `string`):

Exact NuGet package ID to look up (mode=byPackageId). E.g. `Newtonsoft.Json`.

## `author` (type: `string`):

Author name to filter packages by (mode=byAuthor). E.g. `Microsoft`.

## `packageType` (type: `string`):

Filter by package type (optional, mode=search).

## `prerelease` (type: `boolean`):

Whether to include pre-release packages in search results.

## `sortBy` (type: `string`):

Sort search results by this criterion (mode=search).

## `maxItems` (type: `integer`):

Maximum number of packages to return.

## Actor input object example

```json
{
  "mode": "search",
  "query": "Newtonsoft.Json",
  "packageId": "Newtonsoft.Json",
  "author": "Microsoft",
  "packageType": "",
  "prerelease": false,
  "sortBy": "relevance",
  "maxItems": 50
}
```

# Actor output Schema

## `packages` (type: `string`):

Dataset containing all scraped NuGet packages.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "search",
    "query": "Newtonsoft.Json",
    "packageId": "Newtonsoft.Json",
    "author": "Microsoft",
    "packageType": "",
    "prerelease": false,
    "sortBy": "relevance",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/nuget-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "search",
    "query": "Newtonsoft.Json",
    "packageId": "Newtonsoft.Json",
    "author": "Microsoft",
    "packageType": "",
    "prerelease": False,
    "sortBy": "relevance",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/nuget-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "search",
  "query": "Newtonsoft.Json",
  "packageId": "Newtonsoft.Json",
  "author": "Microsoft",
  "packageType": "",
  "prerelease": false,
  "sortBy": "relevance",
  "maxItems": 50
}' |
apify call crawlerbros/nuget-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/nuget-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NuGet Scraper",
        "description": "Scrape NuGet.org, the .NET package registry with 600K+ packages. Search by keyword, filter by package type, get detailed metadata including versions, authors, download counts, and license info.",
        "version": "1.0",
        "x-build-id": "m8ePmRbPFdl7qAjCA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~nuget-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-nuget-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~nuget-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-nuget-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~nuget-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-nuget-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "byPackageId",
                            "byAuthor",
                            "statistics"
                        ],
                        "type": "string",
                        "description": "Operation mode: search packages, fetch a specific package by ID, browse by author, or get download statistics.",
                        "default": "search"
                    },
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Keyword or phrase to search for packages (mode=search).",
                        "default": "Newtonsoft.Json"
                    },
                    "packageId": {
                        "title": "Package ID",
                        "type": "string",
                        "description": "Exact NuGet package ID to look up (mode=byPackageId). E.g. `Newtonsoft.Json`."
                    },
                    "author": {
                        "title": "Author name",
                        "type": "string",
                        "description": "Author name to filter packages by (mode=byAuthor). E.g. `Microsoft`."
                    },
                    "packageType": {
                        "title": "Package type",
                        "enum": [
                            "",
                            "Dependency",
                            "DotnetTool",
                            "DotnetCliTool",
                            "Template"
                        ],
                        "type": "string",
                        "description": "Filter by package type (optional, mode=search).",
                        "default": ""
                    },
                    "prerelease": {
                        "title": "Include pre-release",
                        "type": "boolean",
                        "description": "Whether to include pre-release packages in search results.",
                        "default": false
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "relevance",
                            "totalDownloads",
                            "lastEdited",
                            "newlyCreated"
                        ],
                        "type": "string",
                        "description": "Sort search results by this criterion (mode=search).",
                        "default": "relevance"
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of packages to return.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
