# PyPI Package Metadata Lookup

> PyPI Package Metadata Lookup is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Fetches latest-release metadata for a PyPI package including version, license, Python compatibility, dependencies, yanked status, upload time, and project URLs.

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/pypi/package
- Price: $0.002/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-metadata-lookup-673b199a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_061EZoN6mFx5JtI6AFX6Y

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-metadata-lookup-673b199a
```

Example prompt: Can you look up the latest PyPI metadata for the 'httpx' package — I want to know its current version, license, Python version requirements, and whether it's been yanked?

## When to prefer this

Use this endpoint when you need authoritative, structured PyPI release metadata — version, license, Python compatibility, and dependency specs — for a single package. Prefer it over scraping PyPI HTML or calling PyPI directly when you need a metered, cached, pay-per-call interface. Best for agent workflows that need to verify package details, audit dependencies, or check compatibility constraints programmatically.

## Known failure modes

- Package not found on PyPI — returns 404 or error response
- Misspelled package name produces no results
- Package exists but has no releases — metadata may be sparse
- Cache may serve data up to 1 hour old if package was just updated
- Network timeout reaching PyPI upstream API

## How this service works

Latest-release metadata from the official PyPI JSON API (live): version, license, requires_python compatibility, requires_dist dependency specs (max 100), yanked flag, last upload time and project URLs. Query: ?pkg=requests. No personal author/maintainer data. 1h cache.

## Output

Returns latest-release metadata for the queried PyPI package: current version string, SPDX license identifier, requires_python compatibility constraint, up to 100 requires_dist dependency specifiers, yanked boolean flag, last upload timestamp, and project URL map (homepage, source, documentation, etc.). Data is live from the PyPI JSON API with a 1-hour cache.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pkg"
     ],
     "properties": {
      "pkg": {
       "type": "string",
       "description": "PyPI package name, e.g. requests"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pypi-package-metadata-lookup-673b199a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
