Development — entry 061 of 98

npm Registry

Verified Jul 2026

The public npm registry (`registry.npmjs.org`) is a CouchDB-backed document store queried directly over plain JSON GETs — no key needed to read a package's full version history, dist-tags, dependencies, and tarball URLs, or to hit the `/-/v1/search` endpoint used by the npm CLI itself. The docs' old `master` branch link now redirects to `main`, the repo's current default branch, where the reference lives unchanged.

The public npm registry answers plain JSON GET requests. No key is needed. You can read a package's full version history, dist-tags, dependencies, and tarball URLs, or query the same search endpoint the npm CLI uses.

npmpackage-registrynodejsjavascript
AuthenticationNone requiredCall it straight away — no key, no signup.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSONResponses can be requested as JSON.

GreatAPIs Score

Score88out of 100
Authentication25/25No authentication required
Pricing20/20Free to use
Docs14/20Documentation URL provided
Formats9/15Single response format
Freshness20/20Verified within 6 months

Embed this badge

Scored 88 on greatapis.com
<a href="https://greatapis.com/api/npm-registry/"><img src="https://greatapis.com/badge/npm-registry.svg" alt="Scored 88 on greatapis.com"></a>

Auth quickstart

  1. No API key required for read access. Requests are public and keyless.
Stored keyNo key stored

Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.

Fetch a package's latest version metadata

GEThttps://registry.npmjs.org/left-pad/latest

200 application/json

{
  "name": "left-pad",
  "version": "1.3.0",
  "description": "String left pad",
  "deprecated": "use String.prototype.padStart()",
  "license": "WTFPL",
  "dist": {
    "tarball": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
    "shasum": "5b8a3a7765dfe001261dde915589e782f8c94d1e"
  }
}

The live response includes more fields (maintainers, keywords, npm internals); the excerpt above trims to the fields most quickstarts need.

Developer reference

Gotchas & limits

  • A deprecated package still returns HTTP 200 with a deprecated field carrying the maintainer's message — check for that field, since the request itself never fails
  • An unknown package returns HTTP 404, but the body depends on the path. /<name>/latest returns only the JSON string "Not Found". /<name> returns {"error":"Not found"}
  • /-/v1/search?text=<query> ranks by relevance, not by exact name. A live search for left-pad did not return left-pad in the top 20 results. The first hits were pad-left, lpad, and lpad-align. For an exact lookup, call /<name>/latest directly