Free Music API Guide

TheAudioDB provides a free music API to use in test or development environments.

Test Key
Most of the basic calls will work using the test API key of "2".

Rate Limit
Maximum 2 calls per second on all API methods

Upgrade Free Music API

join our $8 Patreon for a full private API key with upgraded features to use in production.

General search calls

Return Artist details from artist name
search.php?s={Artist name}
Example -
*Limited to 'coldplay' test

Return all Album details from artist name
searchalbum.php?s={Artist name}
Example -{APIKEY}/searchalbum.php?s=daft_punk

Return single album details from artist + album name
searchalbum.php?s={Artist name}&a={Album name}
Example -{APIKEY}/searchalbum.php?s=daft_punk&a=Homework

Return track details from artist/track name
Example -{APIKEY}/searchtrack.php?s=coldplay&t=yellow

Return Discography for an Artist with Album names and year only
Example -{APIKEY}/discography.php?s=coldplay

Return Discography for an Artist with Album names and year only using known MBID

Artist Data

Return individul Artist details using known TADB_Artist_ID
Example -{APIKEY}/artist.php?i=112024

Return individual Artist info using a known MusicBrainz_Artist_ID

Album Data

Return All Albums for an Artist using known TADB_Artist_ID
Example -{APIKEY}/album.php?i=112024

Return individual Album info using known TADB_Album_ID
Example -{APIKEY}/album.php?m=2115888

Return individual Album info using a known MusicBrainz_Release-Group_ID

Track Data

Return All Tracks for Album from known TADB_Album_ID
Example -{APIKEY}/track.php?m=2115888

Return individual track info using a known TADB_Track_ID
Example -{APIKEY}/track.php?h=32793500

Return individual track info using a known MusicBrainz_Recording_ID

Music Videos

Return all the Music videos for a known TADB_Artist_ID
Example -{APIKEY}/mvid.php?i=112024

Return all the Music videos for a known Music_Brainz_ID

Return a Music DVD from artist/mdvd name


Return The top 10 Most Loved tracks for an Artist Name{APIKEY}/track-top10.php?s=(artistname}

Return The top 10 Most Loved tracks for an Artist Music Brainz ID{APIKEY}/track-top10-mb.php?s=(Music_Brainz_Artist_ID}

Return The top 50 Most Loved Tracks of Alltime

Return The top 10 Most Loved Albums of Alltime


Preview Images
Most of the time you won't want to download the original large image, just get a small preview. This is possible simple by adding "/preview" onto the end URL. This will give you a small 200px version. This will work with and URL's in exactly the same way hopefully :)

Original Image
Small Image

Listing user ratings via the api

List every rating made by a user{apikey}/ratings-album.php?user={username}{apikey}/ratings-track.php?user={username}


Submitting user ratings via the api

Submit Rating via API{apikey}/submit-album.php?user={user}&artist={artist}&album={album}&rating={1-10}&api={apitoken}{apikey}/submit-track.php?user={user}&artist={artist}&album={album}&track={track}&rating={1-10}&api={apitoken}

Example (with api token removed)
/api/v1/json/2/submit-album.php?user=zag&artist=Alison Krauss&album=Essential&rating=7&api=&api=
/api/v1/json/2/submit-track.php?user=zag&artist=Alison Krauss&album=Essential&track=Restless&rating=7&api=

You can find the API token for on the user page, top right on the menu click on your username (it will only show up if you are logged in as yourself).

API also provides a responses in JSON like this:
{"result":"SUCCESS New rating"}
{"result":"SUCCESS Updated rating"}
{"result":"ERROR No item found"}
{"result":"ERROR Missing input"}

Current Trending Music


type: itunes (only for now but will extend in future to more sources)
country: us, gb, de, fr, it
format: albums, singles

Song Hash Lookup{APIKEY}/search-hash.php?h1={Hash1}&h2={Hash2}

NOTE: At the moment both hashes are required and must each be 16 characters long