# PyPI Package Health API

> PyPI Package Health API is a paid API for AI agents from gateway.stride20k.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Returns dependency-hygiene facts for a PyPI package including latest version, upload time, release count, yank status, dependency count, Python constraint, license, summary, and weekly downloads

## Facts

- Endpoint: GET https://gateway.stride20k.com/dev/pypi/:packageName
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pypi-package-health-api-1f0a0c5d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6L3xJqOmJA6GPmg65dTWF

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-health-api-1f0a0c5d
```

Example prompt: Can you pull up the PyPI health info for 'scikit-learn' — I want to know the latest version, whether it's been yanked, how many dependencies it has, and how many weekly downloads it gets?

## When to prefer this

Use this endpoint when you need authoritative PyPI package metadata for a single package — especially for auditing requirements.txt or pyproject.toml files, supply-chain security checks, version freshness evaluation, or checking if a package has been yanked. Prefer this over scraping PyPI directly because it aggregates PyPI JSON API data with pypistats download counts in one call with PEP 503 normalization.

## Known failure modes

- Package not found on PyPI returns an error response
- Package name typos result in not-found errors
- pypistats weekly download data may be null if unavailable for that package
- Cached responses up to 1 hour old may not reflect very recent releases
- Rate limits or upstream PyPI API outages can cause failures

## How this service works

PyPI package health API: dependency-hygiene facts from the official PyPI JSON API — latest version, upload time, total releases, yank status, declared dependency count, requires-python constraint, license, summary, and weekly downloads (pypistats). Names are PEP 503-normalized (dots/underscores/hyphens equivalent). Use for auditing requirements.txt and pyproject.toml, supply-chain security checks, and version freshness agents. Cached up to 1 hour per package.

## Output

A JSON object with the canonical package name, latest version string, upload timestamp of the newest release, total release count, yank status boolean, declared dependency count, requires-python constraint, license string (up to 120 chars), one-line summary, weekly downloads, plus metadata indicating cache status and data source.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pypi-package-health-api-1f0a0c5d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.stride20k.com](https://www.zero.xyz/host/gateway.stride20k.com/llms.txt)
