Skip to main content

Fake Music Track API

MOCK DATA

Fake music tracks with genre-coherent tempo, duration and explicit flags — 10 genres, each with its real-world BPM band. Seedable for stable playlists.

Generated test data for fixtures and development

Base URL
/api/music
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/music

Live requestRuns against the public API
No key required
GET/api/music?count=10&seed=42

Request parameters

Only generate tracks of this genre — bpm, durationSeconds and the explicit flag all follow it. Omit for a mix of all 10.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/music?count=10&seed=42"
const res = await fetch("https://randomapi.dev/api/music?count=10&seed=42");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/music?count=10&seed=42").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/music?count=10&seed=42"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
genre enum

Only generate tracks of this genre — bpm, durationSeconds and the explicit flag all follow it. Omit for a mix of all 10.

allowed: pop | rock | hiphop | electronic | jazz | classical | metal | country | rnb | ambient
example: genre=metal
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=track,artist
exclude list

Return all fields except these (comma-separated).

example: exclude=explicit
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 8
track string

Track title, assembled from curated word pools (classical gets movement-style titles).

example: Neon Heart

artist string

Stage name in a genre-typical pattern: band ('The …'), 'DJ …', mononym or a personal name.

example: The Velvet Satellites

album string

Album title from the same pools; occasionally self-titled (equal to the artist).

example: Silver Horizons

genre string

The track's genre — always equals ?genre when that filter is set.

example: pop

durationSeconds integer

Track length in seconds, coherent with the genre: pop 150–260, classical 120–900, ambient 240–720, all others 120–420.

example: 214

bpm integer

Tempo in beats per minute, inside the genre's band (e.g. ambient 60–90, hiphop 80–110, electronic 118–140, metal 140–200).

example: 118

year integer

Release year, 1960 through the current year.

example: 1998

explicit boolean

Explicit-lyrics flag. Always false for classical, ambient and jazz; most common for hip-hop and metal.

example: false

Documented examples

