canonical: https://jentic.com/apis/pypi.org/pypi

# PyPI API

The Python Package Index (PyPI) API provides read-only access to package metadata, release information, and download URLs for Python packages hosted on PyPI. The API includes a JSON API for structured metadata and a Simple API (PEP 503) for package file listings. All endpoints are publicly accessible and require no authentication. The API exposes 5 endpoints.

## For AI agents

Programmatically get project metadata, get version-specific project metadata. Covers 5 operations.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Get project metadata
- List all packages in the simple index
- Search for packages
- Access PyPI API developer tools resources via REST API

## Use cases

### Developer Tools Operations

Use the PyPI API to perform developer tools operations programmatically. The API provides 5 endpoints covering core functionality including get project metadata, get version-specific project metadata, list all packages in the simple index.

Example prompt: Call GET `/pypi/{project}/json` to get project metadata

### Automated JSON API Management

Automate json API operations by combining multiple PyPI API endpoints. Agents can get version-specific project metadata and then list all packages in the simple index in a single workflow.

Example prompt: Call GET `/pypi/{project}/{version}/json` to get version-specific project metadata, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call PyPI API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle none tokens manually.

Example prompt: Search Jentic for 'get project metadata', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/pypi/{project}/json` | Get project metadata |
| GET | `/pypi/{project}/{version}/json` | Get version-specific project metadata |
| GET | `/simple/` | List all packages in the simple index |
| GET | `/simple/{project}/` | List distribution files for a project |
| GET | `/search/` | Search for packages |

## Key resources

- **JSON API** — Endpoints returning structured JSON metadata for projects and releases
- **Simple API** — PEP 503 Simple Repository API for listing packages and their distribution files
- **Search** — Package search functionality

## Why Jentic

- **Setup:** Wiring the PyPI API by hand means choosing between the JSON metadata and simple index endpoints and parsing each response shape yourself. Through Jentic you install once, import the PyPI API from the API Directory, and your agent calls it with no key to manage.
- **Permission scoping:** PyPI puts the project name in the URL path (`/pypi/{project}/json`), so a rule can pin your agent to reads of one project: it can fetch that project's metadata and nothing else. You choose the operations it may call, so the simple index or search is not included unless you add it.
- **Credential handling:** PyPI needs no credential, and Jentic One runs it the same way as any imported operation, so nothing secret ever enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get metadata for a Python package' or 'look up a package version', and Jentic returns the matching PyPI operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the PyPI API use?

The PyPI API uses no authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I get project metadata with the PyPI API?

Yes. Use the GET `/pypi/{project}/json` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the PyPI API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I get project metadata through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get project metadata'. Jentic returns the matching PyPI API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the PyPI API have?

The PyPI API exposes 5 endpoints covering json API, simple API, search operations.

### Can I limit what my agent is allowed to do with the PyPI API?

Yes. Jentic One is self-hosted, so your own rules decide which PyPI operations your agent may call. Because the project name sits in the URL path (GET `/pypi/{project}/json`), you can pin the agent to reads of a single project's metadata and nothing else. The simple index listing and package search stay out of reach unless you explicitly add those operations.
