# PyPI on Onekey > 9 endpoints for PyPI (9 stable, 0 beta), 1 to 5 credits each. Category: Developer platforms. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/pypi Reference (Markdown): https://onekey.dev/docs/api/pypi.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 9 mapped PyPI endpoints return each: - `content.createdAt` (ISO 8601 date): 4 - `content.category` (string): 3 - `content.title` (string): 3 - `content.url` (URL): 3 - `engagement.views` (integer): 3 - `entity.name` (string): 3 - `author.displayName` (string): 2 - `content.id` (string): 2 - `content.text` (string): 2 - `package.version` (string): 2 - `entity.description` (string): 1 - `entity.status` (string): 1 - `entity.type` (string): 1 - `entity.url` (URL): 1 - `package.dependencies` (list of strings): 1 - `package.homepageUrl` (URL): 1 - `package.license` (string): 1 - `package.yanked` (boolean): 1 - plus 10 platform-specific fields under `ext.` ## Endpoints ### pypi.downloads_overall Daily PyPI download counts by category (overall) for a project (pypistats.org). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/pypi/downloads_overall?name=requests` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - Fields returned: `content.category`, `content.createdAt`, `engagement.views` - Reference: https://onekey.dev/docs/api/pypi/downloads_overall.md ### pypi.downloads_python_major Daily PyPI download counts by category (python_major) for a project (pypistats.org). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/pypi/downloads_python_major?name=requests` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - Fields returned: `content.category`, `content.createdAt`, `engagement.views` - Reference: https://onekey.dev/docs/api/pypi/downloads_python_major.md ### pypi.downloads_recent Last-day/week/month PyPI download totals for a project (pypistats.org). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/pypi/downloads_recent?name=requests` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - Fields returned: `entity.name`, `ext.lastDay`, `ext.lastWeek`, `ext.lastMonth` - Reference: https://onekey.dev/docs/api/pypi/downloads_recent.md ### pypi.downloads_system Daily PyPI download counts by category (system) for a project (pypistats.org). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/pypi/downloads_system?name=requests` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - Fields returned: `content.category`, `content.createdAt`, `engagement.views` - Reference: https://onekey.dev/docs/api/pypi/downloads_system.md ### pypi.files Distribution files (wheels/sdist) of a specific PyPI release. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/pypi/files?name=requests&version=2.31.0` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - `version` (string, required): Exact version, e.g. 2.31.0 - Fields returned: `content.title`, `content.url`, `content.createdAt`, `entity.type`, `ext.size`, `ext.pythonVersion`, `ext.sha256` - Reference: https://onekey.dev/docs/api/pypi/files.md ### pypi.package Metadata of a PyPI package (latest release). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/pypi/package?name=requests` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `package.version`, `author.displayName` - Reference: https://onekey.dev/docs/api/pypi/package.md ### pypi.version Metadata of one specific PyPI release. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/pypi/version?name=requests&version=2.31.0` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - `version` (string, required): Exact version, e.g. 2.31.0 - Fields returned: `entity.name`, `package.version`, `entity.description`, `package.license`, `package.homepageUrl`, `entity.url`, `author.displayName`, `package.yanked`, `package.dependencies`, `ext.requiresPython` - Reference: https://onekey.dev/docs/api/pypi/version.md ### pypi.versions All release version numbers of a PyPI project (PEP 691 simple index). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/pypi/versions?name=requests` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - Fields returned: `entity.name`, `entity.status`, `ext.versions` - Reference: https://onekey.dev/docs/api/pypi/versions.md ### pypi.vulnerabilities Known vulnerabilities of a specific PyPI release (from OSV). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/pypi/vulnerabilities?name=requests&version=2.31.0` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): PyPI project name, e.g. requests - `version` (string, required): Exact version, e.g. 2.31.0 - Fields returned: `content.id`, `content.title`, `content.text`, `content.url`, `ext.aliases`, `ext.fixedIn` - Reference: https://onekey.dev/docs/api/pypi/vulnerabilities.md ## Sample request ```bash curl "https://api.onekey.dev/v1/pypi/downloads_recent?name=requests" \ -H "x-api-key: YOUR_API_KEY" ```