keyword source · npm

npm Trends API

Weekly download counts for any npm package as a normalized time series, with growth over 3M/6M/12M/5Y already computed. Adoption signals without rebuilding the npm downloads API plumbing.

get_growth · npm
# one POST, every source
POST https://api.trendsapi.ai/api
Authorization: Bearer YOUR_API_KEY

{ "mode": "get_growth",
  "source": "npm",
  "keyword": "zod",
  "percent_growth": ["3M", "12M"] }
200 OKnormalized 0-100
response
  {
    "search_term": "zod",
    "data_source": "npm",
    "results": [
      {
        "period": "3M",
        "growth": 9.7,
        "direction": "increase"
      },
      {
        "period": "12M",
        "growth": 63.2,
        "direction": "increase"
      }
    ]
  }
application/jsontimestamped
Why it exists

npm trend data, without the plumbing

npm's own downloads API returns raw counts for date ranges you specify, and that is where it stops. Trends API normalizes those counts to a 0-100 series, computes growth automatically, and returns the same response shape as Google, TikTok and every other source.

That normalization is what makes download data useful for decisions. Absolute counts differ by 100x between packages, but a rescaled adoption curve tells you at a glance whether a library is still growing or plateaued last year.

Use cases

What people build with it

Tech selection

Check whether a library is still growing before betting a codebase on it.

DevRel

Measure your package's adoption curve after launches and talks.

Dev-tool investing

Track ecosystem momentum across competing frameworks.

Engineering content

Back 'why we chose X' posts with download curves.

Comparison

How it compares

npm downloads APITrends API
Date-range plumbingmanualhandled
NormalizationDIY0-100 score, done
Growth ratescompute yourself3M/6M/12M/5Y built in
Compare vs other ecosystemsnosame scale as 14 other sources
Free tierfree, rate limited100 requests/month
Three modes, one endpoint
get_time_series

Historical trend series for a keyword on this source, normalized 0-100.

get_growth

Growth percentages over 3M / 6M / 12M / 5Y windows.

get_top_trends

21 live trending feeds across platforms, no keyword needed.

FAQ

Common questions

What npm data does Trends API provide?

Weekly download counts for any package as a normalized time series, plus growth percentages over 3M/6M/12M/5Y windows. Scoped packages like @tanstack/react-query work.

How is this different from api.npmjs.org/downloads?

npm's own API returns raw counts for date ranges you specify. Trends API normalizes those counts to 0-100, computes growth automatically, and returns the same response shape as Google, TikTok and every other source.

Can I compare two packages?

One call per package, then compare the normalized values. The 0-100 rescaling makes the comparison meaningful even when absolute download counts differ by 100x.

How fresh is the data?

Weekly series update as npm publishes new counts. Every response includes its own timestamp.

Does it work for scoped packages?

Yes. Pass the full name including the scope, for example @tanstack/react-query.

Keep exploring

Related trend sources

Start pulling npm trends in 60 seconds.

100 requests a month free. No credit card, no sales call. One key works for every source.

Get a free API key