# Python — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive Python release information including downloads, versions, and supported operating systems, plus stay updated with the latest Python news and events. Search across Python.org's resources and browse release files, details, and the FTP index all in one place.

**Category:** Developer Tools | **Website:** [python.org/](https://python.org/) | **Docs:** [parse.bot/marketplace/4714846d-ee2d-4557-807d-b894a1e2fd00/python-org-api](https://parse.bot/marketplace/4714846d-ee2d-4557-807d-b894a1e2fd00/python-org-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_active_release_versions

Returns the active Python release versions list from the downloads page, including maintenance status, first release date, and end-of-support date. Only versions currently tracked by python.org are shown (typically active and recently-EOL versions).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_active_release_versions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_all_release_files

Returns all downloadable release files from the python.org API across all releases. This is a large response containing every file ever published. Each file includes its download URL, checksum, size, and associated release/OS references.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_all_release_files \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_all_releases

Returns all Python releases from the python.org API. Each release includes version metadata, release dates, and resource URIs. The full list is returned in a single page and includes both Python 2.x and 3.x releases across all states (published, pre-release, etc.).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_all_releases \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_events

Returns upcoming Python events from python.org/events/. Each event includes its name, URL, date range, and location. Only future/current events are shown as maintained by the Python community.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_ftp_index

Returns the directory listing from the Python FTP site at python.org/ftp/python/. Supports subdirectory navigation via the path parameter. Each entry is a file or directory name with its full URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `path` | string | No | Subdirectory path (e.g. '3.12.0/'). Empty string returns the root listing. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_ftp_index \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"<string>"}'
```

### get_latest_release

Returns the latest stable Python 3.x release by finding the highest published, non-pre-release version. Useful for checking the current recommended Python version without parsing the full release list.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_latest_release \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_news

Returns latest Python news from the blog page at python.org/blogs/. Includes article title, URL, publication date, and summary text. Results reflect the current front page of the Python blog.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_release_by_id

Returns a single Python release record by its numeric ID. The ID is the trailing integer from the resource_uri field of a release (e.g. '1090' from '/api/v2/downloads/release/1090/'). Returns input_not_found for IDs that do not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Numeric release ID (e.g. '1090', '146') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_release_by_id \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_release_detail_page

Scrapes an individual release detail page for title, release date, and downloadable files with checksums. Works for modern Python 3.x releases that have detail pages. Returns input_not_found for releases without detail pages or invalid slugs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `version_slug` | string | Yes | Version slug like 'python-3120' or version number like '3.12.0' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_release_detail_page \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version_slug":"<string>"}'
```

### get_release_files_by_release

Returns all downloadable files for a specific Python release. Accepts a numeric release ID (the trailing integer from a release's resource_uri) or a full resource URI path. Each file includes download URL, checksum, size, and OS classification.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `release_uri` | string | Yes | Release numeric ID (e.g. '1090') or full resource URI path (e.g. '/api/v2/downloads/release/1090/') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_release_files_by_release \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"release_uri":"<string>"}'
```

### get_releases_for_os

Returns stable releases and pre-releases for a specific operating system by scraping the OS-specific downloads page. Each release includes its name, release page URL, date, and per-OS download links with labels.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `os_slug` | string | No | OS slug: 'windows', 'macos', or 'source' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_releases_for_os \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"os_slug":"<string>"}'
```

### get_supported_os_list

Returns the list of supported operating systems from the python.org API. Each OS entry includes a display name, URL-safe slug, and API resource URI that can be used to filter release files.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/get_supported_os_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search

Performs a site search on python.org. Returns matching pages with titles, URLs, and text snippets. Coverage depends on the site's search index; some queries may return empty results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query string |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-python-org-api-4714846d/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
