npm
npm API reference: 18 endpoints for packages, downloads, versions, dependents and advisories. Per-endpoint credit prices and cURL examples.
npm packages, versions, downloads, dependents, advisories and provenance, plus users, orgs, search and the registry change feed.
Base path: /v1/npm/...
Quickstart
curl "https://api.insightsocial.app/v1/npm/org?name=babel" \
-H "x-api-key: $INSIGHTSOCIAL_API_KEY"Endpoints
1 of these is metered: the price depends on how much the call reads. See Credits.
Every endpoint here is beta: it returns the platform's own structure under our naming rules (snake_case keys, string ids, ISO times where the platform gives a timestamp), not a schema-2 entity, and its fields may change. See Beta endpoints.
| Endpoint | Credits | What it returns | Key parameters |
|---|---|---|---|
/org | 20 | Get an npm org or scope profile, including the type npm actually stores. Beta. | name |
/org/packages | 20 | List the packages an npm org or scope can publish, 25 per page. Beta. | name |
/package | 20 | Get an npm package's latest version, every dist-tag, publisher, dependencies and last week's downloads. Beta. | name |
/package/advisories | 20 | List the security advisories affecting an npm package version, or every version. Beta. | name |
/package/dependents | 20 | List packages that depend on an npm package, 36 per page; a page past the served list is empty. Beta. | name |
/package/details | 20 | Get npm package registry document with every version, README, stars and timestamps. Beta. | name |
/package/downloads | 20 | Get npm downloads for a package over a period or a day range, or the whole registry's total. Beta. | — |
/package/downloads/versions | 20 | Get last week's npm downloads for every version of a package. Beta. | name |
/package/provenance | 20 | Get the publish and SLSA provenance attestations attached to an npm version, decoded from their sigstore bundles. Beta. | name |
/package/version | 20 | Get one npm version document, by exact version or dist-tag, with its files, dependencies, scripts and registry metadata. Beta. | name, version |
/package/versions | 20 | List an npm package's versions newest first, with publication time, deprecation, provenance, integrity and sizes. Beta. | name |
/packages/downloads | 20–1600 | Get npm downloads for up to 128 package names in one call, one result per requested name. Beta. | names |
/packages/search | 20 | Search the npm registry by words and qualifiers, ranked by npm's search score; a page past the results is empty. Beta. | query |
/registry/changes | 20 | List npm registry changes from a sequence cursor, with deleted-document markers. Beta. | — |
/registry/packages | 20 | List npm package names in registry key order, with an opaque cursor. Beta. | — |
/registry/recent | 20 | List recent npm package updates, newest first, at most 50 items. Beta. | — |
/user | 20 | Get an npm user's profile: display name, GitHub handle, dates and package count. Beta. | username |
/user/packages | 20 | List the packages an npm user can publish, 25 per page. Beta. | username |