MusicBrainz API/Examples

From MusicBrainz Wiki
< MusicBrainz API
Revision as of 14:58, 3 July 2012 by 82.161.64.225 (talk) (New page: This document describes the proposed JSON output, using example queries and the responses I am proposing. Getting a JSON response will require setting the Accept header to "application/jso...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This document describes the proposed JSON output, using example queries and the responses I am proposing. Getting a JSON response will require setting the Accept header to "application/json".

Artist

Request: http://musicbrainz.org/ws/2/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da?inc=aliases Response:

{
   "artist": {
       "id": "5b11f4ce-a62d-471e-81fc-a69a8278c7da"
       "name": "Nirvana",
       "sort-name": "Nirvana"
       "type": "Group",
       "country": "US",
       "disambiguation": "90s US grunge band",
       "life-span": {
           "ended": true,
           "begin": "1988-02",
           "end": "1994-04-05"
       },
       "aliases": { "name": "Nirvana US", "sort-name": "Nirvana US" },
   }
}

Request: http://musicbrainz.org/ws/2/artist/05cbaf37-6dc2-4f71-a0ce-d633447d90c3?inc=aliases+tags+ratings Response:

{
   "artist": {
       "id": "05cbaf37-6dc2-4f71-a0ce-d633447d90c3",
       "name": "\u6771\u65b9\u795e\u8d77",
       "sort-name": "TVXQ",
       "type": "Group",
       "life-span": {
           "ended": false,
           "begin": "2003"
       },
       "aliases": [
           { "name": "DBSK", "sort-name": "DBSK" },
           { "name": "Tohoshinki", "sort-name": "Tohoshinki", "locale": "ja", "primary": true },
           { "name": "\ub3d9\ubc29\uc2e0\uae30", "sort-name": "\ub3d9\ubc29\uc2e0\uae30", "locale": "ko_KR", "primary": true }
       ],
       "tags": [
           { "count": 1, "name": "kpop" },
           { "count": 1, "name": "jpop" },
           { "count": 1, "name": "cpop" }
       ],
       "rating": { "votes-count": 8, "value": 3.9 }
   }
}