---
title: "A random track"
method: GET
path: "/audio/tracks/random"
tags: ["Audio catalogue"]
---

# A random track

`GET /audio/tracks/random`

## Request

- Base URL: `https://michaelghelfistudios.com/api/v1`
- URL: `https://michaelghelfistudios.com/api/v1/audio/tracks/random`
- Auth: none declared

One published track matching the filters. "Play me a battle theme" in a bot is `?genre=Combat&type=music`; "a forest ambience" is `?type=ambience&genre=Forest`.

## Query parameters

- `type` string
- `genre` string
- `mood` string
- `era` string
- `keyword` string
- `composer` string
- `album` string
- `pack` string
- `duration_min` number
- `duration_max` number
- `q` string
- `include_versions` boolean

## Response `200`

One track.

- object
  - `success` true
  - `data` object
    - `id` string, uuid
    - `slug` string, nullable
    - `title` string
    - `version` string, nullable
    - `type` string: `music`, `ambience`, `sfx`…
    - `duration_seconds` number, nullable
    - `bpm` number, nullable
    - `key` string, nullable
    - `genre` string, nullable
    - `moods` string[]
    - `keywords` string[]
    - `instruments` string[]
    - `era` string, nullable
    - `description` string, nullable
    - `cover_url` string, nullable
    - `composer` object, nullable
      - `id` string
      - `name` string
      - `slug` string
      - `url` string
    - `album` object, nullable
      - `id` string
      - `title` string
      - `slug` string
      - `type` string
      - `url` string
    - `pack` object, nullable
    - `availability` 'album' | 'patreon' | 'null', nullable: How the full track is obtained: an album purchase, a Patreon tier, or unknown.
    - `is_version` boolean
    - `published_at` string, nullable
    - `preview_available` boolean: The site has a public preview (played by the embed card): the whole track in a lighter MP3. The API never returns audio URLs.
    - `url` string: The track page (player, licensing).
    - `embed_url` string: Iframe-able card (no audio).
    - `versions` object[]: On a single-track response: its published alternative versions.
  - `meta` object
    - `version` 'v1'
    - `lang` string
    - `license` object
      - `name` string
      - `url` string
      - `attribution` string
  - `links` object
    - `self` string
    - `docs` string

## Other responses

- `404`: Unknown item.

---

[API](https://skmtc.dev/michaelghelfistudios/apis/mgs-toolbox-public-api.md) · [All operations](https://skmtc.dev/michaelghelfistudios/apis/mgs-toolbox-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/michaelghelfistudios/apis/mgs-toolbox-public-api/revisions/20d2b0932478?raw)
