> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/npm/package-versions>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/npm/package-versions.mdx>

---

# npm Versions API

Every version of a package, newest first, with the publication time, deprecation and tarball facts a release tracker needs.

`GET /v1/npm/package/versions?name=express` returns `data.versions`, one row per version with `version`, `publishedAt`, `deprecated`, `hasProvenance`, `integrity`, `unpackedSize` and `fileCount`. `data.versionCount` is the total the package reports, which is larger than the current page when `data.page.hasMore` is true.

The route keeps its own ordering by publication time, newest first, rather than the order of keys in the registry document. Page with `limit` (1 to 200, default 100) and `page.nextCursor`; the cursor is opaque and only continues the same package. A package whose every version was unpublished returns `found` with `data.versionCount: 0` and the `unpublished` record, so a tombstone is visible instead of looking like a missing package.

## Request

- **Endpoint:** `GET /v1/npm/package/versions`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by package name
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/npm/package/versions/get)
- **Platform page:** [/platforms/npm](https://www.socialfetch.dev/platforms/npm)

## FAQ

### What does each version row contain?

version, publishedAt, deprecated, hasProvenance, integrity, unpackedSize and fileCount. The row is the summary; use GET /v1/npm/package/version for the full version document of one entry.

### How do I fetch the next page?

Start with limit and no cursor, then pass data.page.nextCursor as cursor while data.page.hasMore is true. The cursor holds the position and the package, so do not mix it with another name. Each page is a separate request.

### What happens for a package with no versions left?

The response is found with data.versions: [], data.versionCount: 0 and data.unpublished set. That is a tombstone, not a missing package. A name npm has never had returns lookupStatus not_found instead.

### Is the list in registry key order?

No. The route sorts versions by publication time, newest first, so a release feed reads in the order people expect. Version strings are not used for the order because npm does not publish a reliable sort key in the document.

### What does the request cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
