npm

List npm package versions

List an npm package's versions newest first, with publication time, deprecation, provenance, integrity and sizes.

GET/v1/npm/package/versions
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
3
namestringrequiredquery

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

limitintegeroptionalquery

Versions per page, 1 to 200. Default: 100.

≥ 1 · ≤ 200

cursorstringoptionalquery

Cursor from `page.nextCursor` of the previous response. It only continues the same lookup and filters.

min 1 chars · max 2048 chars

Response fields
26

Endpoint-specific response payload.

datalookupStatus
string

Whether the item exists. Every outcome is HTTP 200; branch on this field.

one of: found, not_found

dataname
string

Package name.

A page of versions, newest first.

dataversions[]version
string

Version.

dataversions[]publishedAt
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

dataversions[]deprecated
stringnullable

Deprecation message, or null.

dataversions[]hasProvenance
boolean

Whether the version carries a provenance attestation.

dataversions[]integrity
stringnullable

Tarball integrity hash.

dataversions[]unpackedSize
integernullable

Unpacked bytes.

≥ 0

dataversions[]fileCount
integernullable

Files in the tarball.

≥ 0

dataversionCount
integer

How many versions the package has.

≥ 0

What was unpublished; present on a tombstone.

dataunpublishedat
stringnullable

ISO 8601 UTC timestamp, or null when npm has none.

Versions that were unpublished.

dataunpublishedversions[]
stringoptional

Pagination state for this page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Opaque cursor for the next request; null on the last page.

datapagepage
integeroptional

The 1-based page number of this response, when numbered.

≥ 0

datapageperPage
integeroptional

Rows per page, when fixed.

≥ 0

datapagetotal
integernullableoptional

Total rows, or null when npm does not publish one.

≥ 0

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/npm/package/versions?name=express" \
  -H "x-api-key: YOUR_API_KEY"

Responses

npm versions.