PyPI project API
A Python project on PyPI: metadata and README, the release’s files, known vulnerabilities and every version with its upload date.
GET /v1/pypi/project1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/pypi/project?project=requests",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "info": { "name": "requests", "version": "2.34.2", "summary": "Python HTTP for Humans.", "description": "# Requests\n\n[](https://…", "author": null, "author_email": "Kenneth Reitz <…@…>", "license": "Apache-2.0", "license_expression": null, "home_page": null, "project_urls": { "Documentation": "https://requests.readthedocs.io", "Source": "https://github.com/psf/requests" }, "requires_python": ">=3.10", "requires_dist": [ "charset_normalizer<4,>=2", "idna<4,>=2.5", "… 4 more" ], "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "… 18 more" ], "keywords": null, "…": "16 more fields" }, "urls": [ { "filename": "requests-2.34.2-py3-none-any.whl", "url": "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f…", "packagetype": "bdist_wheel", "python_version": "py3", "size": 73075, "upload_time_iso_8601": "2026-05-14T19:25:26.443000Z", "yanked": false, "digests": { "blake2b_256": "a0f4c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a", "md5": "cc4287951c320ff794e5e183c7a91f85", "sha256": "2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0" }, "comment_text": null, "core-metadata": { "sha256": "8c384ba3e979480faae2859d3c5e6c1276dd2c3616e322e124d52c8cfc556f27" }, "downloads": -1, "has_sig": false, "md5_digest": "cc4287951c320ff794e5e183c7a91f85", "requires_python": ">=3.10", "…": "2 more fields" }, { "filename": "requests-2.34.2.tar.gz", "url": "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0c…", "packagetype": "sdist", "python_version": "source", "size": 142856, "upload_time_iso_8601": "2026-05-14T19:25:27.735762Z", "yanked": false, "digests": { "blake2b_256": "acc3e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf", "md5": "611e438d0803e962500225f9807a475e", "sha256": "f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed" }, "comment_text": null, "core-metadata": false, "downloads": -1, "has_sig": false, "md5_digest": "611e438d0803e962500225f9807a475e", "requires_python": ">=3.10", "…": "2 more fields" } ], "vulnerabilities": [], "ownership": { "organization": null, "roles": [ { "role": "Owner", "user": "Lukasa" }, { "role": "Owner", "user": "graffatcolmingov" }, "… 1 more" ] }, "last_serial": 37059094, "versions": [ { "version": "2.34.2", "upload_time": "2026-05-14T19:25:26.443000Z", "yanked": false, "files": 2 }, { "version": "2.34.1", "upload_time": "2026-05-13T19:20:22.827819Z", "yanked": false, "files": 2 }, "… 161 more" ], "latest_version": "2.34.2", "url": "https://pypi.org/project/requests/2.34.2/"}Parameters
| Name | Type | Description |
|---|---|---|
projectquery · required | string | Project name or pypi.org link. Example: requests. |
versionquery | string | A release such as 2.31.0. Defaults to the latest. |
Response fields
200 with a PypiProject, in PyPI’s own JSON.
| Field | Type | Description |
|---|---|---|
info | PypiInfo | |
urls | PypiReleaseFile[] | |
vulnerabilities | object[] | |
ownership | object | |
last_serial | integer | |
versions | object[] | Every release, newest upload first. |
latest_version | string | |
url | string |
Status codes
| Status | Meaning |
|---|---|
200 | The project release. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The project or release does not exist. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | PyPI is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Does it list vulnerabilities?
Yes, the ones PyPI lists for that release.
PyPI is a trademark of the Python Software Foundation. We are not affiliated with or endorsed by the Python Software Foundation.