# npm and PyPI Package Scraper: downloads, versions, licenses (`bepolabs/npm-pypi`) Actor

Get npm and PyPI package data for any list: weekly traffic, latest version, repository, maintainers and release dates as JSON or CSV. Costs 0.75 USD per 1,000 packages.

- **URL**: https://apify.com/bepolabs/npm-pypi.md
- **Developed by:** [BEPO Labs](https://apify.com/bepolabs) (community)
- **Categories:** Developer tools, Automation, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.75 / 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.

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

### 📦 What is npm and PyPI Package Data?

Turn package names into one clean row per package from the official npm registry and PyPI: newest tag, licence kind (permissive or restrictive), owners, first and final publication, days since it, withdrawal flag, requirements, runtime, source link, and per-week and per-month installs. Mix both ecosystems in one run, paste npmjs.com or pypi.org links, or search npm by keyword and get a full record for every match.

- **Licence audits**: list every dependency with its usage rights and kind, and spot copyleft before legal does
- **Dependency health**: find packages that are deprecated, yanked or have had no release for years
- **Developer tool and DevRel teams**: track weekly downloads of your packages and competitors' in Google Sheets
- **Market and investor research**: compare adoption of libraries across npm and PyPI
- **AI coding agents**: give Claude or ChatGPT structured package facts through MCP

![npm and PyPI Package Data: Versions, downloads, licences, maintainers and release history of npm and PyPI packages in one table.](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/npm-pypi-hero.png)

#### ✨ Why use this Actor?

- ✅ **npm and PyPI in one run**: the same fields for JavaScript and Python packages, next to each other
- ✅ **Licence type, not just the id**: permissive, weak or strong copyleft, proprietary or none, read from SPDX ids and expressions
- ✅ **Downloads included**: weekly and monthly counts from the npm download API and pypistats.org
- ✅ **Health signals**: days since the last publication, deprecated or yanked flag, version count and first release date
- ✅ **Names, URLs or npm search**: bare entries, `npm:`/`pypi:` prefixes, registry links, scoped ones, or keywords
- ✅ **Fair pricing**: names the registry does not know get a free not-found row

### 📦 What data can you get with npm and PyPI Package Data?

| | | |
|---|---|---|
| 📦 Name and registry | 🔢 Latest version | ⚖️ Licence and licence type |
| 📈 Weekly downloads | 📊 Monthly downloads | 👥 Maintainers and author |
| 📅 First and last release | ⏳ Days since last release | ⚠️ Deprecated or yanked |
| 🧩 Dependencies and count | 🛠️ Runtime (node or python) | 🔗 Repository and homepage |

### 🚀 How to use npm and PyPI Package Data

npm and PyPI Package Data works in a few clicks, no coding needed:

1. [Create a free Apify account](https://console.apify.com/sign-up) (the free plan includes 5 USD of monthly credit).
2. Open [npm and PyPI Package Data](https://apify.com/bepolabs/npm-pypi) and click **Try for free**.
3. Enter package names (or npmjs.com and pypi.org links) and pick the default registry, or add npm search words.
4. Click **Start** and wait for the run to finish (most runs take seconds).
5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

![How npm and PyPI Package Data works](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/npm-pypi-workflow.png)

### ⬇️ Input

Give package names, registry links or npm searches. Downloads are on by default; everything else is optional.

##### npm or PyPI?

Prefix a name with `npm:` or `pypi:` (`pypi:requests`), paste a `npmjs.com/package/...` or `pypi.org/project/...` link, or write the bare form to use `defaultRegistry`. Scoped npm names such as `@types/node` work.

##### npm search

`npmSearches` takes words such as `markdown parser`; each query adds up to `maxSearchResults` packages (up to 250), ranked by relevance, each with a full row. PyPI has no search API, so its entries are given by name.

##### Version history

Switch on `includeVersionList` to add the last 20 versions with their release dates to each row.

| Field | Type | What it does | Default |
|---|---|---|---|
| **Packages** (`packages`) | array | Package names, one per line. | `["react","pypi:requests"]` |
| **Default registry** (`defaultRegistry`) | string | Registry for names without an npm: or pypi: prefix. | `"npm"` |
| **npm searches** (`npmSearches`) | array | Words to search on npm, e.g. |  |
| **Packages per npm search** (`maxSearchResults`) | integer | How many packages each npm search returns, ranked by relevance. | `20` |
| **Include downloads** (`includeDownloads`) | boolean | Add weekly and monthly download counts (npm download API, pypistats.org for PyPI). | `true` |
| **Include version list** (`includeVersionList`) | boolean | Add the last 20 versions with their release dates to each row. | `false` |
| **Max retries** (`maxRetries`) | integer | Retries per request on timeouts, rate limits and server errors. | `3` |

![npm and PyPI Package Data input form](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/npm-pypi-input.png)

#### Input example

```json
{
    "packages": [
        "react",
        "zod",
        "@types/node",
        "npm:left-pad",
        "express"
    ]
}
```

### ⬆️ Output

Every package becomes one row with the same fields for npm and PyPI. Unknown ones get a record with `status: "not-found"`. The run summary in the key-value store (`OUTPUT`) lists not-found names, searches and any error.

![npm and PyPI Package Data output table](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/npm-pypi-output.png)

#### Output example

One row of the dataset (express on npm, lists shortened):

```json
{
    "name": "express",
    "registry": "npm",
    "version": "5.3.0",
    "license": "MIT",
    "licenseType": "permissive",
    "lastPublished": "2026-10-09",
    "versionCount": 290,
    "downloadsLastWeek": 145199376,
    "description": "Fast, unopinionated, minimalist web framework",
    "maintainers": [
        "wesleytodd",
        "jonchurch",
        "ctcpip",
        "ulisesgascon",
        "sheplu"
    ],
    "author": "TJ Holowaychuk",
    "homepage": "https://expressjs.com/",
    "repository": "https://github.com/expressjs/express",
    "keywords": [
        "express",
        "framework",
        "sinatra",
        "web",
        "http"
    ],
    "firstPublished": "2010-12-29",
    "daysSinceLastRelease": 6,
    "deprecated": null,
    "dependencies": [
        "qs",
        "depd",
        "etag",
        "once",
        "send",
        "vary"
    ],
    "dependencyCount": 28,
    "runtime": "node >= 18",
    "downloadsLastMonth": 635513489,
    "url": "https://www.npmjs.com/package/express",
    "status": "ok"
}
```

#### Version list

With `includeVersionList` each row also has `versions`, newest on top (requests on PyPI, the first three of 20):

```json
{
    "name": "requests",
    "versions": [
        {
            "version": "2.34.2",
            "date": "2026-05-14"
        },
        {
            "version": "2.34.1",
            "date": "2026-05-13"
        },
        {
            "version": "2.34.0",
            "date": "2026-05-11"
        }
    ]
}
```

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS, all fields or only those you pick.

#### ⚠️ Error items

An input that cannot be read does not stop the run and is never charged: it gets a row with an `error` field so you can see exactly what failed.

| Error | Meaning |
|---|---|
| `not-found` | The registry has no package of that name, e.g. `no-such-package-bepo` on PyPI in a real run |
| `error` | The registry did not answer after all retries; the row carries the HTTP status |

### 💰 How much does npm and PyPI Package Data cost?

npm and PyPI Package Data is priced **per event**: **0.75 USD per 1,000 packages** (0.00075 USD each), with no monthly rental. Names the registry does not know get a free not-found row; there is no start fee.

| You get | You pay |
|---|---|
| 100 packages | 0.08 USD |
| 1,000 packages | 0.75 USD |
| 10,000 packages | 7.5 USD |
| 100,000 packages | 75 USD |

💡 Apify's free plan gives you 5 USD of credit every month, enough for about **6,666 packages** at no cost. Set a spending limit per run and the Actor stops there.

### ⚖️ npm and PyPI Package Data vs. the alternatives

| | npm and PyPI Package Data | Registry websites by hand | Typical package scrapers |
|---|---|---|---|
| **npm and PyPI in one table** | ✅ | two sites | often one registry |
| **Licence type (permissive or copyleft)** | ✅ | ❌ | ❌ |
| **Weekly and monthly downloads** | ✅ | npm only | varies |
| **Deprecated, yanked and days since release** | ✅ | by hand | partly |
| **Export, schedule, API and MCP** | ✅ | ❌ | ✅ |

### 🔌 Integrations, API and MCP

#### Connect npm and PyPI Package Data to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to npm and PyPI Package Data through the [Apify MCP server](https://mcp.apify.com). Add this URL to its settings:

```text
https://mcp.apify.com/?actors=bepolabs/npm-pypi
```

For Claude Desktop, add it under `mcpServers` in `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "npm-pypi": {
            "command": "npx",
            "args": [
                "-y",
                "@apify/actors-mcp-server",
                "--actors",
                "bepolabs/npm-pypi"
            ],
            "env": {
                "APIFY_TOKEN": "<your Apify API token>"
            }
        }
    }
}
```

Then ask: *"Check the licence, weekly downloads and last release of react, express, zod and pypi:requests, and flag any that are deprecated."*

#### Run it from your code

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/npm-pypi").call(run_input={"packages":["react","zod","@types/node","npm:left-pad","express"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/npm-pypi').call({"packages":["react","zod","@types/node","npm:left-pad","express"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### No-code integrations

Send results to **Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n** and more from the Integrations tab, start runs on a **schedule**, or trigger your own endpoint with a **webhook** when a run finishes. The [Apify API](https://docs.apify.com/api/v2) gives you full control over runs and datasets.

### ❓ FAQ

##### How is the licence type decided?

From the SPDX id or expression: `MIT OR GPL-3.0` counts as permissive (you may choose), `MIT AND GPL-3.0` as copyleft (you must respect both). Free text the Actor cannot read is `unknown`. It is a quick guide, not legal advice.

##### Why are PyPI downloads empty?

pypistats.org is a volunteer service that is sometimes down. The run then leaves PyPI downloads empty, says so in `OUTPUT`, and delivers everything else.

##### Why does the npm download count differ from npmjs.com?

Both come from the same API; the page may show another week. `downloadsLastWeek` is the last full 7 days it has.

##### Can I check a whole package.json or requirements.txt?

Yes: paste the dependency names into `packages`, one per line, with `pypi:` in front of Python ones or `defaultRegistry: "pypi"`.

##### Do I need an API key?

No. All sources are public registry APIs.

##### Is it legal to use npm and PyPI Package Data?

The Actor uses the open npm registry and download APIs, the PyPI JSON API and pypistats.org, at most 3 requests at once with backoff. It collects published package metadata and the names of owners, never their email addresses. Not affiliated with or endorsed by npm, GitHub, the Python Software Foundation or PyPI Stats.

##### What if something is missing or does not work?

Open an issue on the **Issues** tab; we read each one and reply. Feature requests are welcome too.

### 💬 Your feedback

Tell us what npm and PyPI Package Data should add on the **Issues** tab or leave a review; your notes decide what we work on next.

### 🔗 Related Actors

| Actor | What it does |
|---|---|
| 🧩 [Chrome Web Store Scraper](https://apify.com/bepolabs/chrome-web-store) | Users, rating, version, last update, developer, category and permissions of any Chrome extension. |
| ⭐ [App Store Reviews](https://apify.com/bepolabs/app-store-reviews) | iOS App Store reviews with stars, text, app version and date, plus the app's rating and details, for any store country. |
| 🛡️ [CVE Vulnerability Search](https://apify.com/bepolabs/cve-vulnerabilities) | Official NVD records by CVE id, keyword or product: CVSS, CWE, CISA known-exploited flag and fix links. |
| 🛍️ [Shopify Products](https://apify.com/bepolabs/shopify-products) | Any Shopify store URL to every product, with variants, prices, sale prices, SKUs, stock and images. |
| 🎮 [Steam Scraper](https://apify.com/bepolabs/steam) | Game prices, details and player reviews from the Steam store, by app id, store URL or game name. |
| 🌐 [Domain RDAP and DNS](https://apify.com/bepolabs/domain-rdap) | Domains to registrar, creation and expiry dates, age, status, nameservers, DNSSEC and DNS records from official RDAP, in bulk. |
| 📢 [Google Ads Transparency Scraper](https://apify.com/bepolabs/google-ads-transparency) | Every ad a company runs on Google, by domain, advertiser ID or name, from the Ads Transparency Center. |
| 📈 [Google Trends Scraper](https://apify.com/bepolabs/google-trends) | Interest over time for up to five keywords on one 0 to 100 scale, any country or worldwide, plus top and rising related queries. |

# Changelog

This Actor's version history is a separate document: https://apify.com/bepolabs/npm-pypi/changelog.md

# Actor input Schema

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

Package names, one per line. Prefix with npm: or pypi: (npm:react, pypi:requests), paste a npmjs.com or pypi.org package URL, or write the bare name to use the default registry below. Scoped npm names (@types/node) work.

## `defaultRegistry` (type: `string`):

Registry for names without an npm: or pypi: prefix.

## `npmSearches` (type: `array`):

Words to search on npm, e.g. markdown parser; every package found gets a full row. PyPI has no search API, so PyPI packages are given by name.

## `maxSearchResults` (type: `integer`):

How many packages each npm search returns, ranked by relevance.

## `includeDownloads` (type: `boolean`):

Add weekly and monthly download counts (npm download API, pypistats.org for PyPI).

## `includeVersionList` (type: `boolean`):

Add the last 20 versions with their release dates to each row.

## `maxRetries` (type: `integer`):

Retries per request on timeouts, rate limits and server errors.

## Actor input object example

```json
{
  "packages": [
    "react",
    "pypi:requests"
  ],
  "defaultRegistry": "npm",
  "maxSearchResults": 20,
  "includeDownloads": true,
  "includeVersionList": false,
  "maxRetries": 3
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items, one row per result, in the overview table view.

# 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 = {
    "packages": [
        "react",
        "pypi:requests"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bepolabs/npm-pypi").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 = { "packages": [
        "react",
        "pypi:requests",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bepolabs/npm-pypi").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 '{
  "packages": [
    "react",
    "pypi:requests"
  ]
}' |
apify call bepolabs/npm-pypi --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bepolabs/npm-pypi"
        }
    }
}
```

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/k04CXeuYg6sawHQc2/builds/K3ofnaxldgXiYPn5T/openapi.json
