Skip to content
Newer
Older
100644 133 lines (113 sloc) 4.3 KB
0b50201 @tchapi Dear API, you deserve a better documentation. KR.
tchapi authored Nov 28, 2012
1 # Search Service : getBestMatch
2
3 GET search/getBestMatch
4
5 ## Description
6
7 Search for an equivalent object, by title, artist, album or ISRC. Returns only one object.
8
9 If the ISRC is present and valid, it will be taken as the strongest bind and thus used to find the equivalent recording in the database. In case ISRC is not used or is invalid, the title, album and artist terms will be used to find the closest match in our database.
10
11 ***
12
13 ## Requires authentication
14
15 __Requires a valid app_id__
16
17 ***
18
19 ## Parameters
20
21 > + `app_id` - _required_ : Your Application ID (see [Application authentication](https://github.com/Qobuz/api-documentation#application-auth))
22 > + `type` - _required_ : The type of object to search the equivalent for
23 > + `isrc` - _optional_ : specifies an ISRC (XX-YYY-NN-ZZZZZ) (for type = 'tracks' only)
24 > + `title` - _optional_ : Specifies a title to search for (for type = 'tracks' only)
25 > + `album` - _optional_ : Specifies an album title to search for (for type = 'tracks' and 'album' only)
26 > + `artist` - _optional_ : Specifies an artist name to search for (for all types)
27 > + `availableForStreaming` - _optional_ : Specifies whether the returned object must be streamable or not (for type = 'tracks' only)
28
29 ***
30
31 ## Example
32 **Request**
33
34 http://www.qobuz.com/api.json/0.2/search/getBestMatch?app_id=100000000&isrc=Frt155607031&type=tracks&title=Don%20Giovanni
35
36 **Return**
37
38 ```json
39 {
40 "query": {
41 "title": "",
42 "artist": "",
43 "album": "",
44 "isrc": "FRT155607031",
45 "type": "tracks",
46 "availableForStreaming": ""
47 },
48 "found": true,
49 "tracks": {
50 "bestMatch": {
51 "id": 2184483,
52 "title": "Don Giovanni : Acte I - Scène XII : Récitatif \"Povera sventurata\"",
53 "track_number": 19,
54 "media_number": 1,
55 "duration": 23,
56 "streamable": false,
57 "purchasable": false,
58 "composer": {
59 "id": 488,
60 "name": "Wolfgang Amadeus Mozart"
61 },
62 "performers": "Antonio Campo, baryton (Don Giovanni)\r - Orchestre de la Société des Concerts du Conservatoire\r - Hans Rosbaud, piano & direction",
63 "version": null,
64 "copyright": null,
65 "work": "Don Giovanni",
66 "album": {
67 "id": "0000020100618",
68 "title": "Don Giovanni (Intégrale)",
69 "released_at": 1276812000,
70 "purchasable": false,
71 "image": {
72 "large": "http://static.qobuz.com/images/jaquettes/0000/0000020100618_600.jpg",
73 "small": "http://static.qobuz.com/images/jaquettes/0000/0000020100618_230.jpg",
74 "thumbnail": "http://static.qobuz.com/images/jaquettes/0000/0000020100618_50.jpg",
75 "back": null
76 },
77 "artist": {
78 "id": 28891,
79 "name": "Hans Rosbaud"
80 },
81 "label": {
82 "id": 1468,
83 "name": "Qobuz"
84 },
85 "genre": {
86 "id": 55,
87 "name": "Opéra"
88 },
89 "description": null,
90 "url": "http://www.qobuz.com/album/wolfgang-amadeus-mozart-don-giovanni-integrale/0000020100618"
91 }
92 }
93 }
94 }
95 ```
96
97 **Request**
98
99 http://www.qobuz.com/api.json/0.2/search/getBestMatch?app_id=100000000&artist=radiohead&album=pablo&type=albums
100
101 **Return**
102 ```json
103 {
104 "query": {
105 "title": "",
106 "artist": "radiohead",
107 "album": "pablo",
108 "isrc": "",
109 "type": "albums",
110 "availableForStreaming": ""
111 },
112 "found": true,
113 "albums": {
114 "bestMatch": {
115 "id": "5099969360152",
116 "title": "Pablo Honey - Edition collector",
117 "released_at": 1237762800,
118 "purchasable": true,
119 "image": {
120 "large": "http://static.qobuz.com/img/common/default_cover_600.png",
121 "small": "http://static.qobuz.com/img/common/default_cover_230.png",
122 "thumbnail": "http://static.qobuz.com/img/common/default_cover_50.png"
123 },
124 "artist": {
125 "id": null,
126 "name": "Radiohead"
127 }
128 }
129 }
130 }
131 ```
132
Something went wrong with that request. Please try again.