npm API

The npm API here searches the public npm registry and returns one typed row per package — name, latest version, description, declared keywords, license, last publisher, homepage and repository links, the last-publish date, the registry's own quality score and the weekly and monthly download counts, plus a dependents count.

It reads the registry's public search endpoint, so there is no npm token and no auth to manage. npm's search is generous and rarely the bottleneck, so for a single lookup you can curl it yourself. Where this pays off is pulling hundreds of packages into one table — the collector merges the search result with the download and quality signals into a flat row, which otherwise means stitching two or three registry endpoints together per package.

$0.0003 per delivered package, up to 100 packages per run. Nothing delivered means nothing charged.

How the npm API works

You pass a query — a package name, a keyword, an author: qualifier or a scope — and get back the ranked search result, enriched. Each row carries the registry quality_score (0–1) and the downloads_weekly/downloads_monthly figures alongside the basic manifest fields.

Inputs

query is required and accepts npm's search grammar — bare text, keywords:, author:, scope filters and so on. max_results caps delivery at 100 packages; you are billed only for packages returned.

What one package looks like

Each row is a package. version is the latest published version and published_at its date; quality_score is the registry's composite 0–1 score; downloads_weekly and downloads_monthly are the popularity signals; dependents counts packages that depend on it. keywords is an array, and npm_url is the canonical npmjs.com page.

What the npm API costs

$0.0003 per delivered package ($0.30 per 1,000). Nothing delivered means nothing charged, and the $2 monthly free credit covers roughly 6,666 packages here. Volume tiers take up to 30% off.

$0.0003 per delivered package — $0.30 per 1,000 — no subscription. The $2/month free allowance is about 6,600 packages with no card.

A search that returns fewer packages than your max_results cap bills for the smaller number. Pairing it with the PyPI API lets you cover both ecosystems on one key and one schema.

npm API vs the npm registry directly

The npm registry API is public, keyless and has a high enough ceiling that most people never hit it — so for interactive use, call it directly. We are not pretending there is a paywall to jump.

The collector's job is consolidation. npm splits search, download stats and quality across endpoints; a comparison of two hundred packages means two hundred sets of joined calls plus a normaliser. This returns the merged, typed row in one place, in the same shape as the rest of your pipeline — that is what you are buying, not access.

Versus stitching the registry endpoints yourself

The DIY version is a search call, a downloads call and a manifest read per package, joined on name and cleaned into rows. It works; it is just boilerplate you now own and maintain as the registry evolves.

If you would rather run your own registry client but want stable, rotating exits under a very large crawl, our residential proxies are the same network this collector uses.

What people build with it

Dependency due diligence

Score a shortlist of candidate packages on downloads_weekly, dependents, quality_score and published_at to tell a maintained, widely used library from an abandoned one.

Ecosystem and competitor mapping

Search a keyword or scope to enumerate the packages in a space, then rank by downloads to see who owns mindshare.

License and supply-chain audits

Pull license and repository across your dependency set to flag missing or non-permissive licenses without opening each npmjs.com page.

Limits, freshness and the legal bit

One run delivers up to 100 packages. Download counts follow the registry's own reporting cadence, so weekly and monthly figures lag exactly the way npmjs.com does. Runs parallelise up to your plan's rate limit (60–1,200 requests/minute by tier).

Registry metadata is public, and package licenses govern the code itself rather than the metadata; how you use the collected data downstream is on you. This is not legal advice.

FAQ

Is the npm API free?

The npm registry API is free and keyless with a high ceiling, so use it directly for small jobs. This collector adds a merged, typed schema and rotating exits for scale, plus its own $2/month free allowance — around 6,600 packages — with no card.

Do I need an npm token or API key?

No. Reads go through the public registry search, so there is no npm token, login or two-factor step. Your QuantumProxies key is the only credential.

Does it return download counts?

Yes. Every row carries downloads_weekly and downloads_monthly, joined onto the search result so you do not have to call the downloads endpoint separately.

What about the npm rate limit?

The registry meters per IP. The collector spreads requests across residential exits so a large sweep does not stall one address, while still respecting the registry's limits rather than defeating them.

Related scrapers