> **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>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/npm/package.mdx>

---

# npm Package API

One package with its latest version, every dist-tag and last week's downloads, ready to store without walking a registry document.

`GET /v1/npm/package?name=express` returns `data.package`, the latest version document: `name`, `version`, `description`, `license`, `repository`, `maintainers`, `publisher`, `dependencies`, `scripts`, `dist` and the rest of the fields npm publishes. `data.distTags` maps every tag to its version, `data.latestVersion` names the version behind `latest`, and `data.downloads` carries `weekly`, `start` and `end` for the last counted week.

The three parts come from separate reads. When dist-tags or last week's downloads do not answer, the package still returns with `data.complete: false` and `data.missing` naming the part that was skipped. A package that does not exist returns `lookupStatus: not_found` with `data.package: null`; it is never an HTTP error.

## Request

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

## FAQ

### What is in data.package for a found package?

The latest version document: name, version, description, keywords, license, homepage, repository, author, maintainers, publisher, dependencies, scripts, entrypoints, tarball metadata, provenance availability and publication timestamps.

### What do complete and missing mean?

complete is false when an optional part (dist-tags or last week's downloads) was temporarily unavailable. missing lists the part, for example downloads. The main package document is still returned, and the response is still billed as one lookup.

### How do I look up a scoped package?

Pass the name with one slash, for example name=@types/node or name=@babel/core. Names are case-sensitive and the scope keeps its @ sign. Bad characters are refused with HTTP 400 before anything is looked up.

### 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.
