Documentation Python quickstart Blog Free tools Enterprise solutions hello@quanticdata.ioLog in
All collectors

npm registry API

Developers & tech · v1.1.0 · npm_packages

$0.0003 / package

$0.24 / 1K · pay per delivered package

An npm registry API that turns a search into structured rows: package name, latest version, description, keywords, SPDX license, publisher, homepage and repository links, the last-publish date, the registry's own quality score and the weekly and monthly download counts. One query — a name, a keyword, an author: or a scope — and the ranked list comes back typed.

$0.0003 per delivered package · $2 free every month · Failed runs never billed

What it does

What a npm registry API does

Reading npm properly means talking to two services: the registry search endpoint for metadata and the downloads API for install counts, then stitching them together per package. This collector reads the registry's own public search endpoint — the one npmjs.com is built on — and hands back the merged row, with the quality score and download figures already attached, so popularity and health arrive in the same object as the name and version.

The fields are the ones you actually rank on: downloads_weekly and downloads_monthly as integers, quality_score as the registry's 0-to-1 number, dependents as a count, and license as an SPDX string. That is enough to sort a shortlist by real adoption, screen out unmaintained or awkwardly-licensed packages, and do it without a token or a rate ceiling to keep under.

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
querystringyesSearch text — package name, keyword, author:… or scope.
max_resultsintegernoHow many packages to deliver at most (1–100). You pay only for delivered packages.

Outputs — 21 fields, one row per package

What one package looks like

Every delivered package carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankinteger1-based position.
namestringPackage name.
versionstring · nullableLatest version.
descriptionstring · nullablePackage description.
keywordsstring[]Declared keywords.
licensestring · nullableLicense (SPDX).
publisherstring · nullableLast publisher.
homepagestring · nullableHomepage URL.
repositorystring · nullableRepository URL.
npm_urlstringnpmjs.com package URL.
published_atstring · nullableLast publish (ISO 8601).
quality_scorenumber · nullableRegistry quality score 0–1.
downloads_weeklyinteger · nullableWeekly downloads.
downloads_monthlyinteger · nullableMonthly downloads.
dependentsinteger · nullableDependent packages.
maintainersstring[]Maintainer usernames.
bugs_urlstring · nullableIssue tracker URL.
popularity_scorenumber · nullableRegistry popularity score 0–1.
maintenance_scorenumber · nullableRegistry maintenance score 0–1.
search_scorenumber · nullableRelevance score of this result for the query.
insecurebooleanFlagged insecure by the registry.

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/npm_packages/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/npm_packages/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"react state management","max_results":20}'

Example response

POST /v1/scraper/collectors/npm_packages/run
$ curl $QD/npm_packages/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{"query": "react state management", "max_results": 20}'
{ "status": "done", "count": 20,
  "results": [
    {
      "name": "…",
      "version": "…",
      "description": "…",
      "keywords": […] } ],
  "cost": 0.006 }
# 20 packages × $0.0003 · nothing delivered, nothing charged

Try it

npm package search, running now

Change the input and run it against the live collector — nothing to install, no sign-up.

Run it from your own code, on your own inputs

Same collector, same rows — $2 of free API credit every month, no card.

Get my free API key
npm registry API: from query, QuanticData reads the npm search results and returns one row per package with name, version and description, at $0.0003 per delivered package.
You send query and max_results; the run reads the source and comes back as packages with rank, name and version — 21 fields on every row — and you are billed $0.0003 for each package actually delivered, nothing for a run that delivers none.
$0.0003 / package6,666 packages on the free $2 every month
Semantic inputquery, max_results — no URL lists
Up to 100packages per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

Pricing

npm registry API pricing

$0.0003 per delivered package. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 6,666 packages before you spend anything.

$0.0003per delivered package$0.24 per 1,000 delivered packages
6,666 packageson the free allowance$2 every month, no card
Zero rowszero chargeblocks, captchas and retries are on us
−30%on volume tiersthe catalog returns your key's price

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

What people build with the npm registry API

Three shapes of work this endpoint was designed around.

Package selection and due diligence

Search a capability, sort the field by weekly downloads and quality score, and the choice between competing libraries becomes a table instead of a comparison you assemble by hand.

Supply-chain and license auditing

Pull the license, publisher and dependent count for a set of packages and you can flag the ones whose license or maintenance status does not fit your policy.

Ecosystem monitoring

Track download momentum and last-publish dates for the packages in a niche over time, so a rising alternative or a stalling incumbent shows up in the numbers.

npm registry API versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
SourcesSearch API plus downloads API, joinedOne call, metadata and downloads merged
PopularityFetched and stitched separatelyWeekly and monthly counts on the row
AccessToken and rate limits to manageKeyless, no ceiling to track

What people search for

Live autocomplete demand around npm package search, pulled with our own Keyword ideas collector.

npm registry API: the POST to the npm_packages collector, 20 packages delivered and the bill, 20 × $0.0003 = $0.006 in usage.cost_usd; zero packages would cost $0.
The same call you would paste into a terminal: a Bearer key, query in the body, and back the envelope every QuanticData endpoint returns — type, message, payload — where count is how many packages arrived and usage.cost_usd is $0.006, which is 20 × $0.0003. A run that delivers nothing costs nothing. The key is good for 60 req/min on the free tier.

Sources and standards

The platform documentation and standards this collector is built against — check any claim on this page against the primary source:

FAQ

Questions we get about the npm registry API.

Something else? Ask us

Where do the numbers come from?

The registry's public search endpoint, the same source npmjs.com uses. The quality score is the registry's own final score from 0 to 1, and the weekly and monthly downloads are the registry's counts — so a run reflects what npm reports, not a metric we invent on top.

Can I search by author, scope or keyword, not just name?

Yes. The query accepts npm's search qualifiers — a plain term, author:name, a @scope, or keywords:web-scraping — and returns the ranked matches with version, license and download counts on each.

Does it return a package's dependency tree?

No. It returns per-package metadata for search and ranking — version, description, license, links, downloads, quality score and how many packages depend on it — not the resolved dependency graph or a per-version manifest.

Is there a free npm registry API?

Every account gets $2 of credit every month with no card, which is about 6,666 delivered packages on this endpoint at $0.0003 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

How much does one run cost?

Multiply the rows you actually receive by $0.0003. A run capped at 100 packages — the maximum for this collector — costs $0.03 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the npm registry API now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Run in dashboard
Illustration: three coloured zones of the page that is read (npm search results) turn into clean JSON with the fields name, version and description; 21 fields on every row.