List all songs
Get every track across the entire catalog in one request.
Get a single song
Fetch details for one track by its
song_id.List all songs
Send aGET request to /songs to retrieve every song in the catalog. The response is an array of song objects ordered by song ID.
Get a single song
Send aGET request to /songs/{songID} to retrieve one song by its ID. The example below fetches song 10, which is Wonderland from the debut album.
Song object fields
The song object returned by/songs/{songID} has three fields:
| Field | Type | Description |
|---|---|---|
song_id | integer | Stable unique identifier for the song. |
song_title | string | Song title (single-song response only). |
album_id | integer | ID of the album this song belongs to. |
The title field is named differently depending on which endpoint you call. In the list response (
GET /songs), the field is title. In the single-song response (GET /songs/{songID}), the same field is named song_title. Account for this difference when writing code that handles both responses.Finding a song’s album
Every song object includes thealbum_id it belongs to. You can use that value to call GET /albums/{albumID} and retrieve the full tracklist, or look up the album name from a cached call to GET /albums.
fetch