npm Registry

Developer Tools · No API Key Required · Works Globally

TL;DR

What it does: Query any npm package (like express, react, lodash) and get its metadata, versions, dependencies, maintainers, source repo, and downloads.

Quick start: https://registry.npmjs.org/express/latest

No API key needed - just call the URL

Overview

The npm Registry API lets you query any package published to the npm registry. Get the latest version info, all available versions, dependencies, maintainer lists, repository links, and more. The API follows a RESTful pattern where you construct URLs using package names. No authentication is required for read-only queries, making it perfect for tools, scripts, and websites that need npm package data.

Live Example

Here's the exact URL to call and the real response you'll get:

The URL to call (express latest version):

https://registry.npmjs.org/express/latest
Try This URL Now →

The actual response you get:

{
  "name": "express",
  "version": "5.2.1",
  "description": "Fast, unopinionated, minimalist web framework",
  "keywords": ["express","framework","sinatra","web","http","rest","restful","router","app","api"],
  "license": "MIT",
  "author": {
    "name": "TJ Holowaychuk",
    "email": "tj@vision-media.ca"
  },
  "homepage": "https://expressjs.com/",
  "repository": {
    "url": "git+https://github.com/expressjs/express.git",
    "type": "git"
  },
  "maintainers": [
    {"name": "wesleytodd", "email": "wes@wesleytodd.com"},
    {"name": "jonchurch", "email": "npm@jonchurch.com"}
  ]
}

What does this data mean?

Express 5.2.1: A popular web framework for Node.js, MIT licensed, maintained by wesleytodd and jonchurch.

name
The package name (e.g., "express") - this is how you install it via npm install express
version
The latest version number (e.g., "5.2.1") following semantic versioning
description
A brief summary of what the package does - used in search results and npm listings
keywords
Searchable tags that help users discover the package (e.g., "framework", "web", "api")
license
The software license (e.g., "MIT") - tells you how you can legally use the package
author
The original creator of the package (name and email)
homepage
The official website or documentation URL for the package
repository
The source code repository URL (usually GitHub) where you can browse the code and report issues
maintainers
List of current maintainers with their npm usernames - these are the people who publish updates

How to use this API

JavaScript Example

// Get info about the latest version of express
const packageName = 'express';
const url = `https://registry.npmjs.org/${packageName}/latest`;

fetch(url)
  .then(res => res.json())
  .then(data => {
    console.log(`Package: ${data.name}`);
    console.log(`Version: ${data.version}`);
    console.log(`Description: ${data.description}`);
    console.log(`License: ${data.license}`);
    console.log(`Source: ${data.repository.url}`);
  });

Python Example

import requests

package = 'express'
url = f'https://registry.npmjs.org/{package}/latest'

response = requests.get(url)
data = response.json()

print(f"Package: {data['name']}")
print(f"Version: {data['version']}")
print(f"Description: {data['description']}")
print(f"License: {data['license']}")
print(f"Source: {data['repository']['url']}")

Frequently Asked Questions

Do I need an API key?
No! The npm Registry API is completely free and requires no API key or authentication for read-only queries. Just make HTTP requests to the registry URLs.
How do I search for packages?
Use the search endpoint: https://registry.npmjs.org/-/v1/search?text=react. You can also add &size=20 to control how many results you get and &from=20 for pagination.
How do I get all versions of a package?
Omit /latest from the URL: https://registry.npmjs.org/express returns the full package document with all versions, dependencies, dist-tags, and more metadata.
How do I get download counts?
npm has a separate downloads API: https://api.npmjs.org/downloads/point/last-week/express returns download counts for the last week. Replace last-week with last-month or last-year for different periods.
Is there a rate limit?
No official rate limit is documented. However, please be reasonable with your request volume and consider implementing caching for repeated queries.
Can I use this commercially?
Yes, the npm Registry API is free for both personal and commercial use. npm is maintained by GitHub/Microsoft and the registry data is publicly available.

API Details

Base URL
https://registry.npmjs.org/
Documentation
https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md
Category
Developer Tools
Authentication
None required - fully open
Rate Limit
None documented
Geographic Coverage
Global