# npm & PyPI Package Stats – Downloads, Versions & Metadata

Download counts (daily, weekly, monthly and 12-month history), latest version, license, repository, maintainers, dependencies and release dates for any npm or PyPI package, plus npm search. Compare libraries in one call.

$0.40 per 1,000 packages

[Get an API key](https://pushbuild.com/apis/app/signup?api=npm-pypi-package-stats)

Example request

```
POST /npm-pypi-package-stats/run
{
  "npmPackages": [
    "react",
    "vue"
  ],
  "pypiPackages": [
    "requests",
    "httpx"
  ],
  "maxItems": 20
}
```

## What a response looks like

POST /npm-pypi-package-stats/run{"maxItems": 5, "npmPackages": ["react", "vue"], "pypiPackages": ["requests", "httpx"]}

```
{"count": 4, "items": [{ "author": null, "created": "2011-10-26T17:46:21.942Z", "dependencies": 0, "description": "React is a JavaScript library for building user int… "homepage": "https://react.dev/", "keywords": [  "react" ], "lastPublished": "2026-10-14T16:47:15.290Z", "latestVersion": "19.3.1", … ]}
```

`dependencies` by `description` in this sample response

| author | created | dependencies | description | homepage | lastPublished |
| --- | --- | --- | --- | --- | --- |
|  | 2011-10-26T17:46:21.942Z | 0 | React is a JavaScript library for building use… | https://react.dev/ | 2026-10-14T16:47:15.290Z |
| Evan You | 2013-12-07T06:09:46.299Z | 5 | The progressive JavaScript framework for build… | https://vuejs.org/ | 2026-11-05T09:16:21.383Z |
| Kenneth Reitz <me@kennethreitz.org> |  | 6 | Python HTTP for Humans. |  | 2026-05-14T19:25:26.443000Z |
| Tom Christie <tom@tomchristie.com> |  | 12 | The next generation HTTP client. | https://github.com/encode/httpx | 2024-12-06T15:37:21.509172Z |

Real rows returned by this API on 2026-11-09 for the request shown.

## What it returns

Compare open-source packages across npm and PyPI in one call.

## Common uses

Library selection, developer-tool market research, competitor tracking for dev products, dashboards. Pay per package.

## Request

`POST https://api.pushbuild.com/npm-pypi-package-stats/run` with a JSON body. Send your key in the `X-API-Key` header.

| Field | Type | Description |
| --- | --- | --- |
| `npmPackages` | list of strings | Package names, scoped ones too (@types/node). |
| `pypiPackages` | list of strings | Python package names. |
| `npmSearch` | string | Find npm packages by keyword and return stats for the top results. |
| `maxSearchResults` | integer | Packages to return from the npm search. Default: `20`. |
| `includeHistory` | boolean | Add downloads per month for about the last year (npm) or 6 months (PyPI). Default: `false`. |
| `maxItems` | integer | Maximum items to return (1-500). Default: `100`. |

### Example

```
curl -X POST https://api.pushbuild.com/npm-pypi-package-stats/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"npmPackages": ["react", "vue"], "pypiPackages": ["requests", "httpx"], "maxItems": 20}'
```

### Response

```
{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}
```

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

## Pricing

Pay only for results returned: $0.40 per 1,000 packages. No charge for errors or empty searches.

| Packages | Cost |
| --- | --- |
| 1,000 | $0.40 |
| 10,000 | $4.00 |
| 100,000 | $40.00 |
| 1,000,000 | $400.00 |
| 2,500 a month | Free ($1 monthly credit) |

## Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: `https://api.pushbuild.com/mcp/npm-pypi-package-stats`. Add it to any assistant that supports remote MCP servers, with your key in the `X-API-Key` header. Same prices. [Setup for each app](https://pushbuild.com/apis/mcp.html).

## Related APIs

- [Package Stats API](https://pushbuild.com/apis/package-registry-stats.html): Download counts and metadata for PHP packages on Packagist, Ruby gems on RubyGems and .NET packages on NuGet: total, monthly and daily downloads, latest version, description, license and repository link..
- [crates.io API](https://pushbuild.com/apis/crates-io-stats.html): Rust crate data from the crates.io registry: total and 90-day downloads, latest version, created and updated dates, repository, homepage, documentation, keywords and categories.
- [GitHub Repo Stats API: Stars, Forks, Releases, Contributors API](https://pushbuild.com/apis/github-repo-stats.html): Stats for GitHub repositories: stars, forks, watchers, open issues, languages, topics, license, latest release, contributor count and last push.
- [Docker Hub API](https://pushbuild.com/apis/docker-hub-stats.html): Docker Hub repository stats for any public image: total pulls, stars, last update, creation date, description, official flag and categories, plus recent tags with update time, compressed size and architectures.
- [NYC 311 API](https://pushbuild.com/apis/nyc-311-requests.html): NYC 311 service requests from NYC Open Data: noise, heat and hot water, illegal parking, rodents, potholes and every other complaint type, with agency, status, resolution, address, ZIP, borough, community board and coordinates..
- [NFL Play-by-Play & Results API](https://pushbuild.com/apis/nfl-play-by-play.html): Every NFL game and play since 1999, including the current season, updated daily.

## Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

[hello@pushbuild.com](mailto:hello@pushbuild.com?subject=API%20question)

## New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

---
As of 2026-12-03. Source: https://pushbuild.com/apis/npm-pypi-package-stats.html
