PyPI JSON API
pypi.org · Developer Tools
Python Package Index metadata — package info, version history, download stats, and release files for 500,000+ Python packages. Free, no API key required.
Authentication
Sample Requests
Get full metadata for the requests package.
Hover any highlighted part to learn what it does
curl -X GET "https://pypi.org/pypi/requests/json"
import requests
response = requests.get(
"https://pypi.org/pypi/requests/json",
)
print(response.json())const url = 'https://pypi.org/pypi/requests/json'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://pypi.org/pypi/requests/json"
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://pypi.org/pypi/requests/json")
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://pypi.org/pypi/requests/json";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get metadata for Django 4.2.0 specifically.
Hover any highlighted part to learn what it does
curl -X GET "https://pypi.org/pypi/django/4.2.0/json"
import requests
response = requests.get(
"https://pypi.org/pypi/django/4.2.0/json",
)
print(response.json())const url = 'https://pypi.org/pypi/django/4.2.0/json'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://pypi.org/pypi/django/4.2.0/json"
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://pypi.org/pypi/django/4.2.0/json")
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://pypi.org/pypi/django/4.2.0/json";
$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://pypi.org/pypi/{package_name}/json
- Try GET https://pypi.org/pypi/numpy/json
- Specific version: GET https://pypi.org/pypi/flask/2.3.0/json
- Download stats: use pypistats.org/api/packages/{package}/recent
What can you build with PyPI JSON API?
PyPI JSON 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. PyPI JSON API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide