---
title: "Download a media file (binary)"
method: GET
path: "/podcast-episodes/{episode_id}/download"
tags: ["Streaming and Downloads"]
---

# Download a media file (binary)

`GET /podcast-episodes/{episode_id}/download`

## Request

- Base URL: `https://develop.ampache.dev/rest/8/json`
- URL: `https://develop.ampache.dev/rest/8/json/podcast-episodes/{episode_id}/download`
- Auth: one of:
  - HTTP bearer
  - API key in header `auth`
  - API key in query parameter `auth`

Downloads a given media file. set format=raw to download the full file

## Path parameters

- `episode_id` string, required

## Query parameters

- `bitrate` integer
- `format` string
- `stats` 0 | 1

## Response `200`

Zip archive of the container's media files (only when `zip=1` is sent for a zipable type)

## Other responses

- `302`: Redirect to the media url; the stream itself is served from the `Location` header
- `400`: HTTP 400 Bad Request (errors 4705, 4710).
- `401`: HTTP 401 Unauthorized (error 4701).
- `403`: HTTP 403 Forbidden (errors 4700, 4703, 4742).
- `404`: HTTP 404 Not Found (error 4704).
- `416`: Range not satisfiable
- `500`: HTTP 500 Internal Server Error (error 4702).

## Changes

- **2026-07-31** `e8e6b266ea29`: 4 info
  - api operation id `downloadPodcastEpisodes` was added
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `500`
- **2026-07-31** `2ff18e50dcc1`: 2 info
  - added the media type `application/zip` for the response with the status `200`
  - added the non-success response with the status `302`
- **2026-07-31** `7ed7a764efd9`: 3 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `416`
- **2026-02-26** `c3f202b17eb7`: 1 info
  - endpoint added
- **2026-02-19** `07f53972fdd7`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/ampache/apis/ampache-rest-api/changes/podcast-episodes/:episode_id/download/get.md)

---

[API](https://skmtc.dev/ampache/apis/ampache-rest-api.md) - [All operations](https://skmtc.dev/ampache/apis/ampache-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ampache/apis/ampache-rest-api/revisions/7e3d431e8627?raw)
