# Podcast Episodes (`apple_podcasts.episodes`)

Latest episodes of a podcast by its Apple Podcasts id: title, date, duration, description and audio URL.

- **Route:** `POST /v1/run/apple_podcasts.episodes`
- **Price:** $0.00085 per request ($0.85 per 1,000) · `cost_usd` on every response
- **Source:** Apple iTunes Search API + App Store RSS (`apple`) · failover: no
- **Measured latency:** p50 50 ms · p95 50 ms · p99 50 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `podcast_id` | integer | yes | 0 | Apple Podcasts id (the number after /id in the show URL) |
| `country` | string | no | "us" | Two-letter country code of the store |
| `limit` | integer | no | 20 | Episodes to return |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `podcast` | Show name, author and feed URL. |
| `episodes` | title, released_at, duration_ms, description, audio_url, url. |
| `count` | Episodes returned. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/apple_podcasts.episodes \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"podcast_id":1200361736,"limit":5}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('apple_podcasts.episodes', {'podcast_id': 1200361736, 'limit': 5})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run apple_podcasts.episodes '{"podcast_id":1200361736,"limit":5}'
```

Quote first (free, validates input): `POST /v1/quote/apple_podcasts.episodes` with the same body.
