close
The Wayback Machine - https://web.archive.org/web/20140813134615/https://developer.beatsmusic.com/docs/read/artists/Tracks

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 desc Order by descending predicted popularity
popularity Synonym for popularity desc
title asc Order alphabetically by title
title Synonym for title asc
title desc Order reverse alphabetically by title
release_date asc Order by ascending release date (oldest first)
release_date Synonym for release_date asc
original_release_date Synonym for original_release_date asc
release_date desc Order by descending release date (newest first)
popularity


filters

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:

 

  • streamable: The entity can currently be streamed
  • future_streamable: The entity is scheduled to be streamable sometime in the future.
  • never_streamable: The entity is not currently streamable and not scheduled to be streamable in the future.

 

Valid Values:

streamable:true|false Include/exclude streamable entities. Default true
future_streamable:true|false Include/exclude future_streamable entities. Default false
never_streamable:true|false Include/exclude never_streamable entities. Default false


Example:
filters=streamable:false&filters=future_streamable:true

ids

optional Array of unique track IDs.

 

Response Elements

ResponseDescription
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
Example:
Jay Z & Kanye West

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.
Note: This does not necessarily reflect historic popularity of the item, as new items can be assigned high popularity based on projected demand.

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.
ref_type
The API object type of the item being referred to.
id
Unique ID of the referenced item.
display
Text to be displayed when showing a link to the referenced item


 

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)"
      }
    }
  }]
}

Docs Navigation