Overview
The npm Registry API exposes package metadata for every module published to the npm ecosystem, including version history, author information, download counts, and README content. It requires no authentication for read-only queries and is the same API powering the npmjs.com website. Developers use it to build package search tools, dependency analyzers, and security audit dashboards.
Beginner Tip
No API key or sign-up is required. Fetch metadata for any package by calling https://registry.npmjs.org/{package-name} — for example, https://registry.npmjs.org/lodash. The response is a large document; focus on the "dist-tags.latest" field to get the current version, then look under "versions[latest]" for that version's details.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://registry.npmjs.org/lodash/latest
- Result
- HTTP 200 · application/json · 1,669 bytes · compressed
- Response time
- 44 ms (median of 3) · fastest 33 ms
- Transport
- TLSv1.2 · ECDHE-ECDSA-AES128-GCM-SHA256 · certificate issued by Google Trust Services
- Browser CORS
- Allowed — Access-Control-Allow-Origin: *
- Served by
- cloudflare
- Recorded
- 2026-08-10
Fields Returned
Top-level fields present in the response we captured, with the type and value we actually received.
| Field | Type | Value received |
|---|---|---|
| bugs | object | {1 fields} |
| dist | object | {6 fields} |
| icon | string (url) | https://lodash.com/icon.svg |
| main | string | lodash.js |
| name | string | lodash |
| author | object | {2 fields} |
| gitHead | string | 4f0b76e2eca13de1c1fe8b4305abc1f7d63f4b86 |
| license | string | MIT |
| scripts | object | {1 fields} |
| _npmUser | object | {2 fields} |
| homepage | string (url) | https://lodash.com/ |
| keywords | array | [1 item] |
| repository | object | {2 fields} |
| _npmVersion | string | 10.9.4 |
Captured Response
Captured from a real request to https://registry.npmjs.org/lodash/latest on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"bugs": {
"url": "https://github.com/lodash/lodash/issues"
},
"dist": {
"shasum": "ff2b66c1f6326d59513de2407bf881439812771c",
"tarball": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
"fileCount": 1051,
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
"signatures": [
{
"…": "(2 more fields)"
}
],
"unpackedSize": 1413741
},
"icon": "https://lodash.com/icon.svg",
"main": "lodash.js",
"name": "lodash",
"author": {
"name": "John-David Dalton",
"email": "[email protected]"
},
"gitHead": "4f0b76e2eca13de1c1fe8b4305abc1f7d63f4b86",
"license": "MIT",
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\""
},
"_npmUser": {
"name": "jdalton",
"email": "[email protected]"
},
"homepage": "https://lodash.com/",
"keywords": [
"modules"
],
"repository": {
"url": "git+https://github.com/lodash/lodash.git",
"type": "git"
},
"_npmVersion": "10.9.4",
"…": "(9 more fields)"
} Field Reference
name The exact npm package name. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://github.com/npm/registry/blob/master/docs/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
{
"code": "ResourceNotFound",
"message": "/lodash/latest/apisscore-nonexistent-path does not exist"
} Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Similar APIs
View All →24 Pull Requests
⭐ Beginner's Pick24 Pull Requests is a community initiative that runs every December to encourage developers to contribute to open source projects.
Agify.io
⭐ Beginner's PickAgify.io is a free API that predicts the likely age of a person based solely on their first name, using a database of over 350 million historical records.
API Grátis
API Grátis is a Brazilian API aggregator that bundles multiple free utility services including CEP (postal code) lookup, CNPJ (company registry) data, vehicle plate information, and more — all under a single authentication token.
ApicAgent
⭐ Beginner's PickApicAgent parses User-Agent strings into structured device and browser information, returning details like browser name, version, OS, device type, and whether the client is a bot.
APIs.guru
⭐ Beginner's PickAPIs.guru maintains a crowd-sourced directory of OpenAPI (Swagger) specification files for hundreds of public web APIs, all normalized to OpenAPI 3.0 format.