# Nuget Packages Scraper (`b2b_lead_generation/nuget-packages-scraper`) Actor

NuGet Packages Scraper collects public .NET package data from NuGet.org by keyword search, exact package ID lookup, or autocomplete prefixes. Track package IDs, version histories, download counts, authors, and licenses. Export clean dataset records directly to JSON, CSV, or Excel

- **URL**: https://apify.com/b2b_lead_generation/nuget-packages-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NuGet Packages Scraper

NuGet Packages Scraper collects public .NET package records from NuGet. Search by keyword, look up versions for an exact package ID, or pull autocomplete suggestions. The dataset exports cleanly as JSON, CSV, or Excel.

### Key Use Cases

- **Dependency Inventory**: Search keywords and track package IDs, versions, download stats, and project links in a single table.
- **Upgrade Review**: Input package IDs to list published package versions and check historical trends.
- **CSV & Spreadsheet Export**: Instantly export package lists into structured spreadsheets.
- **ID Lookup**: Type a prefix to grab relevant autocomplete package recommendations.
- **Scheduled Monitoring**: Re-run the same search queries periodically to compare growth and download trends over time.

### Operational Modes

#### Search (`searchQueries`)

Fetches search results matching your target keywords. Pages navigate automatically using standard offset controls until results finish or your requested maximum row limit is reached.

#### Registration (`packageIds`)

Look up detailed historical data for specific package IDs. Each inline version record is split into its own clear row for easy analysis.

#### Autocomplete (`autocompleteQueries`)

Retrieves rapid search suggestions based on package ID prefixes.

### Input Configuration

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQueries` | array | `json` | Search terms or keywords, one per line. |
| `packageIds` | array | empty | Exact package IDs for direct version lookup. |
| `autocompleteQueries` | array | empty | Prefixes for package ID autocomplete lookup. |
| `includePrerelease` | boolean | `false` | Includes prerelease versions in search results when set to true. |
| `maxItems` | integer | `100` | Maximum total rows to process for the run. |
| `requestDelaySecs` | number | `0.3` | Custom pause between operations (in seconds). |
| `timeoutSecs` | integer | `300` | Maximum runtime limit before stopping automatically. |
| `requestTimeoutSecs` | integer | `30` | Timeout per individual network operation. |

#### Example Input

```json
{
  "searchQueries": ["json"],
  "packageIds": ["Newtonsoft.Json"],
  "autocompleteQueries": ["newt"],
  "includePrerelease": false,
  "maxItems": 100,
  "requestDelaySecs": 0.3,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30
}

```

### Extracted Data Fields

| Field | Type | Description |
| --- | --- | --- |
| `recordType` | string | Type classification of the record. |
| `registration` | string | Reference link for package registration. |
| `id` | string | Package ID. |
| `version` | string | Specific version string. |
| `packageDescription` | string | Detailed package description text. |
| `summary` | string | Brief summary text. |
| `packageTitle` | string | Main title of the package. |
| `iconUrl` | string | URL pointing to the package icon image. |
| `licenseUrl` | string | Link to the package license document. |
| `projectUrl` | string | Link to the project's main repository or home page. |
| `tags` | array | Associated topic tags. |
| `authors` | array | Authors or maintainers listed on the package. |
| `owners` | array | Owners listed for the package. |
| `totalDownloads` | integer | Total lifetime download count. |
| `verified` | boolean | Indicates whether the package owner is verified. |
| `packageTypes` | array | Package type categories. |
| `versions` | array | List of inline versions and download counts. |
| `vulnerabilities` | array | Reported security advisories or vulnerabilities, if any. |
| `mode` | string | Execution mode (`search`, `registration`, or `autocomplete`). |
| `scraped_at` | string | UTC timestamp when the record was collected. |
| `error` | boolean | Flagged if the specific package or request had an issue. |
| `input` | string | Query term or package ID associated with an issue. |
| `status` | integer | HTTP response status code. |
| `message` | string | Contextual detail if a lookup fails. |

### Sample Output

```json
{
  "recordType": "Package",
  "registration": "[https://api.nuget.org/v3/registration5-semver1/newtonsoft.json/index.json](https://api.nuget.org/v3/registration5-semver1/newtonsoft.json/index.json)",
  "id": "Newtonsoft.Json",
  "version": "13.0.4",
  "packageDescription": "Json.NET is a popular high-performance JSON framework for .NET",
  "summary": "",
  "packageTitle": "Json.NET",
  "iconUrl": "[https://api.nuget.org/v3-flatcontainer/newtonsoft.json/13.0.4/icon](https://api.nuget.org/v3-flatcontainer/newtonsoft.json/13.0.4/icon)",
  "licenseUrl": "[https://www.nuget.org/packages/Newtonsoft.Json/13.0.4/license](https://www.nuget.org/packages/Newtonsoft.Json/13.0.4/license)",
  "projectUrl": "[https://www.newtonsoft.com/json](https://www.newtonsoft.com/json)",
  "tags": ["json"],
  "authors": ["James Newton-King"],
  "owners": ["dotnetfoundation", "jamesnk"],
  "totalDownloads": 9325394018,
  "verified": true,
  "packageTypes": [{ "name": "Dependency" }],
  "versions": [
    {
      "version": "13.0.4",
      "downloads": 0
    }
  ],
  "vulnerabilities": [],
  "mode": "search",
  "scraped_at": "2026-10-12T00:00:00+00:00"
}

