# PyPI Project

Returns one PyPI project: name, version, summary, description with content type, author, maintainer, license, required Python, requirements, classifiers, keywords, project URLs, release files with digests and sizes, known vulnerabilities, ownership and recent downloads. Without version it also lists all releases with upload dates. Names are matched the PyPI way (case and - _ . are equal). Downloads are best effort and left out when unavailable. Unknown projects and releases answer 404. Costs 1 credit per successful request.

- **Documentation:** [https://scrappa.co/docs/pypi-api/pypi_project](https://scrappa.co/docs/pypi-api/pypi_project)
- **API group:** PyPI API
- **Endpoint:** `GET https://scrappa.co/api/pypi/project`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project` | string | Yes | PyPI project name, e.g. requests. |
| `version` | string | No | Release version, e.g. 2.32.3. Defaults to the latest release. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/pypi/project?project=requests"
```

## Example response

```json
{
    "success": true,
    "data": {
        "name": "six",
        "normalized_name": "requests",
        "version": "2.32.3",
        "summary": "Python 2 and 3 compatibility utilities",
        "description": ".. image:: https://img.shields.io/pypi/v/six.svg\n   :target: https://pypi.org/project/six/\n   :alt: six on PyPI\n\n.. image:: https://readthedocs.org/pr...",
        "author": "Benjamin Peterson",
        "author_email": "benjamin@python.org",
        "license": "MIT",
        "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7",
        "requires_dist": [],
        "provides_extra": [],
        "classifiers": [
            "Development Status :: 5 - Production/Stable",
            "Intended Audience :: Developers"
        ],
        "home_page": "https://github.com/benjaminp/six",
        "project_urls": {
            "Homepage": "https://github.com/benjaminp/six"
        },
        "package_url": "https://pypi.org/project/six/",
        "release_url": "https://pypi.org/project/six/1.17.0/",
        "yanked": false,
        "files": [
            {
                "filename": "six-1.17.0-py2.py3-none-any.whl",
                "package_type": "bdist_wheel",
                "python_version": "py2.py3",
                "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7",
                "size": 11050,
                "uploaded_at": "2024-12-04T17:35:26.475808Z",
                "url": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl",
                "digests": {
                    "blake2b_256": "b7ce149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e",
                    "md5": "090bac7d568f9c1f64b671de641ccdee",
                    "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"
                },
                "has_signature": false,
                "yanked": false
            },
            {
                "filename": "six-1.17.0.tar.gz",
                "package_type": "sdist",
                "python_version": "source",
                "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7",
                "size": 34031,
                "uploaded_at": "2024-12-04T17:35:28.174320Z",
                "url": "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz",
                "digests": {
                    "blake2b_256": "94e7b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2",
                    "md5": "a0387fe15662c71057b4fb2b7aa9056a",
                    "sha256": "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"
                },
                "has_signature": false,
                "yanked": false
            }
        ],
        "vulnerabilities": [],
        "ownership": {
            "organization": null,
            "roles": [
                {
                    "role": "Owner",
                    "user": "gutworth"
                }
            ]
        },
        "last_serial": 26356948,
        "releases": [
            {
                "version": "1.17.0",
                "uploaded_at": "2024-12-04T17:35:26.475808Z",
                "file_count": 2,
                "yanked": false
            },
            {
                "version": "1.16.0",
                "uploaded_at": "2021-05-05T14:18:17.237677Z",
                "file_count": 2,
                "yanked": false
            }
        ],
        "downloads": {
            "last_day": 54540159,
            "last_week": 353421454,
            "last_month": 1202777296
        }
    },
    "meta": {
        "endpoint_family": "project",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 503 | Upstream Unavailable | The source could not be fetched after the attempt budget. Never charged. Safe to retry. |
| 500 | Parser Drift | The source returned a shape this parser does not recognise. The incident is reported. Never charged. |
| 404 | Not Found | The source has no such public resource. Never charged. |
| 422 | Invalid Parameter | A value in this request is invalid or the requested page is out of range. Never charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
