A bit about identification¶
ID sources¶
In addition to requesting an entity by the internal semetrid UUID, a number of third-party ID schemes can be used to request artist resources. The currently supported sources are listed below (the literal source name is also the prefix) along with a few examples. Note that not all ID schemes will work for all artists, the artist must be on a given network and we have to know about it. If an artist is missing and know they’re on a given network tell us about it.
Aside from our internal IDs (which provide full coverage of all the artists we know about), musicbrainz IDs provide near total coverage of artists in our system.
examples¶
The following are all equivelant ways (not exhaustive) to refer to the artist Ladytron:
Semetric UUID:
32e628734a6a4100834a05032a909813
musicbrainz ID:
musicbrainz:b45335d1-5219-4262-a44d-936aa36eeaed
last.fm artist name:
lastfm:ladytron
songkick artist name:
songkick:16865
twitter artist id:
twitter:29797333
Identity lookup service¶
To verify that our service knows about a particular id or to retrieve the interal semetric UUID for an artist use the endpoint:
http://api.semetric.com/artist/[id]?token=YOURAPIKEYHERE
By way of example either of these three lines:
$curl http://api.semetric.com/artist/32e628734a6a4100834a05032a909813?token=YOURAPIKEYHERE
$curl http://api.semetric.com/artist/musicbrainz:b45335d1-5219-4262-a44d-936aa36eeaed?token=YOURAPIKEYHERE
$curl http://api.semetric.com/artist/lastfm:ladytron?token=YOURAPIKEYHERE
return the same response:
{"response": {
"id": "32e628734a6a4100834a05032a909813",
"name": "Ladytron"},
"success": true}
while this line (or any other id that doesn’t exist or our system doesn’t know about):
$curl http://api.semetric.com/artist/lastfm:this+is+made+up?token=YOURAPIKEYHERE
returns the following error:
{"success": false,
"error": {
"msg": "This resource could not be found",
"code": 404}
}