Tracks
Gets a list of tracks on which the given artist was credited (uses the same options and response as the tracks collection)
Endpoint URL
/api/artists/:id/tracks
HTTP Method
GET
Authentication
Client ID required. See how to authenticate public resources here.
Parameters
| Name | Required | Description | Example | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| artist_id | required | The unique ID for the artist. | ar1033754 | ||||||||||||||||||
| offset | optional | Integer offset into results, 0 based. Defaults to 0. | 0 | ||||||||||||||||||
|
limit |
optional | Specifies the maximum number of records to retrieve. You are guaranteed to get at most this number of results, but you may get fewer. If set to zero or less, returns nothing. Maximum value is 200 (i.e., if greater than 200, returns only 200). If not supplied, defaults to 20. | 20 | ||||||||||||||||||
|
fields |
optional | An array of object fields to include in the response. Only the given fields will be returned. Default is to return all fields. | |||||||||||||||||||
|
refs |
optional | An array of referenced objects to include in the response. Only the requested ref collections will be returned. Default is to return all refs. Valid values: artists, genres, album |
|||||||||||||||||||
|
order_by |
optional | Indicates how the results set should be sorted. Valid Values (default name is track_position):
|
popularity | ||||||||||||||||||
|
|
optional | Array of filter operations to apply. Each operation is filter:value. Valid filters: genre Example: filters=genre:gn12 |
|||||||||||||||||||
|
streamability filters |
optional | Array of streamability filter operations to apply. Each operation is filter:value. Streamability refers to whether an entity, such as a track or album, can be streamed. Each entity can be in one of three states:
Valid Values:
|
|||||||||||||||||||
|
ids |
optional | Array of unique track IDs. |
Response Elements
| Response | Description |
|---|---|
| code |
Beats API response code. If successful, code is 'OK'. Otherwise it will be an error code. |
| info |
container for paging information |
|
offset |
Integer offset into results, 0 based. Always matches supplied argument value. |
|
count |
Number of results returned for this request. |
|
total |
Total number of elements available for this resource. |
| data |
List of matching tracks. Each element is a track object: |
|
type |
The entity type of the API object |
|
id |
Unique ID of the track |
|
artist_display_name |
The string representing the name to display as the artist credit |
|
duration |
Total duration of the audio, in seconds. |
|
parental_advisory |
Boolean value indicating if the item has a parental advisory (a.k.a. explicit) warning. |
|
edited_version |
Boolean value indicating if the item has is an edited version of an explicit song. |
|
popularity |
The current projected popularity, relative to other items of the same type, on a scale from 0.0 to 1.0. |
|
track_position |
The position of the track in the album’s ordered track sequence, starting from 1. If the album is multi-disc, only the first track of the first disc starts from one – the others start from where the previous disc left off. |
|
disc_number |
If the track is from a multi-disc album, the disc number on which this track appears, otherwise 1. |
|
streamable |
Boolean value indicating whether the currently logged-in user has rights to stream the track. |
|
refs |
Object with keys corresponding to referenced object types, and values providing the bare information needed for linking to the objects. |
Example Request
curl -X GET "https://partner.api.beatsmusic.com/v1/api/artists/ar3782/tracks?
order_by=popularity
&client_id=[YOUR_CLIENT_ID]"
Example Response
{
"code": "OK",
"info": {
"offset": 0,
"count": 1,
"total": 476
},
"data": [{
"type": "track",
"id": "tr26832871",
"title": "You",
"artist_display_name": "Radiohead & U2",
"duration": 207,
"parental_advisory": true,
"edited_version": true,
"popularity": 0.9706,
"track_position": 3,
"disc_number": 1,
"streamable": true,
"release_date": "1993-04-20T00:00:00Z",
"refs": {
"artists": [{
"ref_type": "artist",
"id": "ar27304",
"display": "Radiohead"
},{
"ref_type": "artist",
"id": "ar4828",
"display": "U2"
}],
"album": {
"ref_type": "album",
"id": "al26832869",
"display": "Pablo Honey (Collector’s Edition)"
}
}
}]
}

