npm Registry API
registry.npmjs.org · Developer Tools
The npm public registry — package metadata, download statistics, version history, and dependency info for 2M+ JavaScript packages. Free, no API key required.
Authentication
Sample Requests
Get full metadata for the React package.
Hover any highlighted part to learn what it does
curl -X GET "https://registry.npmjs.org/react"
import requests
response = requests.get(
"https://registry.npmjs.org/react",
)
print(response.json())const url = 'https://registry.npmjs.org/react'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://registry.npmjs.org/react"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://registry.npmjs.org/react")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://registry.npmjs.org/react";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get the latest version of React.
Hover any highlighted part to learn what it does
curl -X GET "https://registry.npmjs.org/react/latest"
import requests
response = requests.get(
"https://registry.npmjs.org/react/latest",
)
print(response.json())const url = 'https://registry.npmjs.org/react/latest'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://registry.npmjs.org/react/latest"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://registry.npmjs.org/react/latest")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://registry.npmjs.org/react/latest";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get last-month download count for Express.
Hover any highlighted part to learn what it does
curl -X GET "https://registry.npmjs.orghttps://api.npmjs.org/downloads/point/last-month/express"
import requests
response = requests.get(
"https://registry.npmjs.orghttps://api.npmjs.org/downloads/point/last-month/express",
)
print(response.json())const url = 'https://registry.npmjs.orghttps://api.npmjs.org/downloads/point/last-month/express'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://registry.npmjs.orghttps://api.npmjs.org/downloads/point/last-month/express"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://registry.npmjs.orghttps://api.npmjs.org/downloads/point/last-month/express")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://registry.npmjs.orghttps://api.npmjs.org/downloads/point/last-month/express";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- No API key needed
- Package info: GET https://registry.npmjs.org/express
- Latest version: GET https://registry.npmjs.org/express/latest
- Specific version: GET https://registry.npmjs.org/express/4.18.0
- Downloads: GET https://api.npmjs.org/downloads/point/last-week/react
What can you build with npm Registry API?
npm Registry API is a Developer Tools API. Developers commonly use developer tools APIs for:
- automating code review and quality checks
- integrating CI/CD pipelines and build systems
- managing feature flags and A/B tests
- monitoring errors and application performance
- generating and validating test data
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. npm Registry API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide