npm already exposes raw download counts on its registry API. That integer is useful and it is a different type from a Google 0-100. Trends API takes source npm and the exact package name. The response has a 0-100 value and, when present, absolute volume. The name is case-sensitive. Scoped packages keep @. body is a JSON string and must be parsed a second time. Docs: the API reference. npm notes: the npm guide. Caps: pricing.

api.npmjs.org returns raw counts

The registry download endpoints are the right tool for a report that must say "this many installs this week." They are the wrong tool when the next join is TikTok or Google on one axis. Do not divide a raw weekly count by an invented constant and call it a score.

source npm is case-sensitive

POST https://api.trendsapi.ai/api
Authorization: Bearer <api_key>
Content-Type: application/json

{"mode":"get_growth","source":"npm","keyword":"react","percent_growth":["3M","12M"]}

Right: react, @babel/core. Wrong: React, React.js. A live pull on 2026-08-27 for react returned 3M growth of -20.79 percent (59.8 vs 75.5) with recent_volume 102693207, and 12M growth of +112.81 percent (59.8 vs 28.1) with baseline_volume 49473446. recent_date on those rows was 2026-08-29.

Scoped names keep the at-sign

@babel/core is one keyword. Dropping @ or splitting on / looks up a different package. If the inner payload is empty, the name is wrong. Open the npm page and copy the install string.

Score 59.8 versus 102 million downloads

59.8 is the normalized score. 102693207 is volume. Charts that plot both on one axis will lie. Put score on the axis that already holds Google and PyPI. Put volume on a second axis or a tooltip. The product MCP server at https://api.trendsapi.ai/mcp uses the same source string npm.