```

### How It Works

1. Input queries, package IDs, or autocomplete prefixes are evaluated.
2. The actor requests matching records while managing network backoff and retries safely.
3. If an individual ID cannot be found, it logs a clean status row and seamlessly proceeds with remaining queries.
4. Duplicate records are removed within each run and output straight to your preferred format.

### FAQ

**Can I export NuGet packages directly to CSV or Excel?**
Yes. Outputs can be downloaded in JSON, CSV, or Excel format whenever a run finishes.

**How up-to-date is the package information?**
Data is gathered live at the moment you run the scraper. Search outputs show the newest listed package versions, while registration lookups pull full package version listings.

**What happens if a package ID does not exist?**
If a specific ID is not found, the actor logs a single error status entry and keeps running the rest of your requested tasks.

### Trademark Notice

NuGet Packages and related names, logos, and trademarks belong to their respective owners. Their use in this documentation is solely to identify the subject of data collection and does not imply any affiliation, sponsorship, endorsement, or partnership.

### Disclaimer

This scraper is an independent tool and is not affiliated with, endorsed by, or officially connected to NuGet Packages or its parent entities. Users are responsible for ensuring their data usage aligns with standard guidelines and applicable terms.

### Is web scraping legal?

This tool collects publicly available metadata without bypassing technical restrictions or access controls. Collecting public data is generally legal, though how you use it remains important:

- **Personal Data**: If output rows contain personal details, compliance regulations such as GDPR or CCPA may apply based on how you store or process that information.
- **Copyright & Reuse**: Respect original content descriptions, licensing terms, and copyrights when reusing project descriptions or author details.
- **Usage Standards**: Ensure your queries respect standard traffic limits and community guidelines.
- **Legal Context**: This overview provides general information and does not constitute legal advice.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search on the NuGet search service. One keyword per line. An empty list skips search.

## `packageIds` (type: `array`):

Exact NuGet package ids for registration and version lookup. Ids are lowercased in the request path. One id per line.

## `autocompleteQueries` (type: `array`):

Partial package id prefixes for NuGet autocomplete. One prefix per line. Each query returns a single page of id suggestions.

## `includePrerelease` (type: `boolean`):

Include prerelease versions in search results. Registration lookup returns the versions published on the registration index.

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

Maximum dataset rows for this run, including error rows. Hard cap is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between NuGet requests. Minimum is 0.3 so search stays under the published per-IP rate limit.

## `timeoutSecs` (type: `integer`):

Stop the run after this many seconds, even if queries are still queued.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for a single NuGet response before treating that call as an error.

## `proxyConfiguration` (type: `object`):

Optional proxy for NuGet requests. Leave Apify Proxy off unless your IP is blocked.

## Actor input object example

```json
{
  "searchQueries": [
    "json"
  ],
  "packageIds": [
    "Newtonsoft.Json"
  ],
  "autocompleteQueries": [
    "newt"
  ],
  "includePrerelease": false,
  "maxItems": 100,
  "requestDelaySecs": 0.3,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

No description

## `overviewUrl` (type: `string`):

No description

# 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 = {
    "searchQueries": [
        "json"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/nuget-packages-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 = {
    "searchQueries": ["json"],
    "proxyConfiguration": { "useApifyProxy": False },
}

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

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

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

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "json"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call b2b_lead_generation/nuget-packages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/nuget-packages-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LTdRLD2jjyDd9LRph/builds/mFjRe1R9fkAmCHJE8/openapi.json
