> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drain.lat/llms.txt
> Use this file to discover all available pages before exploring further.

# PyPI

> Fetch Python package information from the Python Package Index.

# PyPI

**Base URL:** `https://drain.lat/api/v1/pypi`

<AccordionGroup>
  <Accordion title="GET /package/:name" icon="box">
    Fetch Python package information from PyPI.

    ```
    GET /api/v1/pypi/package/:name
    ```

    <ParamField path="name" type="string" required>
      The PyPI package name to look up.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/pypi/package/requests" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/pypi/package/requests", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/pypi/package/requests",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="name" type="string">Package name.</ResponseField>
    <ResponseField name="version" type="string">Latest version.</ResponseField>
    <ResponseField name="description" type="string">Package description.</ResponseField>
    <ResponseField name="author" type="string">Package author.</ResponseField>
    <ResponseField name="authorEmail" type="string">Author email address.</ResponseField>
    <ResponseField name="license" type="string">License type.</ResponseField>
    <ResponseField name="homepage" type="string">Package homepage URL.</ResponseField>

    <ResponseField name="projectUrls" type="object">
      <Expandable title="projectUrls object">
        <ResponseField name="Documentation" type="string">Documentation URL.</ResponseField>
        <ResponseField name="Source" type="string">Source code URL.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="keywords" type="array">Package keywords.</ResponseField>
    <ResponseField name="classifiers" type="array">Package classifiers.</ResponseField>
    <ResponseField name="requiresPython" type="string">Required Python version.</ResponseField>
    <ResponseField name="releases" type="number">Total number of releases.</ResponseField>
    <ResponseField name="pypiUrl" type="string">Link to the PyPI package page.</ResponseField>

    ```json Response theme={null}
    {
      "name": "requests",
      "version": "2.31.0",
      "description": "Python HTTP for Humans.",
      "author": "Kenneth Reitz",
      "authorEmail": "me@kennethreitz.org",
      "license": "Apache 2.0",
      "homepage": "https://requests.readthedocs.io",
      "projectUrls": {
        "Documentation": "https://requests.readthedocs.io",
        "Source": "https://github.com/psf/requests"
      },
      "keywords": ["http", "requests", "api"],
      "classifiers": ["Development Status :: 5 - Production/Stable"],
      "requiresPython": ">=3.7",
      "releases": 145,
      "pypiUrl": "https://pypi.org/project/requests/",
      "scrapedAt": "2026-05-31T00:00:00Z"
    }
    ```
  </Accordion>
</AccordionGroup>
