---
name: PyPI
version: 1.0.0
description: "PyPI API for Python Packages Index"
homepage: https://pypi.org
metadata: {"seren":{"category":"integration","publisher_slug":"pypi","api_base":"https://api.serendb.com"}}
---

# PyPI

PyPI API for Python Packages Index

## API Endpoints

### GET `/pypi/{package}/json`

Get full package metadata including all releases

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/pypi/pypi/{package}/json \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/pypi/{package}/{version}/json`

Get metadata for a specific version

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/pypi/pypi/{package}/{version}/json \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

### GET `/simple/{package}/`

Get simple index with all release file links

**Example:**

```bash
curl -X GET https://api.serendb.com/publishers/pypi/simple/{package}/ \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

## MCP Tools

This API publisher also supports MCP (Model Context Protocol) access. Each API endpoint is available as an MCP tool.

### Available Tools

- `get_pypi_by_package_json`: Get full package metadata including all releases
- `get_pypi_by_package_by_version_json`: Get metadata for a specific version
- `get_simple_by_package_`: Get simple index with all release file links

### Introspection

```bash
# List tools
curl https://api.serendb.com/publishers/pypi/_mcp/tools \
  -H "Authorization: Bearer $SEREN_API_KEY"

# Call a tool
curl -X POST https://api.serendb.com/publishers/pypi/_mcp/tools/{tool_name} \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body": {"key": "value"}}'
```

## Pricing

**Pricing Model:** per_request

- Price per request: $0

**Minimum charge:** $0.00010000

---

## Need Help?

- Seren Docs: https://docs.serendb.com
- Publisher: PyPI API for Python Packages Index
