This is documentation for version 20171116 which is deprecated. The current version is 20220401. We will continue to make deprecated versions available to customers who still use them, but new customers should use the latest version.
GET /20171116/disc POST /20171116/disc
Searches for information about CDs. Queries to /disc
must be either a FreeDB query, an
Acoustid fingerprint
query or a MusicBrainz Disc ID query.
Queries can be sent as a GET or POST request. In general, production use of OneMusicAPI should use POST for searches, because query URLs, especially for Acoustid queries, can otherwise get too long.
All queries must contain the following:
A FreeDB query specifies a FreeDB disc ID alongside a CD Table Of Contents. The TOC is required to both query FreeDB and validate results. A FreeDB query must include:
Offsets must be sent for every track and the leadout track for the results to be validated.
/20171116/disc?user_key=myUserKey&freeDbDiscId=4f06d108&track.1.offset=150&track.2.offset=16541 &track.3.offset=30314&track.4.offset=46236&track.5.offset=62800&track.6.offset=79492&track.7.offset=95384 &track.8.offset=112719&track.leadout.offset=131099
Retrieves information about habits by Neon Trees.
OneMusicAPI accepts Acoustid fingerprints in queries.
/20171116/disc?user_key=myUserKey&inc=images&track.1.duration=255&track.1.fingerprint=AQABz00mRVOLmkqD[...]
Retrieves information for the disc with the specified fingerprints. The fingerprint itself if too long to be replicated here. Such queries should always be sent as a POST.
MusicBrainz Disc ID queries can be sent to OneMusicAPI.
In addition, all queries can be further constrained with the following parameters:
inc
is set then the following additional items may be retrieved:
track.[m.]n
parameter that matched each track.inc
, if this parameter is set then the following additional items may be retrieved:
off
" (the default) or "first
". If "first
",
then provides an aggregated object in which each field is populated with the first occurrence of each datum.Here's an example response:
http://api.onemusicapi.com/20171116/disc?freeDbDiscId=4f06d108&track.1.offset=150&track.2.offset=16541&track.3.offset=30314&track.4.offset=46236&track.5.offset=62800&track.6.offset=79492&track.7.offset=95384&track.8.offset=112719&track.leadout.offset=131099&inc=images&maxResultCount=20&aggregated=first
{ "aggregated":{ "title":"habits", "artist":"Neon Trees", "year":"2011", "genre":"Rock", "image":"http://api.onemusicapi.com/20140925/images/discogs/2719042/1297955038", "tracks":[{ "title":"Sins Of My Youth", "number":"1" },{ "title":"Love And Affection", "number":"2" },{ "title":"Animal", "number":"3" },{ "title":"Your Surrender", "number":"4" },{ "title":"1983", "number":"5" },{ "title":"Girls And Boys In School", "number":"6" },{ "title":"In The Next Room", "number":"7" },{ "title":"Our War", "number":"8" }] }, "disc_match":{ "tracks":[{ "title":"Sins Of My Youth", "number":"1" },{ "title":"Love And Affection", "number":"2" },{ "title":"Animal", "number":"3" },{ "title":"Your Surrender", "number":"4" },{ "title":"1983", "number":"5" },{ "title":"Girls And Boys In School", "number":"6" },{ "title":"In The Next Room", "number":"7" },{ "title":"Our War", "number":"8" }] }, "associated_releases":[{ "title":"habits", "artist":"Neon Trees", "media":[{ "tracks":[{ "title":"Sins Of My Youth", "number":"1" },{ "title":"Love And Affection", "number":"2" },{ "title":"Animal", "number":"3" },{ "title":"Your Surrender", "number":"4" },{ "title":"1983", "number":"5" },{ "title":"Girls And Boys In School", "number":"6" },{ "title":"In The Next Room", "number":"7" },{ "title":"Our War", "number":"8" }] }], "images":[], "score":1.0 },{ "title":"Habits", "artist":"Neon Trees", "year":"2011", "genre":"Rock", "media":[{ "tracks":[{ "title":"Sins Of My Youth", "number":"1", "artist":"" },{ "title":"Love And Affection", "number":"2", "artist":"" },{ "title":"Animal", "number":"3", "artist":"" },{ "title":"Your Surrender", "number":"4", "artist":"" },{ "title":"1983", "number":"5", "artist":"" },{ "title":"Girls And Boys In School", "number":"6", "artist":"" },{ "title":"In The Next Room", "number":"7", "artist":"" },{ "title":"Our War", "number":"8", "artist":"" }] }], "images":[{ "url":"http://api.onemusicapi.com/20140925/images/discogs/2719042/1297955038", "width":"600", "height":"600" }], "score":1.0 },{ "title":"Habits", "artist":"Neon Trees", "year":"2010", "genre":"Rock", "media":[{ "tracks":[{ "title":"Sins Of My Youth", "number":"1", "artist":"" },{ "title":"Love And Affection", "number":"2", "artist":"" },{ "title":"Animal", "number":"3", "artist":"" },{ "title":"Your Surrender", "number":"4", "artist":"" },{ "title":"1983", "number":"5", "artist":"" },{ "title":"Girls And Boys In School", "number":"6", "artist":"" },{ "title":"In The Next Room", "number":"7", "artist":"" },{ "title":"Our War", "number":"8", "artist":"" }] }], "images":[{ "url":"http://api.onemusicapi.com/20140925/images/discogs/2245012/1272219288", "width":"600", "height":"600" }], "score":1.0 },{ "title":"Habits", "artist":"Neon Trees", "year":"2010", "genre":"Rock", "media":[{ "tracks":[{ "title":"Sins Of My Youth", "number":"1", "artist":"" },{ "title":"Love And Affection", "number":"2", "artist":"" },{ "title":"Animal", "number":"3", "artist":"" },{ "title":"Your Surrender", "number":"4", "artist":"" },{ "title":"1983", "number":"5", "artist":"" },{ "title":"Girls And Boys In School", "number":"6", "artist":"" },{ "title":"In The Next Room", "number":"7", "artist":"" },{ "title":"Our War", "number":"8", "artist":"" }] }], "images":[{ "url":"http://api.onemusicapi.com/20140925/images/discogs/3939321/1349981625-8754", "width":"589", "height":"595" }], "score":1.0 }] }
Because aggregated
was set to first
, the aggregated
object contains
the first occurrence of each datum of interest. Subsequently, the disc_match
provides information
about the track listing for this particular disc. Finally, associated_releases
provides more
metadata concerning the releases that this disc was part of.