# Stride20k PyPI Package Health API

> Stride20k 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).

Fetches normalized health and metadata for a PyPI Python package, including latest version, license, download stats, dependency count, and yanked status.

## Facts

- Endpoint: GET https://gateway.stride20k.com/dev/pypi/%7BpackageName%7D
- 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/stride20k-pypi-package-health-api-b4762587
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yka40BZuV8K-b-c4qjcSv

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 stride20k-pypi-package-health-api-b4762587
```

Example prompt: Can you pull the PyPI health stats for the 'requests' package — I want to know the latest version, weekly downloads, license, and whether it's been yanked?

## When to prefer this

Use this endpoint when you need quick, normalized Python package health data from PyPI without setting up an API key or account. It's ideal for dependency auditing, license checks, popularity assessment, or automated supply-chain hygiene checks in agent workflows. Prefer this over direct PyPI API calls when you need metered, pay-per-use access with no auth setup, or when aggregating with other Stride20k data endpoints in a single pipeline.

## Known failure modes

- Package name not found on PyPI — returns an error or empty result
- Yanked or deleted package may return incomplete data
- PyPI or pypistats API downtime may cause fetch failures
- Malformed packageName parameter may result in 400-level errors
- Stale cached data if cached:true is returned

## How this service works

Agent data gateway plus the live x402 market feed. Normalized, schema-stable JSON for crypto prices, DeFi TVL, on-chain DEX pools, gas, FX, US Treasury yields, US weather, WHOIS, DNS, email validation, web-page extraction, tech news, Wikipedia, npm/PyPI package health, ERC-20 token-risk scoring, and composed domain dossiers, plus x402 ecosystem analytics and metered LLM inference. Pay per call with USDC via the x402 protocol; no accounts, no API keys.

## Output

Returns a JSON object with package metadata including: package name, latest version, yanked status, license, summary, version count, required Python version, dependency count, weekly download count, and the timestamp of the latest upload. Also includes cache status, data source attribution, and fetch timestamp in a meta field.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "yanked": false,
   "license": "Apache-2.0",
   "package": "requests",
   "summary": "Python HTTP for Humans.",
   "versionCount": 163,
   "latestVersion": "2.34.2",
   "requiresPython": ">=3.10",
   "dependencyCount": 6,
   "weeklyDownloads": 380362015,
   "latestUploadedAt": "2026-05-14T19:25:26.443000Z"
  },
  "meta": {
   "cached": false,
   "source": "PyPI JSON API + pypistats",
   "fetchedAt": "2026-07-04T00:00:00.000Z",
   "attribution": null
  },
  "endpoint": "/dev/pypi/:packageName"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stride20k-pypi-package-health-api-b4762587/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)