Build-generated requests and complete responses
4
Ten reproducible tracks
GET /api/music?count=10&seed=42
{
  "data": [
    {
      "track": "Dreaming in the Heart",
      "artist": "Rune",
      "album": "Rune",
      "genre": "jazz",
      "durationSeconds": 242,
      "bpm": 145,
      "year": 2023,
      "explicit": false
    },
    {
      "track": "Harbor of Rivers",
      "artist": "Juno",
      "album": "Frozen Thunder",
      "genre": "pop",
      "durationSeconds": 239,
      "bpm": 123,
      "year": 2007,
      "explicit": false
    },
    {
      "track": "Wolf of Hearts",
      "artist": "Sable",
      "album": "Sable",
      "genre": "rnb",
      "durationSeconds": 164,
      "bpm": 109,
      "year": 1960,
      "explicit": false
    },
    {
      "track": "Restless Echoes",
      "artist": "The Midnight Rivers",
      "album": "Endless Cities",
      "genre": "rock",
      "durationSeconds": 396,
      "bpm": 158,
      "year": 1970,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
A fast metal playlist
GET /api/music?genre=metal&count=5&seed=7
{
  "data": [
    {
      "track": "Silver Star",
      "artist": "The Scarlet Mirrors",
      "album": "Neon Rivers",
      "genre": "metal",
      "durationSeconds": 246,
      "bpm": 199,
      "year": 1987,
      "explicit": true
    },
    {
      "track": "Hearts",
      "artist": "The Hollow Shadows",
      "album": "Shadow",
      "genre": "metal",
      "durationSeconds": 359,
      "bpm": 179,
      "year": 2008,
      "explicit": false
    },
    {
      "track": "Cities",
      "artist": "The Silver Ghosts",
      "album": "The Silver Ghosts",
      "genre": "metal",
      "durationSeconds": 347,
      "bpm": 190,
      "year": 2010,
      "explicit": false
    },
    {
      "track": "Sky of Fires",
      "artist": "Indigo",
      "album": "Electric Summer",
      "genre": "metal",
      "durationSeconds": 420,
      "bpm": 186,
      "year": 2015,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Long-form ambient set
GET /api/music?genre=ambient&count=8&seed=3
{
  "data": [
    {
      "track": "Midnight Harbor",
      "artist": "Onyx",
      "album": "Shadow",
      "genre": "ambient",
      "durationSeconds": 518,
      "bpm": 78,
      "year": 1991,
      "explicit": false
    },
    {
      "track": "Distant Echo",
      "artist": "The Endless Wolves",
      "album": "Wolf",
      "genre": "ambient",
      "durationSeconds": 606,
      "bpm": 76,
      "year": 1988,
      "explicit": false
    },
    {
      "track": "Chasing in the Rain",
      "artist": "Indigo",
      "album": "Electric Harbor",
      "genre": "ambient",
      "durationSeconds": 591,
      "bpm": 89,
      "year": 1996,
      "explicit": false
    },
    {
      "track": "Satellites",
      "artist": "Kaia",
      "album": "Electric Echoes",
      "genre": "ambient",
      "durationSeconds": 486,
      "bpm": 73,
      "year": 2015,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Mixed playlist as CSV
GET /api/music?count=25&format=csv&seed=11
track,artist,album,genre,durationSeconds,bpm,year,explicit
Ocean of Strangers,Kaia,Restless Stars,pop,192,128,1976,false
Rhapsody No. 11 in G major,Sable,The Complete Études,classical,316,60,2012,false
Sky of Sparrows,DJ Ember,Shadow,electronic,231,134,1977,false
Ocean of Tides,Theo Okafor,Burning Echo,jazz,134,104,2025,false
Roads,Elena Calloway,Elena Calloway,rnb,170,113,1974,false
Silver Tides,The Restless Machines,Silent Wolf,rnb,313,106,1975,false
Dancing in the Fire,Vesper,Vesper,pop,193,125,1983,true
Harbor of Mirrors,Clara Aoki,Silent Road,metal,266,158,1996,false
Oceans,The Crimson Wolves,Fading Fire,rock,203,106,1983,false
River of Ghosts,Aria Marchetti,Aria Marchetti,pop,157,127,1991,false
Silent Skies,Nova,Scarlet Dreams,electronic,152,134,2011,false
Burning Fire,Indigo,Indigo,rock,354,131,2018,true
Velvet Tides (feat. Nova),DJ Shadow,Frozen Roads,hiphop,296,100,1996,false
Silver Machines,Theo Delgado,Sky,country,373,114,1962,false
Hiding in the Star (Radio Edit),Lyra,Mirror,electronic,259,138,2020,false
Skies,The Crimson Shadows,The Crimson Shadows,pop,150,112,2001,false
Étude No. 3 in G major,Theo Kovacs,The Complete Concertos,classical,470,60,1976,false
Fires,Elena Aoki,Ocean,rnb,146,99,2020,false
Northern River,Marcus Calloway,Midnight Horizon,hiphop,283,94,1970,true
Fading in the Ghost,June Lindqvist,June Lindqvist,jazz,301,160,1981,false
Concerto No. 2 in F-sharp minor,Theo Hale,The Complete Études,classical,515,113,2023,false
Lonely Shadow,The Silent Roads,Burning Fires,country,198,107,1972,false
Broken Ghosts,The Silent Roads,Wild Sparrows,country,259,99,1981,false
Neon Shadows,Sable,Harbor,metal,404,156,1969,true
Thunder of Wolves,Rune,Mirror,rnb,206,85,1996,false

About this API

Coverage & behavior

Generates fake tracks whose musical metadata actually fits the genre — built for music-player UIs, playlist mockups and audio-app demos where plain random numbers look obviously wrong.

Pick one of 10 genres with ?genre= and every record follows that genre's conventions:

  • bpm stays inside the genre's real-world tempo band: ambient 60–90, classical 60–120, hiphop 80–110, rnb 85–115, jazz 90–160, country 90–130, pop 95–130, rock 100–160, electronic 118–140, metal 140–200.
  • durationSeconds matches how long tracks of that genre actually run: pop 150–260 (radio-friendly), classical 120–900 (movement-length), ambient 240–720 (long-form), all others 120–420.
  • explicit is always false for classical, ambient and jazz; hip-hop and metal flag it most often.
  • artist names follow genre-typical stage-name patterns — bands (The Velvet Satellites) dominate rock and metal, DJ … names cluster in electronic and hip-hop, and classical artists are personal names. Classical tracks also get movement-style titles like Nocturne No. 3 in E minor.

Omit genre for a mixed playlist — each record still obeys its own genre's tempo, duration and explicit rules. Everything is fake (titles, artists and albums are assembled from curated word pools), and with a seed the same query returns byte-identical tracks forever.

Use it for

  • Fill a music-player UI or playlist mockup with believable tracks
  • Demo BPM-based features (workout apps, DJ tools) with genre-realistic tempos
  • Seeded fixtures for audio-app tests — the same playlist in every CI run

Frequently asked questions

Does the BPM match the genre?

Yes — tempo ranges are genre-coherent, so a drum-and-bass track won't come back at 70 BPM. Playlist demos stay believable.

Are these real songs?

No — track, artist and album names are generated; resemblance to real music is coincidental.

Can I build a playlist fixture in one call?

Yes — count up to 100 with genre set gives a coherent playlist, and seed keeps it stable across test runs.