Get npm downloads for every version
Get last week's npm downloads for every version of a package.
Headers
Get your API keyAPI key (`sfk_...`)
npm package name, e.g. `express`, `lodash.merge`, `@types/node` or `--file--1`. Names are case-sensitive (`Express` is a different package) and keep legacy punctuation such as a leading `-`.
max 214 chars
Endpoint-specific response payload.
Whether the item exists. Every outcome is HTTP 200; branch on this field.
one of: found, not_found
Package name.
Weekly downloads keyed by version. Only keys that are a real version or dist-tag are kept; an unknown package is `not_found`.
How many valid version keys the map has.
≥ 0
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/npm/package/downloads/versions?name=express" \
-H "x-api-key: YOUR_API_KEY"Responses
npm downloads by version.