PyPI package metadata, dependencies, releases and download counts, as JSON
The PyPI API returns Python Package Index (pypi.org) data for any Python package as JSON: the latest version, description, license, project links, requires_dist with version specifiers and environment markers, classifiers and release count; the release list with file counts; one release's metadata; the requirements of any release; download counts for the last day, last week and last month; package-name search; and the author and maintainer fields.
- endpoints
- 7
- credits per call
- 1–2
1 credit per call≈ $1/1,000 calls1,000 free credits, no card
7 active endpoints, on 1 and 2 credit tiers.
- POST/pypi/v1/package1 credit
- POST/pypi/v1/versions1 credit
- POST/pypi/v1/version1 credit
- POST/pypi/v1/dependencies1 credit
- POST/pypi/v1/downloads1 credit
- POST/pypi/v1/search2 credits
- POST/pypi/v1/maintainer1 credit
Run the call yourself, on the real endpoint
Change a parameter and press Try it. The response on the right is what your code will receive.
PyPI API
4 of 7 endpoints, ready to run
One PyPI package: latest version, license, links, requires_dist, classifiers
// Press "Try it" and this pane shows exactly what the // live site returned this second — including an empty // result, if that is the truth. No key, no account.
What PyPI endpoints does ReefAPI ship?
7 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.
Every parameter, every allowed value →
Missing a PyPI endpoint, or need a source we don't have yet?Contact us real people · same-day reply.How the PyPI API works
PyPI is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.
No OAuth app, no request signing, no per-site account. One key covers all 746 engines.
Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.
Credits, not seats. Failed and blocked calls are never charged, and nothing is cached: every call reads the source live.
One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.
What does this Python package need, and how widely is it used?
Read a package's latest release, license and requirements, then its download counts.
{"name": "requests"}On 2026-11-21: requests 2.34.2, Apache-2.0, 6 requires_dist lines (charset_normalizer, idna, urllib3, certifi, and PySocks and chardet as extras), 20 classifiers, 163 releases, in 0.8 s.
{"name": "requests"}52,445,924 downloads in the last day, 351,913,496 in the last week, 1,509,289,209 in the last month, from pypistats.org, in 2.0 s. Old calls to POST /packages/v1/... with registry pypi keep working unchanged.
For each Python package: its latest release, license, declared requirements with their version specifiers and environment markers, and its download volume.
curl -X POST https://api.reefapi.com/pypi/v1/package \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"name":"requests"}'{
"ok": true,
"data": { … },
"meta": {
"api": "pypi",
"endpoint": "package",
"mode": "live",
"latency_ms": …,
"record_count": …
},
"error": null
}What a PyPI field actually contains
Fields that read differently from how they look. Each row was measured on live PyPI data on 2026-11-21.
| Field | What it holds |
|---|---|
| version (package) | The latest release on PyPI: requests 2.34.2, fastapi 0.165.0. |
| requires_dist | The requirement lines exactly as published, PEP 508: "urllib3<3,>=1.26"; the PySocks line carries the marker extra == "socks". Lines with an extra marker are optional extras, not runtime requirements. |
| dependencies | requires_dist parsed into a map of requirement to marker ("*" when the line has no marker). |
| repository | The project links PyPI lists, by label: Documentation https://requests.readthedocs.io, Source https://github.com/psf/requests. |
| classifiers | PyPI's trove classifiers: development status, license, supported Python versions (requests: 3.10 to 3.15), topics. 20 for requests. |
| version_count | How many releases exist: 163 for requests, 371 for fastapi. |
| versions[].files, latest | How many files (wheels and source archives) a release has, and whether it is the latest. Rows are ordered as text, not as version numbers: fastapi's first page began at 0.99.1, the latest is 0.165.0. |
| last_day, last_week, last_month, source, attribution | Downloads in each window, all three in one answer, counted by pypistats.org; attribution is the line to keep beside the figures. period does not apply to PyPI. |
| search: source, score | Search matches names and returns name, latest version, description and license per result; score is empty on PyPI results. |
Everything is returned as PyPI publishes it. Nothing is resolved into an install tree.
PyPI coverage, measured
Every number below comes from live PyPI calls on 2026-11-21.
requests: version 2.34.2, license Apache-2.0, documentation and source links, requires_dist with PEP 508 specifiers (urllib3<3,>=1.26) and extras markers, 20 classifiers including Python 3.10 to 3.15, 163 releases; 0.8 s.
requests: last day 52,445,924, last week 351,913,496, last month 1,509,289,209; all three windows in one answer, from pypistats.org, with an attribution line to keep beside the figures; 2.0 s.
fastapi: 371 releases, 10 per page in 0.4 s, each with its file count (2 per release) and a latest flag.
Matches package names: "fastapi" found 1,990 packages whose name contains it, fastapi itself first (0.165.0), then fastapi-420, fastapi-a2a ... in name order; 20 per page, 12.8 s. A two-word query ("http client") returned 0.
Search reads names only, not descriptions, and returns no relevance score; look packages up by exact name where you can. versions are ordered as text, not as version numbers: fastapi's first page began at 0.99.1 while the latest release is 0.165.0, so use the latest flag or package.version. maintainers and author came back empty for requests; use the project links.
What people build with PyPI
The jobs this data is most often used for.
endpoints
credits per call
Check the license and supported Python versions of every package in a requirements file.
Track a library's daily, weekly and monthly PyPI downloads for adoption reports.
List the declared requirements of a release before upgrading, including optional extras.
Find PyPI packages built around a framework by name, such as every fastapi-* package.
What PyPI data costs
The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.
- 1,000 free credits on signup, no card
- One key, all 746 APIs, one credit pool
- Failed and blocked calls are never charged
- Credits roll over and never expire
Call it in two lines
Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.
curl -X POST https://api.reefapi.com/pypi/v1/package \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"name":"requests"}'import os
import requests
REEF_KEY = os.environ["REEF_KEY"]
r = requests.post(
"https://api.reefapi.com/pypi/v1/package",
headers={"x-api-key": REEF_KEY},
json={
"name": "requests"
},
timeout=90,
)
print(r.json()["data"])Have a question? We got answers.
The questions people actually ask before wiring up PyPI.
Is there a PyPI API?▾
Yes. The pypi API on ReefAPI returns Python Package Index data as JSON: package metadata, releases, one release's metadata, requirements, download counts, name search and maintainers. PyPI needs no account or token for this data; you call it with your ReefAPI key.
How do I get download counts for a Python package?▾
Call downloads with the package name. It returns the last day, last week and last month together, counted by pypistats.org: requests had 52,445,924, 351,913,496 and 1,509,289,209 on 2026-11-21. Other windows are not available.
Does it return a package's dependencies?▾
Yes. package returns requires_dist for the latest release and dependencies returns it for any release you name, as PEP 508 lines with version specifiers and environment markers. requests 2.34.2 requires charset_normalizer, idna, urllib3 and certifi, with PySocks and chardet as optional extras.
Can I search PyPI?▾
By package name. search returns packages whose name contains your word: "fastapi" found 1,990 on 2026-11-21, fastapi first, then fastapi-420, fastapi-a2a and so on in name order, 20 per page, in 12.8 seconds. It does not search descriptions: "http client" returned 0. If you know the name, call package directly.
How do I list every release of a package?▾
Call versions with page and page_size (up to 250). fastapi had 371 releases on 2026-11-21, each with its file count and a latest flag. The rows are ordered as text, not as version numbers (0.99.1 came before 0.165.0), so sort the version strings yourself or read package.version for the latest.
Which Python versions does a package support?▾
Read classifiers from package. requests 2.34.2 lists Python 3.10, 3.11, 3.12, 3.13, 3.14 and 3.15, plus CPython and PyPy.
Does it return the author and maintainers?▾
It returns the author and maintainer fields PyPI publishes for the package. For requests they came back empty on 2026-11-21; the project links (documentation, source) were present.
Do old packages calls still work?▾
Yes. POST /packages/v1/<action> with registry pypi keeps working unchanged. The call for PyPI alone is POST /pypi/v1/<action>, with the same parameters minus registry. Node.js packages are on the npm API.
What is the PyPI API?▾
PyPI API is a ReefAPI endpoint group for python package index data for any package: metadata, releases, requirements, daily, weekly and monthly downloads, and name search. It returns live JSON through POST requests under /pypi/v1.
Is the PyPI API free to try?▾
Yes. ReefAPI starts with 1,000 free credits, no card required. PyPI calls use the same shared credit balance as every other ReefAPI engine.
Do I need a PyPI login or account?▾
No login to PyPI is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the PyPI data?▾
The page example is captured from a live package call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the PyPI API use?▾
PyPI actions currently cost 1-2 credits per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.
Can I call PyPI from an AI assistant or MCP client?▾
Yes. Connect ReefAPI once through MCP and your assistant can call pypi actions with the same key, credit pool and JSON envelope used by normal REST requests.
15 Developer Tools APIs on the same key
One key, one credit pool, one response envelope. If you are pulling PyPI, you are one call away from the rest of the category — no second contract, no second integration.
Need something this API does not do?
Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.
Try it on your own data before you pay anything
The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 745 APIs, and the same envelope everywhere.
Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-11-21.