> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/api-reference/rest-api/analytics.md). Agents can also search and read this documentation through its [MCP server](https://docs.podigee.com/~gitbook/mcp).

# REST API analytics

Endpoints, time range parameters, gates, and errors of the analytics endpoints in the REST API v1.

Use this reference when you pull download and listener analytics, overview data, achievements, or weekly reports into your own tools. Paths are relative to `https://app.podigee.com/api/v1`.

For Podigee video plays, Spotify, and YouTube, use the routes in [Analytics by source](#analytics-by-source).

## Gate

| Rule         | Effect                                                                                                                                                                                                           |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Plan         | The analytics endpoints are available on Scale and above, or on an older plan that includes them. Otherwise the response is `403` with `You don't have the required permissions to use the Analytics API.`       |
| Podcast      | The podcast must be published, and an organization member needs the permission to view analytics. Otherwise the response is `403` with `You don't have the permission to use the Analytics API on this podcast.` |
| Achievements | `GET /podcasts/{podcast_id}/achievements` needs only a visible podcast and a valid achievement type.                                                                                                             |

## Endpoints

| Method | Path                                                  | Purpose                                      | Notable parameters                                        | Response notes                                                                                                                                                                                                                                                                                                                            |
| ------ | ----------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET`  | `/podcasts/{podcast_id}/analytics`                    | Downloads of a podcast over time             | `from` and `to`, or `days_offset`; `granularity`          | `{"meta": {...}, "objects": [...]}` with zero-filled days.                                                                                                                                                                                                                                                                                |
| `GET`  | `/podcasts/{podcast_id}/analytics/episodes`           | Downloads per episode of a podcast           | `from` and `to`, both required                            | The endpoint does not read `days_offset`. Without `from` and `to`, the response is `400`.                                                                                                                                                                                                                                                 |
| `GET`  | `/podcasts/{podcast_id}/analytics/listeners`          | Listener analytics of a podcast              | Time range parameters as above                            |                                                                                                                                                                                                                                                                                                                                           |
| `POST` | `/podcasts/{podcast_id}/analytics/legacy_export`      | Prepare a CSV export of the download history | none                                                      | `202` when the export was started; `409` with `An export is already being prepared.`; `403` with `The legacy analytics export is not available for this podcast.`                                                                                                                                                                         |
| `GET`  | `/podcasts/{podcast_id}/achievements`                 | Achievements of a podcast                    | Achievement type                                          |                                                                                                                                                                                                                                                                                                                                           |
| `GET`  | `/podcasts/{podcast_id}/overview`                     | Overview of a podcast                        | `from` and `to`, both required; optional `scope`          | Sections depend on the analytics included in the plan. `scope=listeners` leaves out the top episodes. `scope=top_episodes` leaves out the unique listener and subscriber numbers.                                                                                                                                                         |
| `GET`  | `/podcasts/{podcast_id}/insights/listeners_over_time` | Listeners over time                          | none                                                      |                                                                                                                                                                                                                                                                                                                                           |
| `GET`  | `/podcasts/{podcast_id}/insights/podcasts_categories` | Category insights                            | none                                                      |                                                                                                                                                                                                                                                                                                                                           |
| `GET`  | `/episodes/{episode_id}/analytics`                    | Downloads of one episode over time           | `from` and `to`, or `days_since_published`; `granularity` | The episode must be published.                                                                                                                                                                                                                                                                                                            |
| `GET`  | `/analytics/reports`                                  | Weekly reports                               | none                                                      | One report for each podcast and period. `start_date` and `end_date` give the exact period of a report. Use these dates, not a calendar week. Podigee creates new reports each Wednesday. A report covers seven days, normally Monday to Sunday of the previous week. A period can start on another day when it follows an earlier report. |
| `GET`  | `/analytics/reports_archives`                         | Archived reports                             | none                                                      | Limited to the analytics history that the plan includes.                                                                                                                                                                                                                                                                                  |

The older `/statistics` paths still respond. Use the `/analytics` paths for new integrations.

## Time range parameters

| Parameter              | Meaning                                                                                      |
| ---------------------- | -------------------------------------------------------------------------------------------- |
| `from` and `to`        | Start and end of the range. Send both together.                                              |
| `days_offset`          | Number of days before today (`/podcasts/{podcast_id}/analytics` and `/analytics/listeners`). |
| `days_since_published` | Number of days after the publication (episode endpoint).                                     |
| `granularity`          | `hour`, `day`, `week`, or `month`. When omitted, the API picks a granularity for the range.  |

The API limits every range to the analytics history that your plan includes. The `meta` object of the response states the `timerange`, the `aggregation_granularity`, and, when a limit applied, the `history_window`.

## Errors

| Message                                                          | Cause                                                       |
| ---------------------------------------------------------------- | ----------------------------------------------------------- |
| `Provide from/to or days_offset parameter(s).`                   | You sent no time range parameter.                           |
| `You should provide either from/to or days_offset parameter(s).` | You sent both forms.                                        |
| `You should provide both from and to params.`                    | You sent only `from` or only `to`.                          |
| `No parameters provided. Provide from,to parameter.`             | `/analytics/episodes` did not receive both `from` and `to`. |
| `No parameters provided.Provide from/to parameter(s).`           | `/overview` received neither `from` nor `to`.               |

## Analytics by source

Podigee counts analytics from four sources. Each source has its own unit. Read each source with its own request. The API never adds two sources together, and your integration must not add them either: a download, a video play, a Spotify stream, and a YouTube view count different things.

| `source`        | Metrics                                                                                  | Unit and basis                                                                                                 | Breakdowns                                                                        | Hours                 |
| --------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------- |
| `podigee_audio` | `downloads`                                                                              | Complete downloads, counted to the IAB guidelines                                                              | `platforms`, `clients`, `clients_on_platforms`, `sources`, `countries`, `formats` | Yes                   |
| `podigee_video` | `plays`, `plays_with_picture`, `plays_without_picture`                                   | A play is a video session that loaded at least ten segments. Video plays from Apple Podcasts are counted here. | `countries`                                                                       | Yes, for `plays` only |
| `spotify`       | `plays`, `streams`                                                                       | A play lasts at least 30 seconds. A stream lasts more than 60 seconds.                                         | `countries`, `media_types` (`audio` and `video`)                                  | No                    |
| `youtube`       | `views`, `engaged_views`, `watch_time_minutes`, `subscribers_gained`, `subscribers_lost` | YouTube's own views and subscribers. `watch_time_minutes` is a decimal number.                                 | `countries`                                                                       | No                    |

The list of sources in a response also gives the `unit` and `basis` of each metric. For a plain language explanation of each figure, see [Understand video, Spotify, and YouTube figures](https://docs.podigee.com/documentation/grow-and-monetize/analytics/understand-video-spotify-and-youtube-figures).

### Routes

All routes use `GET`. `{source}` is one of the four values in the table above.

| Path                                                         | Returns                                                                                                 |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
| `/podcasts/{podcast_id}/analytics/sources`                   | Each source of the podcast with its state, metrics, breakdowns, and coverage for the range. No figures. |
| `/podcasts/{podcast_id}/analytics/sources/{source}`          | The figures of one source for the podcast, one object for each period.                                  |
| `/episodes/{episode_id}/analytics/sources/{source}`          | The figures of one source for one episode, one object for each period.                                  |
| `/podcasts/{podcast_id}/analytics/sources/{source}/episodes` | The totals of one source for each episode in the range.                                                 |
| `/podcasts/{podcast_id}/overview/sources/{source}`           | Unique audience and totals for `podigee_audio` or `podigee_video`.                                      |

Access is the same as for the other analytics endpoints: the Analytics API in the plan, and the permission to view the analytics of the podcast.

### Parameters

| Parameter              | Routes                     | Meaning                                                                                                                                                                                                        |
| ---------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `from` and `to`        | All                        | The first and the last day of the range as `YYYY-MM-DD`. Days are UTC calendar days. Send both together. `from` must not be in the future.                                                                     |
| `days_offset`          | All                        | The last N days, including today. Use it instead of `from` and `to`.                                                                                                                                           |
| `days_since_published` | Episode route              | N days from the UTC day of the publication. Use it instead of the other range parameters.                                                                                                                      |
| `granularity`          | Podcast and episode routes | `hour`, `day`, `week`, or `month`. See the rules below.                                                                                                                                                        |
| `breakdowns`           | Podcast and episode routes | A comma-separated list, for example `countries,media_types`, or the array form `breakdowns[]=countries&breakdowns[]=media_types`. Each period then carries one map for each breakdown. Default: no breakdowns. |
| `limit`                | Episode list               | 1 to 50. Default: 20.                                                                                                                                                                                          |
| `offset`               | Episode list               | The number of episodes to skip. Default: 0.                                                                                                                                                                    |

Rules for the range:

* Without a range parameter, the range is the last 30 days, including today.
* A range covers at most 366 days.
* Send one form only: `from` and `to`, `days_offset`, or `days_since_published`.
* The plan's analytics history limits the range, as on the other analytics endpoints. The response shows the limit in `meta.history_window`.
* A range that ends before the first day that the plan keeps answers `400` with `invalid_range`. The message names that first day. Podigee does not move the range to later days.

Rules for `granularity`:

* `day` is available for every range up to 366 days.
* `hour` is available only for a range of one day, and only for `podigee_audio` and `podigee_video`. Hours also need a plan with hourly analytics: Grow and above, or an older plan that includes them. In other cases, the API answers with days.
* Without `granularity`, the length of the range decides: one day gives hours, up to 32 days give days, up to 94 days give weeks, and a longer range gives months.
* A coarser granularity than the range picks is always available.
* `meta.aggregation_granularity` states the granularity of the answer.
* Weeks run from Monday to Sunday. Months are calendar months. The first and the last period can include days outside `from` and `to`. `meta.timerange` gives the exact start and end that Podigee read, as Unix seconds.

### Response

Each source response has `meta` and `objects`. `meta` contains these fields:

| Field                            | Meaning                                                                                                                        |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `source`                         | The source of the response.                                                                                                    |
| `state`                          | Always present. See [States](#states).                                                                                         |
| `timerange`                      | `start_datetime` and `end_datetime` as Unix seconds (UTC).                                                                     |
| `aggregation_granularity`        | The granularity of the periods.                                                                                                |
| `history_window`                 | The same object as on the other analytics endpoints. It shows only the limit of the plan.                                      |
| `coverage`                       | `available_from` and `available_to`: the first and the last day with data for this source. `null` when the source has no data. |
| `withheld_fields`                | The breakdowns or figures that the plan of the podcast does not include.                                                       |
| `total_count`, `limit`, `offset` | Episode list only.                                                                                                             |

Each object of a series has `period_start`: a date (`YYYY-MM-DD`), or an ISO 8601 UTC time for hours. Objects of `spotify` and `youtube` also have `reported_days` and `days_in_bucket`. `reported_days` counts the days of the period that the platform delivered. `days_in_bucket` counts the days of the complete period, from the first day that the plan keeps up to today. It is not limited to `from` and `to`. If `reported_days` is lower than `days_in_bucket`, the platform did not deliver all days of that period yet.

Rules for the figures:

* A response has the figures of one source only. It has no total across sources.
* For `podigee_audio` and `podigee_video`, a day without activity is `0`. Days before the first download or the first video play are not in the response.
* For `spotify` and `youtube`, a day that the platform did not deliver is not in the response. It is never `0`.
* An unknown value keeps the marker of its source: `unknown` for `podigee_audio`, `""` for a country that Spotify did not report, and `ZZ` (not attributed) or `""` for YouTube.
* With `breakdowns=countries`, each `youtube` object also has `countries_coverage`: the views that the country map covers. For days that YouTube added later, YouTube sends no countries, so this number can be lower than `views`.
* At a week or month granularity, `podigee_audio` counts only the days inside the plan's analytics history. `GET /podcasts/{podcast_id}/analytics` counts the complete first period, so the first period of the two endpoints can differ.

### States

Every source response states the `state` of the source for the range. Only `available` returns figures. All other states return `200` with an empty `objects` list.

The list of sources gives the state for the exact days of the range. A `spotify` or `youtube` series at week or month granularity can still answer `available`, because its periods can hold delivered days outside the range.

| `state`             | Meaning                                                                                                                               |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `available`         | Figures exist for the range.                                                                                                          |
| `not_connected`     | The podcast is not connected to the platform, and Podigee has no data from it. For `podigee_video`, the podcast has no video episode. |
| `not_ingested`      | The source is set up, but Podigee has received no data for the range yet.                                                             |
| `before_data_floor` | The range ends before the first day with data.                                                                                        |
| `not_reported`      | The platform reported nothing for this episode.                                                                                       |
| `withheld`          | The plan of the podcast does not include these figures.                                                                               |
| `degraded`          | Podigee could not read this source now. The response is `200` without figures. Try again later.                                       |

### Coverage and delays

| Source          | First day with data                                  | `available_to`                                                         |
| --------------- | ---------------------------------------------------- | ---------------------------------------------------------------------- |
| `podigee_audio` | The first download                                   | Today. Today is still counting.                                        |
| `podigee_video` | The first counted video play                         | Today. Today is still counting.                                        |
| `spotify`       | 2026-06-11 at the earliest                           | The newest day that Spotify delivered, normally about one day late.    |
| `youtube`       | The first day that YouTube delivered for the podcast | The newest day that YouTube delivered, normally two to five days late. |

Spotify and YouTube can revise the last 14 days. YouTube days are Pacific time days, as in YouTube Studio. Podigee keeps the dates that YouTube reports.

### Plan

| Rule                            | Effect                                                                                                                        |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Analytics history               | The plan's analytics history limits every source.                                                                             |
| Countries and formats           | Grow and above, or an older plan that includes them. Otherwise they are in `withheld_fields`.                                 |
| Other breakdowns                | Every current plan. Some older plans do not include them; then they are in `withheld_fields`.                                 |
| `media_types` of `spotify`      | Every plan that has Spotify figures.                                                                                          |
| Unique audience in the overview | Every current plan. Some older plans do not include it; then the unique figures are in `withheld_fields` and the totals stay. |

### Episode list

`GET /podcasts/{podcast_id}/analytics/sources/{source}/episodes` lists the episodes for which the source reported figures inside the range. The latest release comes first. Each object has `id`, `title`, `number`, `published_at`, and the totals of the source for the range. `meta.total_count` counts all listed episodes. Use `limit` and `offset` to read the next page.

### Overview

`GET /podcasts/{podcast_id}/overview/sources/{source}` returns the unique audience and the totals over exactly the range. The range can cover at most 40 days after the plan's analytics history is applied.

| `source`        | Figures                                               |
| --------------- | ----------------------------------------------------- |
| `podigee_audio` | `unique_listeners`, `unique_subscribers`, `downloads` |
| `podigee_video` | `unique_viewers`, `plays`                             |

`spotify` and `youtube` have no overview.

### Errors

Errors use the format of the other endpoints, with a stable `reason`. See [REST API authentication and errors](https://docs.podigee.com/api-reference/rest-api/authentication-and-errors.md).

| Status       | `reason`                      | Cause                                                                                                                                         |
| ------------ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`        | `invalid_range`               | The range is not valid, covers more than 366 days, starts in the future, ends before the first day that the plan keeps, or mixes range forms. |
| `400`        | `invalid_granularity`         | `granularity` is not `hour`, `day`, `week`, or `month`.                                                                                       |
| `400`        | `invalid_breakdown`           | The source has no breakdown with this name. The message names the breakdowns of the source.                                                   |
| `400`        | `invalid_parameter`           | `limit` or `offset` is out of range.                                                                                                          |
| `401`, `403` |                               | As on the other analytics endpoints.                                                                                                          |
| `404`        | `unknown_source`              | The source is not one of the available sources.                                                                                               |
| `404`        | `source_has_no_overview`      | You asked for the overview of `spotify` or `youtube`.                                                                                         |
| `422`        | `range_too_long_for_audience` | The overview range covers more than 40 days.                                                                                                  |
| `429`        |                               | Too many requests. See the limit below.                                                                                                       |
| `503`        | `analytics_busy`              | The request took too long. Wait for the seconds in the `Retry-After` header, then send it again.                                              |

Example:

```json
{
  "code": 400,
  "message": "youtube has no breakdown apps. It has: countries.",
  "reason": "invalid_breakdown"
}
```

The source routes have an additional limit of 60 requests per minute for each credential. A browser session has a separate limit of 60 requests per minute for each signed-in user. `GET` and `HEAD` requests count. The limit of your plan also applies. See [Rate limits](https://docs.podigee.com/api-reference/rest-api/authentication-and-errors.md#rate-limits).

### Examples

The examples do not show `history_window`.

Sources of a podcast, `GET /podcasts/42/analytics/sources?days_offset=30` on 2026-11-16:

```json
{
  "meta": {
    "timerange": { "start_datetime": 1792281600, "end_datetime": 1794873599 }
  },
  "objects": [
    {
      "source": "podigee_audio",
      "state": "available",
      "metrics": [{ "name": "downloads", "unit": "download", "basis": "iab" }],
      "breakdowns": ["platforms", "clients", "clients_on_platforms", "sources", "countries", "formats"],
      "hourly": true,
      "coverage": { "available_from": "2019-03-01", "available_to": "2026-11-16" }
    },
    {
      "source": "spotify",
      "state": "available",
      "metrics": [
        { "name": "plays", "unit": "play", "basis": "thirty_seconds" },
        { "name": "streams", "unit": "stream", "basis": "sixty_seconds" }
      ],
      "breakdowns": ["countries", "media_types"],
      "hourly": false,
      "coverage": { "available_from": "2026-06-11", "available_to": "2026-11-15" }
    },
    {
      "source": "youtube",
      "state": "not_connected",
      "metrics": [{ "name": "views", "unit": "view", "basis": "youtube_view" }],
      "breakdowns": ["countries"],
      "hourly": false,
      "coverage": null
    }
  ]
}
```

The example shortens the list: a real response lists every source and all metrics of each source.

Spotify by week, with countries:

```
GET /podcasts/42/analytics/sources/spotify?from=2026-11-02&to=2026-11-15&granularity=week&breakdowns=countries
```

Response:

```json
{
  "meta": {
    "source": "spotify",
    "state": "available",
    "timerange": { "start_datetime": 1793577600, "end_datetime": 1794787199 },
    "aggregation_granularity": "week",
    "coverage": { "available_from": "2026-06-11", "available_to": "2026-11-14" },
    "withheld_fields": []
  },
  "objects": [
    {
      "period_start": "2026-11-02",
      "reported_days": 7,
      "days_in_bucket": 7,
      "plays": 140,
      "streams": 112,
      "countries": { "DE": 90, "AT": 15, "": 7 }
    },
    {
      "period_start": "2026-11-09",
      "reported_days": 6,
      "days_in_bucket": 7,
      "plays": 120,
      "streams": 95,
      "countries": { "DE": 80, "AT": 10, "": 5 }
    }
  ]
}
```

The second week has six of seven days, because Spotify did not deliver 2026-11-15 yet.

A source without figures, `GET /podcasts/42/analytics/sources/youtube`:

```json
{
  "meta": {
    "source": "youtube",
    "state": "not_connected",
    "timerange": { "start_datetime": 1792281600, "end_datetime": 1794873599 },
    "aggregation_granularity": "day",
    "coverage": null,
    "withheld_fields": []
  },
  "objects": []
}
```

### Load daily figures into a data warehouse

Use this procedure to keep a daily copy of all sources in your own system.

1. Read `GET /podcasts/{podcast_id}/analytics/sources` for each podcast. Keep the sources with the state `available`.
2. For each podcast and source, read one year at a time with `from`, `to`, and `granularity=day`. One request covers at most 366 days. Start on the first day that your plan keeps: a range that ends before it answers `400`.
3. Store each object with the key podcast, source, and `period_start`. Do not add sources together.
4. Every day, read the last 14 days of each podcast and source with `days_offset=14` and `granularity=day`. Replace the stored rows of these days. Spotify and YouTube revise these days, and today is still counting for the Podigee sources.
5. For Spotify and YouTube, store only the days in the response. A day that is not in the response arrives later. Do not store it as `0`.
6. After a `429` or a `503`, wait for the seconds in `Retry-After`. Then send the same request again.

Result: your warehouse has one row for each podcast, source, and day, with the same figures as the Podigee analytics pages. If a request fails with `400`, correct the parameter that the `reason` names. Next, read [REST API retries and timeouts](https://docs.podigee.com/api-reference/rest-api/retries-and-timeouts.md).

## Related pages

* [REST API podcasts and episodes](https://docs.podigee.com/api-reference/rest-api/podcasts-and-episodes.md)
* The agent path for the same data: [Summarize podcast analytics](https://docs.podigee.com/documentation/start-here/ai-agents/content-analytics-and-distribution/analyze-podcast-performance)
* [REST API authentication and errors](https://docs.podigee.com/api-reference/rest-api/authentication-and-errors.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.podigee.com/api-reference/rest-api/analytics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
