PyPI API
Base URL: https://notamitgamer-osma-pypi-api.hf.space
GET /ping
Uptime check — always returns 200. Lightweight endpoint for UptimeRobot or health monitors; doesn't query the database.
curl https://notamitgamer-osma-pypi-api.hf.space/ping
{ "ping": "pong" }
GET /health
Server status + total package count. Returns 200 when the database is ready; returns 503 during cold-start initialization.
curl https://notamitgamer-osma-pypi-api.hf.space/health
{
"status": "ok",
"total_packages": 780432
}
GET /stats
Total package count and dataset source metadata.
curl https://notamitgamer-osma-pypi-api.hf.space/stats
{
"total_pypi_packages": 780432,
"source": "pypi.org",
"note": "Snapshot dataset — updated periodically."
}
GET /browse
Paginated package list, ordered by package_no.
curl "https://notamitgamer-osma-pypi-api.hf.space/browse?page=1&limit=5"
{
"page": 1,
"limit": 5,
"results": [
{ "no": 1, "name": "0", "version": "0.1.0", "url": "https://pypi.org/project/0/" }
]
}
GET /search
Ranked search across all packages. 0 = exact match, 1 = starts-with, 2 = contains.
curl "https://notamitgamer-osma-pypi-api.hf.space/search?q=requests&limit=5"
{
"query": "requests",
"count": 87,
"results": [
{ "no": 512, "name": "requests", "version": "2.31.0", "url": "...", "rank": 0 }
]
}