List Albums Featuring an Artist

Albums featuring this artist. Supports sorting by any column the underlying query understands, pagination via limit/offset, and isPrimary=true to restrict to albums where the artist is the primary artist.

Path Parameters
  • id
    Type: integer
    min:  
    2
    max:  
    2147483647
    required

    Chartmetric artist ID. Note: id=1 ('Various Artists') is rejected.

    • enum
      const:  
      1
      values
      • 1
Query Parameters
  • sortColumn
    Type: string enum

    Column to sort albums by. One of release_date, spotify_popularity. Defaults to release_date.

    values
    • release_date
    • spotify_popularity
  • sortOrderDesc
    Type: boolean

    If true (default), sort descending by sortColumn.

  • limit
    Type: integer

    Maximum number of albums to return. Defaults to 100.

  • offset
    Type: integer
    min:  
    0

    Number of items to skip from the start of the result set; pair with limit to paginate.

  • isPrimary
    Type: boolean

    If true, return only albums where the artist is one of the main credited artists. Defaults to false.

Responses
  • application/json
Request Example for get/api/artist/{id}/albums
curl https://api.chartmetric.com/api/artist/2/albums \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "obj": [
    {
      "id": 370590,
      "upc": "886444975025",
      "name": "BEYONCÉ [Platinum Edition]",
      "local_name": null,
      "local_name_locale": null,
      "image_url": "https://i.scdn.co/image/fd3cac76a8f1f3cab516f06873eeec16977efdf0",
      "release_date": "2014-11-24T00:00:00.000Z",
      "label": "Parkwood Entertainment/Columbia",
      "spotify_popularity": 77,
      "cm_label": 41089,
      "description": null,
      "created_at": null,
      "modified_at": "2020-06-02T00:00:28.227Z",
      "cm_album": 370590,
      "num_track": "20",
      "spotify_album_ids": [
        "2UJwKSBUz6rtW4QLK74kQu"
      ],
      "itunes_album_ids": [
        "1308530355",
        "939780552"
      ],
      "deezer_album_ids": [
        "9163719"
      ],
      "artists": [
        {
          "cm_artist": 2838,
          "name": "Beyoncé",
          "image_url": "https://i.scdn.co/image/ad8b0e5a18a5a443a2678768bd73f59833941abc"
        }
      ]
    }
  ]
}