# npm & PyPI Scraper: Package Downloads, Stats & Dependencies (`best_celerytop/package-registry-scraper`) Actor

npm and PyPI package scraper. Look up npm or PyPI packages by name or search npm by keyword. One row per package: latest version, license, weekly and monthly download stats, dependencies, maintainers with emails, repository, deprecation, size, types, release dates. Official registry APIs, no key.

- **URL**: https://apify.com/best_celerytop/package-registry-scraper.md
- **Developed by:** [Konstantin Semin](https://apify.com/best_celerytop) (community)
- **Categories:** Developer tools, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 packages

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

## npm & PyPI Package Scraper: Downloads, Dependencies, Maintainers

Look up packages on [npm](https://www.npmjs.com) (JavaScript, 3M+ packages) and [PyPI](https://pypi.org) (Python, 600K+ projects) by name, or search npm by keyword, and get one clean row per package: latest version, number of versions, license, homepage and repository, weekly and monthly downloads, dependencies with version ranges, maintainers with public emails, author, deprecation notice, unpacked size, TypeScript types, Python version requirement, release dates and quality scores.

The Actor uses the official registry APIs and download statistics. No login, no browser, no proxies, no API key.

### What you can do with it

- **Dependency audits and compliance**: licenses, deprecated packages, maintainer counts and last publish dates for every package your projects use.
- **Technology research**: all npm packages for a topic ranked by downloads, quality or maintenance; who maintains them and how fast they move.
- **Community and ecosystem research**: package popularity, maintainer activity and technology adoption across a niche, with the public maintainer details npm shows on every package page.
- **Monitoring**: schedule a run for a list of packages to track versions and download trends over time.
- **Security review**: unusual publishers, packages with no repository, abandoned packages still pulling downloads.

### Input

| Field | Type | Description |
|---|---|---|
| `ecosystem` | string | `npm` (default) or `pypi`. |
| `packages` | array | Package names to look up, one per line. Works for both registries. |
| `queries` | array | npm only: keyword searches, one per line. PyPI has no search API. |
| `sortBy` | string | npm search ranking: `relevance` (default), `popularity`, `quality`, `maintenance`. |
| `minWeeklyDownloads` | integer | Skip packages with fewer downloads in the last week. |
| `includeDependencies` | boolean | Add full dependency lists. Default `true`. |
| `includeMaintainers` | boolean | npm: add maintainer names and emails. Default `true`. |
| `includeReadme` | boolean | Add the README text. Default `false`. |
| `maxItems` | integer | Maximum number of packages saved. Default `100`. |

#### Example input

```json
{
    "ecosystem": "npm",
    "queries": ["http client"],
    "sortBy": "popularity",
    "minWeeklyDownloads": 10000,
    "maxItems": 200
}
```

```json
{
    "ecosystem": "pypi",
    "packages": ["requests", "fastapi", "pandas", "numpy"]
}
```

### Output

One dataset item per package. An npm row:

```json
{
    "ecosystem": "npm",
    "name": "axios",
    "url": "https://www.npmjs.com/package/axios",
    "description": "Promise based HTTP client for the browser and node.js",
    "latestVersion": "1.21.1",
    "versionsCount": 148,
    "license": "MIT",
    "homepage": "https://axios-http.com",
    "repository": "https://github.com/axios/axios",
    "bugsUrl": "https://github.com/axios/axios/issues",
    "keywords": ["xhr", "http", "ajax", "promise", "node", "browser", "fetch", "rest", "api"],
    "author": { "name": "Matt Zabriskie", "email": null },
    "publisher": { "name": "GitHub Actions", "email": "npm-oidc-no-reply@github.com" },
    "maintainers": [{ "name": "jasonsaayman", "email": "jasonsaayman@gmail.com" }],
    "maintainersCount": 1,
    "createdAt": "2014-08-29T23:08:36.810Z",
    "lastPublishedAt": "2026-11-09T16:17:55.824Z",
    "weeklyDownloads": 142159537,
    "monthlyDownloads": 598213002,
    "dependentsCount": 143000,
    "scoreFinal": 0.93,
    "scoreQuality": 0.96,
    "scorePopularity": 0.98,
    "scoreMaintenance": 0.85,
    "dependenciesCount": 4,
    "peerDependenciesCount": 0,
    "devDependenciesCount": 55,
    "dependencies": ["form-data@^4.0.6", "proxy-from-env@^2.1.0", "follow-redirects@^1.16.2", "https-proxy-agent@^7.0.6"],
    "peerDependencies": [],
    "hasTypes": true,
    "deprecated": null,
    "engines": null,
    "unpackedSizeBytes": 2347152,
    "fileCount": 85,
    "tarballUrl": "https://registry.npmjs.org/axios/-/axios-1.21.1.tgz",
    "scrapedAt": "2026-11-14T09:00:00.000Z"
}
```

A PyPI row has `summary` in `description`, `requiresPython`, `classifiers`, `developmentStatus`, `projectUrls`, `authorEmail`, `maintainerEmail`, `dailyDownloads`, `firstReleasedAt`, `lastReleasedAt`, `yanked`, `wheelAvailable` and `latestReleaseSizeBytes`. Search-only fields (`dependentsCount`, quality scores) are `null` for packages looked up by name.

A `RUN_SUMMARY` record in the key-value store lists how many packages each search returned and which names were not found.

### Good to know

- **Downloads.** npm counts come from the official download API (last 7 and 30 days). PyPI counts come from pypistats.org (last day, week and month) and exclude mirrors.
- **Scale and speed.** npm searches return 250 packages per page; metadata is fetched five packages at a time and downloads in bulk. Popular packages carry long version histories, so expect roughly 50 to 100 packages per minute. PyPI is fetched three at a time to respect its statistics service.
- **Scoped packages** such as `@types/node` are supported everywhere.
- **Maintainer emails** are the public emails that npm shows on every package page.
- **Polite by design.** Requests go to the public registry APIs with a plain user agent and small concurrency.
- **Price.** $1 per 1,000 packages, no start fee; platform usage is included.
- **Works with n8n, Make, Zapier and AI agents.** The official Apify node for n8n runs this Actor and returns the rows inside a workflow, Make and Zapier use the Apify integration, and AI agents call it as a tool through the Apify MCP server.
- **Respect the people behind the data.** Don't use it for unsolicited bulk outreach.

### FAQ

**Can I search PyPI by keyword?**
Not through this Actor: PyPI retired its search API. Give package names instead, for example from a `requirements.txt`.

**Do the dependencies include transitive ones?**
No, only the direct runtime and peer dependencies of the latest version.

**How do I get npm download statistics for many packages at once?**
List the package names and run. Weekly and monthly downloads come from npm's official download API, up to 128 packages per request.

**How can I find the maintainers of an npm package?**
Each npm row lists the maintainers with the public emails shown on npmjs.com, plus the publisher of the latest version.

**Can I get PyPI download statistics?**
Yes. Choose the PyPI registry and list the packages; daily, weekly and monthly downloads come from pypistats.org.

**Can I use it from n8n or an AI agent?**
Yes. Start it through the official Apify node for n8n, the Make or Zapier integration, or the Apify MCP server, and read the rows back from the dataset.

**Something is missing or broken?**
Open an issue on the Issues tab and include the input you used.

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by npm, GitHub, the Python Software Foundation or pypistats.org. Package metadata belongs to the respective authors.

# Actor input Schema

## `ecosystem` (type: `string`):

npm (JavaScript) or PyPI (Python).

## `packages` (type: `array`):

Packages to look up, one per line, for example `axios`, `@types/node` or `requests`. Works for both registries.

## `queries` (type: `array`):

Keywords searched in npm package names, descriptions and keywords, one search per line, for example `http client`, `date picker react`. PyPI has no search API.

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

How npm ranks the search results.

## `minWeeklyDownloads` (type: `integer`):

Skip packages with fewer downloads in the last week.

## `includeDependencies` (type: `boolean`):

Add the full list of runtime and peer dependencies with version ranges.

## `includeMaintainers` (type: `boolean`):

npm only: add maintainer names and public emails.

## `includeReadme` (type: `boolean`):

Add the package README text. Makes rows much larger.

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

Maximum number of packages saved in the run.

## Actor input object example

```json
{
  "ecosystem": "npm",
  "queries": [
    "http client"
  ],
  "sortBy": "relevance",
  "includeDependencies": true,
  "includeMaintainers": true,
  "includeReadme": false,
  "maxItems": 20
}
```

# Actor output Schema

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

npm or PyPI packages with versions, downloads, dependencies and maintainers.

## `runSummary` (type: `string`):

How many packages each search returned and which names were not found.

# 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 = {
    "ecosystem": "npm",
    "queries": [
        "http client"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("best_celerytop/package-registry-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 = {
    "ecosystem": "npm",
    "queries": ["http client"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("best_celerytop/package-registry-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 '{
  "ecosystem": "npm",
  "queries": [
    "http client"
  ],
  "maxItems": 20
}' |
apify call best_celerytop/package-registry-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,best_celerytop/package-registry-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/rfm4mjh6Cp5JJ0vnj/builds/WAjG8lQM0NyFVSgVn/openapi.json
