# LetsCast.fm API

The LetsCast.fm API lets you fetch the analytics data of your podcasts automatically, e.g. for your own reports, spreadsheets or dashboards. The API is read-only and returns CSV or JSON data.

You find your personal API token and the IDs of your podcasts after signing in under Settings → API. (https://letscast.fm/user/api)

In the examples, `API_TOKEN` and `PODCAST_ID` are placeholders for your token and the ID of one of your podcasts.

## Authentication

Every request must include your API token in the HTTP header `x-api-key`.

```bash
curl -H "x-api-key: API_TOKEN" \
  "https://letscast.fm/api/v1/analytics/downloads"
```

If the token is missing or invalid, the API responds with HTTP status 401 and a JSON error message. Do not retry the request in that case, check the token instead.

All endpoints return the same numbers as the analytics in the backend: downloads from bots and known data centers are filtered out.

## Limits

To keep the API reliable for everyone, the following limits apply:

- At most 60 requests per minute per token across all endpoints.
- At most 30 CSV requests per hour per token (endpoints downloads, listeners and export).
- The period of a download export may cover at most 6 months.

When a limit is exceeded, the API responds with HTTP status 429 and a JSON error message. The Retry-After header states the seconds until the next allowed attempt. Wait that long instead of retrying immediately.

## Endpoints

### Downloads of all podcasts per day

`GET /api/v1/analytics/downloads`

Returns the downloads of all your podcasts as a CSV file, aggregated per day and episode.

| Parameters | |
| --- | --- |
| `start_date` | Optional. Start date in the format YYYY-MM-DD. Without it, all data is returned. |

Example request:

```bash
curl -H "x-api-key: API_TOKEN" -o downloads-podcasts.csv \
  "https://letscast.fm/api/v1/analytics/downloads?start_date=2026-11-06"
```

Example output (CSV, tab-separated):

```
delivered_at	downloads	podcast	episode_number	episode_title
2025-10-01	42	Mein Podcast	12	Episode 12
```

### Listeners of all podcasts per month

`GET /api/v1/analytics/listeners`

Returns the number of unique listeners (unique IP addresses) of all your podcasts as a CSV file, aggregated per month and podcast.

| Parameters | |
| --- | --- |
| `start_date` | Optional. Start date in the format YYYY-MM-DD. Without it, all data is returned. |

Example request:

```bash
curl -H "x-api-key: API_TOKEN" -o listeners-podcasts.csv \
  "https://letscast.fm/api/v1/analytics/listeners?start_date=2026-11-06"
```

Example output (CSV, tab-separated):

```
date	listeners	podcast
2025-09	1234	Mein Podcast
```

### Download export of a podcast

`GET /api/v1/analytics/export`

Returns all individual downloads of a podcast in the selected period as a CSV file, one row per download including episode, app and country.

| Parameters | |
| --- | --- |
| `id` | Required. The ID of the podcast. |
| `start_date` | Optional. Start date in the format YYYY-MM-DD. Default: 30 days ago. |
| `end_date` | Optional. End date in the format YYYY-MM-DD. Default: today. |

Example request:

```bash
curl -H "x-api-key: API_TOKEN" -o downloads.csv \
  "https://letscast.fm/api/v1/analytics/export?id=PODCAST_ID&start_date=2026-11-06&end_date=2026-12-06"
```

Example output (CSV, comma-separated):

```
delivered_at,title,publishing_date,request_user_agent,is_bot,app,country_iso_code,country_name,count,delivered_at_YYYYMM
2025-10-01,Episode 12,2025-09-28 06:00:00,AppleCoreMedia/1.0.0 ...,0,Apple Podcasts,DE,Deutschland,1,2025-10
```

The period may cover at most 6 months, otherwise the API responds with HTTP status 400. With many downloads the file can still get large, limit the period using start_date and end_date.

### Downloads for LaMetric

`GET /api/v1/analytics/lametric`

Returns the downloads of the last 24 hours, 7 days and 30 days of a podcast as JSON in the frame format of LaMetric Time.

| Parameters | |
| --- | --- |
| `id` | Required. The ID of the podcast. |

Example request:

```bash
curl -H "x-api-key: API_TOKEN" \
  "https://letscast.fm/api/v1/analytics/lametric?id=PODCAST_ID"
```

Example response:

```
{
  "frames": [
    { "index": 0, "text": "1d: 123", "icon": "i22514" },
    { "index": 1, "text": "7d: 1.234", "icon": "i22514" },
    { "index": 2, "text": "30d: 5.678", "icon": "i22514" }
  ]
}
```

In the LaMetric app, create an "Indicator" app with the "Poll" mode, enter the URL and add your token as the header x-api-key.

## For developers and AI tools

- OpenAPI specification (YAML): https://letscast.fm/api/v1/openapi.yaml
- llms.txt: https://letscast.fm/llms.txt
- HTML: https://letscast.fm/en/api/docs
