PyPI download stats for any package
pypistats.org has a free, no-key endpoint. Useful for ecosystem-trend research without scraping.
The one-liner
$ curl -s "https://pypistats.org/api/packages/pandas/recent" \
| jq '.data'What each stage does
- [01] curl
curl -s "https://pypistats.org/api/packages/pandas/recent"Free public API. Endpoints: /recent (last day/week/month), /overall, /python_major, /python_minor, /system. - [02] jq
jq '.data'Strip the {package, type, data: {...}} envelope. Pipe the result into another jq if you want a specific window.
Expected output (sample)
{
"last_day": 2451327,
"last_week": 16974912,
"last_month": 72840185
}Caveats & tips
- Swap 'pandas' for any pip-installable package name.
- For historical series, use `/api/packages/<name>/overall?mirrors=true` and group with DuckDB.