---
title: "Pick a random song, podcast episode or video and redirect (302) to its stream url"
method: GET
path: "/random"
tags: ["Streaming and Downloads"]
---

# Pick a random song, podcast episode or video and redirect (302) to its stream url

`GET /random`

## Query parameters

- `type` 'artist' | 'album' | 'playlist' | 'podcast_episode' | 'search' | 'song' | 'video'
- `filter` string
- `bitrate` integer
- `format` string
- `offset` integer
- `stats` 0 | 1

## Other responses

- `302` — Redirect to the stream url of the randomly picked object
- `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).
- `500` — HTTP 500 Internal Server Error (error 4702).

## Changes

- **2026-07-22** `e8e6b266ea29` — 3 info
  - api operation id `random` was added
  - added the non-success response with the status `401`
  - removed the non-success response with the status `410`
- **2026-07-22** `b7f89ed4aef8` — 5 info
  - added the new optional `query` request parameter `filter`
  - added the new enum value `album` to the `query` request parameter `type`
  - added the new enum value `artist` to the `query` request parameter `type`
  - added the new enum value `playlist` to the `query` request parameter `type`
  - …1 more
- **2026-07-17** `9abb9bf6d3bf` — 1 breaking
  - api path removed without deprecation
- **2026-07-14** `aaf4166bdf3a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ampache/apis/ampache-rest-api/changes/random/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-service-production.skmtc.workers.dev/v1/apis/ampache/ampache-rest-api/revisions/e8e6b266ea29/schema)
