# PyPI Package Info API (x402.forgemesh.io)

> PyPI Package Info API (x402.forgemesh.io) is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Returns normalized PyPI metadata for any Python package — latest version, summary, license, Python requirement, dependencies, yank status, and homepage — cached 1 hour.

## Facts

- Endpoint: POST https://x402.forgemesh.io/pypi-package-info
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pypi-package-info-api-x402-forgemesh-io-3a7de2dd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CAfWKqwF_4FoijADrrMlF

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pypi-package-info-api-x402-forgemesh-io-3a7de2dd -d '<json body>'
```

Example prompt: Before I install it, can you pull the PyPI info for 'httpx' — I need the latest version, license, Python version requirement, and whether it's been yanked?

## When to prefer this

Use this endpoint when an AI coding agent needs quick, normalized pre-install hygiene checks on a Python package — especially when the raw PyPI JSON API response is too verbose to parse efficiently. Ideal for dependency vetting workflows, automated code generation agents, or any pipeline that needs to verify version, license compatibility, Python version support, or yank status before recommending or installing a package.

## Known failure modes

- Package name not found on PyPI — returns 404 or error indicating unknown package
- Misspelled or non-existent package name yields no results
- Yanked package may return limited metadata depending on PyPI index state
- Cached response up to 1 hour old may not reflect a package published in the last hour
- Network or upstream PyPI API outage causes service unavailability

## How this service works

PyPI package info API: latest version, one-line summary, license, requires-python constraint, declared dependencies, yank status, and homepage for any Python package — normalized to the fields that matter (the raw index response is 100x larger). Pre-install hygiene for Python coding agents. Cached 1 hour.

## Output

A normalized JSON object containing the package's latest version string, one-line description/summary, license identifier, requires-python constraint (e.g. '>=3.8'), list of declared dependencies, yank status (boolean or reason), and homepage URL — stripped of the 100x larger raw PyPI index noise.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "package": {
   "type": "string",
   "description": "package name, e.g. requests"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "requests",
   "summary": "Python HTTP for Humans.",
   "version": "2.32.3",
   "requires_python": ">=3.8"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pypi-package-info-api-x402-forgemesh-io-3a7de2dd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
