npm and PyPI Package Scraper: Downloads, Versions, Licenses
Pricing
from $0.60 / 1,000 npm packages
npm and PyPI Package Scraper: Downloads, Versions, Licenses
Scrape npm and PyPI packages by name or keyword: latest version, description, license, maintainers, repository, homepage, keywords, dependency counts, release dates, release count, weekly and monthly downloads. Official public APIs, no login.
Pricing
from $0.60 / 1,000 npm packages
Rating
0.0
(0)
Developer
ZH Tech
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
12 hours ago
Last modified
Features
Share
npm and PyPI Package Scraper: downloads, versions, licenses and maintainers
Scrape npm and PyPI packages by name or by keyword and get one clean row per package: latest version, description, license, author, maintainers, repository URL, homepage, keywords, dependency counts, latest release date, release count, release history, weekly and monthly downloads and links. npm rows also carry security and maintenance signals: deprecated flag, install scripts, provenance, last publisher, days since the last release, package size and Node engine.
The actor uses only the official public APIs of the registries (registry.npmjs.org, api.npmjs.org, pypistats.org) and the public PyPI release feeds. No login, no API key, no browser, no proxy needed. It checks robots.txt of every host on every run and stays within each registry's terms, which matters if you use the data for security reviews or procurement.
What can this npm and PyPI scraper do?
| You give it | You get |
|---|---|
Package names (npm:express, npm:@types/node, pypi:requests, plain names, npmjs.com or pypi.org links, even requests==2.31 or express@4) | One row per package with metadata, release dates and download counts |
npm search keywords, with npm qualifiers (keywords:scraper, author:..., maintainer:..., scope:types, not:deprecated) | The best matching npm packages, up to 5,000 per keyword, with weekly and monthly downloads, dependents count and search score |
| PyPI keywords | Up to 20 PyPI packages whose name starts with the keyword (see the FAQ for why) |
| A minimum weekly downloads value | Only packages above it. Skipped packages are free |
Every row has type, ecosystem (npm or pypi), name, version, description, license, authorName, maintainers, maintainersCount, repositoryUrl, homepage, bugsUrl, keywords, dependenciesCount, latestReleaseDate, lastPublishDate, firstReleaseDate, daysSinceLastRelease, releaseCount, releaseCountCapped, weeklyDownloads, monthlyDownloads, releaseHistory, packageUrl, links, input, scrapedAt.
npm rows add devDependenciesCount, peerDependenciesCount, optionalDependenciesCount, distTags, deprecated, deprecationMessage, hasInstallScripts, installScripts, hasProvenance, typesIncluded, moduleType, nodeEngine, unpackedSize, fileCount, funding, scope, lastPublisher, authorUrl, and for search results dependentsCount and searchScore. Optional: dependencies and peerDependencies with version ranges, authorEmail and maintainerEmails.
PyPI rows add normalizedName, latestUploadVersion (newest upload, which can be a pre-release), downloadsLastDay, oldestReleaseInFeedDate and prereleaseCountInFeed.
Why this actor
- Two registries, one schema. npm and PyPI rows share the same field names, so you can sort, filter and chart them together. Mixed lists work:
npm:react,pypi:numpyanddjangoin the same run. - Security audit signals. Find deprecated packages, packages that run
preinstall,installorpostinstallscripts, packages published with npm provenance, packages nobody has released in years, and who published the last version. - Fast bulk downloads. npm download counts are fetched for up to 128 packages per request, so lists of thousands of packages stay quick and light on npm.
- Honest search. npm search is the registry's own search with all its qualifiers. PyPI has no search that its robots.txt allows, so the PyPI keyword option is clearly a name prefix search instead of a silent surprise.
- Compliant by design. Only documented public APIs and paths that robots.txt allows. The actor does not automate the npmjs.com website, does not call PyPI endpoints its robots.txt disallows, and never collects PyPI emails.
- Fair billing. Error rows, packages that do not exist, unpublished packages, duplicates and packages below your download filter are never charged. Invalid input stops the run before the start fee.
Use cases
- Dependency and security audits: check a list of dependencies for deprecation, install scripts, stale releases, missing repository links, licenses and maintainer count.
- Developer tools research and market sizing: compare libraries in a category by weekly downloads, release cadence and dependents, for example every npm package with the keyword
web-scraping. - Lead generation for dev tool companies: find popular packages in your niche and their public repository and homepage links. Maintainer emails are available for npm only, off by default, see the privacy note below.
- Release monitoring: schedule a daily run over your watch list and alert on a new
version, a newdeprecatedflag or a jump in downloads. - Open source program offices and investors: track adoption of projects over time with weekly and monthly download snapshots.
- AI agents and RAG: give an LLM fresh, structured package facts instead of stale training data.
How to use
- Put package names in Package names, one per line. Use
npm:orpypi:to pick the registry, or just the name. - Or add Search keywords and set Max packages per keyword.
- Pick the Ecosystem: npm and PyPI, npm only, or PyPI only.
- Optionally set Minimum weekly downloads, the number of Versions in release history, the dependency list or maintainer emails (npm).
- Click Start. Results appear in the Packages, Security and maintenance and Errors views and can be exported as JSON, CSV, Excel or XML.
Input examples
The prefilled example, 6 npm and 6 PyPI packages:
{"packages": ["npm:react", "npm:express", "npm:axios", "npm:zod", "npm:lodash", "npm:chalk","pypi:requests", "pypi:fastapi", "pypi:numpy", "pypi:pandas", "pypi:django", "pypi:flask"]}
The 300 most relevant non deprecated npm packages tagged web-scraping, keeping only those with at least 1,000 weekly downloads:
{"ecosystem": "npm","searchKeywords": ["keywords:web-scraping not:deprecated"],"maxSearchResults": 300,"minWeeklyDownloads": 1000}
Dependency audit of a package.json, with the dependency lists:
{"packages": ["express", "lodash", "left-pad", "request", "@types/node", "esbuild"],"ecosystem": "npm","includeDependencyList": true,"releaseHistoryLimit": 3}
PyPI packages plus a PyPI name search:
{"packages": ["requests", "scikit-learn", "Pillow", "torch"],"ecosystem": "pypi","searchKeywords": ["fastapi"],"maxSearchResults": 20}
Output examples
An npm row (maintainers and dist tags shortened):
{"type": "package","ecosystem": "npm","name": "typescript","version": "7.0.2","description": "TypeScript is a language for application scale JavaScript development","license": "Apache-2.0","authorName": "Microsoft Corp.","maintainers": ["microsoft1es", "typescript-bot", "typescript-deploys", "microsoft-oss-releases", "..."],"maintainersCount": 7,"lastPublisher": "microsoft1es","repositoryUrl": "https://github.com/microsoft/TypeScript","homepage": "https://www.typescriptlang.org/","bugsUrl": "https://github.com/microsoft/TypeScript/issues","keywords": ["TypeScript", "Microsoft", "compiler", "language", "javascript"],"dependenciesCount": 20,"devDependenciesCount": 0,"peerDependenciesCount": 0,"optionalDependenciesCount": 20,"latestReleaseDate": "2026-07-08T15:55:18.431Z","lastPublishDate": "2026-11-21T08:11:51.008Z","firstReleaseDate": "2012-10-01T15:35:39.553Z","daysSinceLastRelease": 136,"releaseCount": 3892,"releaseCountCapped": false,"distTags": { "latest": "7.0.2", "beta": "7.1.0-beta", "next": "7.1.0-dev.20261121.1" },"deprecated": false,"deprecationMessage": null,"hasInstallScripts": false,"installScripts": [],"hasProvenance": false,"moduleType": "module","nodeEngine": ">=16.20.0","unpackedSize": 2497498,"fileCount": 416,"weeklyDownloads": 450660908,"monthlyDownloads": 1818994830,"releaseHistory": [{ "version": "7.1.0-dev.20261121.1", "date": "2026-11-21T08:11:51.008Z", "prerelease": true, "deprecated": false },{ "version": "7.1.0-dev.20261120.1", "date": "2026-11-20T08:08:34.751Z", "prerelease": true, "deprecated": false }],"packageUrl": "https://www.npmjs.com/package/typescript","links": {"npm": "https://www.npmjs.com/package/typescript","registry": "https://registry.npmjs.org/typescript","repository": "https://github.com/microsoft/TypeScript","homepage": "https://www.typescriptlang.org/","bugs": "https://github.com/microsoft/TypeScript/issues","tarball": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz","downloadsApi": "https://api.npmjs.org/downloads/point/last-week/typescript"},"input": "npm:typescript","scrapedAt": "2026-11-22T01:52:29.408Z"}
A PyPI row:
{"type": "package","ecosystem": "pypi","name": "fastapi","normalizedName": "fastapi","version": "0.165.0","latestUploadVersion": "0.165.0","description": "FastAPI framework, high performance, easy to learn, fast to code, ready for production","license": null,"maintainers": null,"repositoryUrl": null,"dependenciesCount": null,"latestReleaseDate": "2026-11-18T19:15:35.000Z","lastPublishDate": "2026-11-18T19:15:35.000Z","firstReleaseDate": null,"oldestReleaseInFeedDate": "2026-10-19T09:48:53.000Z","daysSinceLastRelease": 3,"releaseCount": 40,"releaseCountCapped": true,"prereleaseCountInFeed": 0,"weeklyDownloads": 135580850,"monthlyDownloads": 546754401,"downloadsLastDay": 13707211,"releaseHistory": [{ "version": "0.165.0", "date": "2026-11-18T19:15:35.000Z", "prerelease": false },{ "version": "0.164.0", "date": "2026-11-18T13:09:07.000Z", "prerelease": false }],"packageUrl": "https://pypi.org/project/fastapi/","links": {"pypi": "https://pypi.org/project/fastapi/","releasesFeed": "https://pypi.org/rss/project/fastapi/releases.xml","pypistats": "https://pypistats.org/packages/fastapi","latestRelease": "https://pypi.org/project/fastapi/0.165.0/"},"input": "pypi:fastapi","scrapedAt": "2026-11-22T01:55:48.849Z"}
An error row (never charged):
{"type": "error","input": "npm:this-package-does-not-exist-zz9q","ecosystem": "npm","name": "this-package-does-not-exist-zz9q","errorCode": "NOT_FOUND","error": "No npm package named \"this-package-does-not-exist-zz9q\". Check the spelling; npm names are lowercase."}
Error codes: NOT_FOUND, UNPUBLISHED (npm name reserved but the code was removed), NO_RELEASES (PyPI project without releases), NO_RESULTS (a search keyword matched nothing), INVALID_INPUT, RATE_LIMITED, BLOCKED, PARSE_FAILED, ROBOTS_DISALLOWED, FAILED.
Field notes
- Latest version: npm uses the
latestdist tag. PyPI uses the newest stable release (version) and also gives the newest upload, which can be a pre-release (latestUploadVersion). - Release dates and counts: npm counts every published version and knows the first release date. PyPI release data comes from the project's public release feed, which lists the last 40 releases: below 40 the count and first release date are exact, at 40
releaseCountCappedis true andfirstReleaseDateis null (oldestReleaseInFeedDateshows how far the feed goes). - Downloads: npm numbers are from api.npmjs.org (last 7 and last 30 days). PyPI numbers are from pypistats.org, which is run by the Python Software Foundation, exclude known mirrors and include the last day. Both update once a day.
- PyPI license, maintainers, repository, homepage, keywords and dependencies are null. pypi.org/robots.txt disallows its JSON API for automated clients and its project pages show a bot challenge to scripts, so the actor does not read them. npm rows have all of these fields.
- Dependents count comes from npm search, so it is filled for rows found by a keyword.
- Repository URLs are normalized to browsable
https://links (git+https://...git,github:user/repoandgit@github.com:...all becomehttps://github.com/user/repo). - Install scripts lists the lifecycle scripts that run on
npm install(preinstall,install,postinstall). A package with these scripts runs code on your machine when installed, which is worth reviewing in a security audit. - typesIncluded means the latest version declares a
typesortypingsfield.
Privacy and emails
Maintainer emails are off by default. With Include maintainer emails (npm) on, the actor adds authorEmail and maintainerEmails exactly as the npm registry publicly lists them. If you use them, you are responsible for following privacy and anti spam laws such as GDPR, CCPA and CAN-SPAM: have a lawful basis, honour opt outs and do not send unsolicited bulk email. PyPI emails are never collected: PyPI's terms forbid using its data to sell users' personal information, for example to recruiters, headhunters or job boards.
Pricing
Pay per event, you only pay for what is delivered:
- Actor start: a small flat fee once per run.
- npm package: per npm package row.
- PyPI package: per PyPI package row (cheaper, the rows have fewer fields).
The current prices are on the Pricing tab. Never charged: error rows (not found, unpublished, no releases, invalid input, no search results), packages below your minimum weekly downloads, duplicates (the same package listed twice in different formats) and anything after your max total charge or Max results is reached.
Typical runs: the prefilled example is 1 start, 6 npm and 6 PyPI rows and takes about 10 seconds. A 300 package npm keyword search takes about 2 minutes.
Use with the API, integrations and AI agents
- API:
POST https://api.apify.com/v2/acts/zhtech~npm-pypi-package-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKENwith the JSON input as the body returns the rows in one call. Add&view=packages(orsecurity,errors) for one view. An input with onlysearchKeywordsruns just the search; an empty input{}runs the example package list. - Clients:
apify-clientfor JavaScript and Python. Example (JavaScript):await client.actor('zhtech/npm-pypi-package-scraper').call({ packages: ['npm:express', 'pypi:requests'] }). - Schedules and integrations: run it daily over a watch list and connect Google Sheets, Slack, a webhook, Zapier, Make or n8n to track versions and downloads.
- LLMs and MCP: the actor works as a tool through the Apify MCP server (mcp.apify.com), so Claude, ChatGPT, Cursor and other agents can look up current package versions, licenses and downloads on demand. Set a max total charge on the run to cap the cost.
FAQ
Do I need an npm or PyPI account or an API key? No. Everything comes from public, unauthenticated APIs and feeds.
Why does PyPI search only match the start of package names? pypi.org has no search the actor may use: its website search and JSON API are disallowed for automated clients in pypi.org/robots.txt, and the old XML-RPC search was switched off by PyPI in 2021. The actor uses the public search of pypistats.org, which returns up to 20 packages whose name starts with your keyword. For topic searches on PyPI, find the names elsewhere and paste them into Package names.
Why are some PyPI fields null when npm rows have them? Same reason: the PyPI endpoints that carry license, links and dependencies are disallowed by pypi.org/robots.txt or protected by a bot challenge, and this actor does not work around either. Versions, release dates, summaries and downloads are available.
What happens with a plain name like requests and Ecosystem set to both?
The actor looks it up on npm and on PyPI and saves a row for each registry where it exists (there is an npm package called requests too). An error row appears only if the name exists in neither. Use npm: or pypi: to pick one.
How fresh are the download numbers? npm and pypistats.org update once a day, soon after midnight UTC. Running more often than daily gives the same numbers.
How many packages can I scrape? Lists of thousands of npm packages work well; the actor reads about 4 npm package documents per second and fetches downloads for 128 packages at once. PyPI is read at about 1 package per second to respect pypistats.org's rate limit and its request to use the API for specific packages rather than for the whole index.
Is it legal to scrape npm and PyPI? The actor uses the registries' documented public APIs and public feeds at a polite rate, respects robots.txt and the published terms, and collects no PyPI personal data. You are responsible for how you use the data, especially any personal data such as maintainer emails, and for following the laws that apply to you.
Limitations
- PyPI rows have no license, author, maintainers, repository, homepage, keywords or dependencies (see the FAQ), and release history covers the last 40 releases.
- PyPI keyword search matches the start of package names only, at most 20 per keyword.
- npm search returns at most 5,000 packages per keyword in this actor; split broad topics into several keywords.
- Download numbers are daily aggregates from the registries and can differ from other trackers.
- Very large npm packages (several thousand versions) are a few MB each to read, so runs over many of them take a little longer.
Support
Found a wrong field, a package that does not parse, or need another data point? Open an issue on the Issues tab with the input you used and it will be looked at quickly.