Rankd for Developers
Checking API…

Music

Get an album, song or artist

GET/v1/music/{type}/{id}
No API keyRate-limited

One catalogue item as Rankd shows it: Apple Music’s details plus Rankd’s community numbers. Which fields are filled in depends on type. An album has tracks; an artist has albums, singles, topSongs and similarArtists; a song has its album. Fields that do not apply are empty arrays or null.

Parameters#

Path parameters#

NameTypeDescription
typerequiredstringWhat kind of catalogue item.
One of: album, song, artist · Example: album
idrequiredstringThe Apple Music catalogue id.
Pattern: ^[0-9]{1,15}$ · Example: 697194953

Try it#

Sends a real request to the production API through this site. No credentials are used, so you see exactly what anyone would.

Request#

curl "https://api.rankdmusic.app/v1/music/album/697194953"

Response#

A successful response is { "data": …, "meta": … }. data is a MusicItem, and meta is a Meta.

FieldTypeDescription
musicalwaysMusicRef
artworkTemplatestring or nullArtwork with {w}x{h} in place of the size.
releaseDatestring or nullRelease date, YYYY-MM-DD.
releaseYearinteger or nullRelease year.
genreNamesarray of stringApple’s genres.
trackCountinteger or nullFor albums: how many tracks.
tracksarray of MusicSummaryFor albums: the tracklist.
artistIdstring or nullFor albums and songs: the lead artist’s id.
albumsarray of MusicSummaryFor artists: their albums.
singlesarray of MusicSummaryFor artists: their singles and EPs.
topSongsarray of MusicSummaryFor artists: their most popular songs.
similarArtistsarray of MusicSummaryFor artists: artists like them.
albumMusicSummary or nullFor songs: the album they are from.
aboutstring or nullApple’s editorial notes, as plain text.
recordLabelstring or nullFor albums: the label.
copyrightstring or nullFor albums: the copyright line.
durationSecondsinteger or nullLength in seconds.
previewUrlstring or nullFor songs: Apple’s 30-second preview.
motionobject or nullWhere Rankd’s apps look for the album’s animated cover.
storefrontstringApple Music storefront.
albumIdstringAlbum id.
catalogueAvailablealwaysbooleanWhether Apple Music answered. When false, only the details Rankd stored are shown.
communityalwaysCommunity

Responses#

200The item and its community numbers.

Captured from production: GET /v1/music/album/697194953

200 response
{
  "data": {
    "music": {
      "provider": "apple_music",
      "type": "album",
      "id": "697194953",
      "title": "Discovery",
      "artistName": "Daft Punk",
      "artworkUrl": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/600x600bb.jpg"
    },
    "artworkTemplate": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/{w}x{h}bb.jpg",
    "releaseDate": "2001-03-12",
    "releaseYear": 2001,
    "genreNames": [
      "Dance",
      "House"
    ],
    "trackCount": 14,
    "tracks": [
      {
        "provider": "apple_music",
        "type": "song",
        "id": "697195462",
        "title": "One More Time",
        "artistName": "Daft Punk",
        "albumTitle": "Discovery",
        "trackNumber": 1,
        "discNumber": 1,
        "durationSeconds": 320,
        "isExplicit": false,
        "previewUrl": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/5d/93/d8/5d93d83f-ad1e-da4d-1d79-9937bdff24ec/mzaf_14396932211949300852.plus.aac.p.m4a",
        "artworkUrl": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/600x600bb.jpg",
        "artworkTemplate": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/{w}x{h}bb.jpg"
      },
      {
        "provider": "apple_music",
        "type": "song",
        "id": "697195570",
        "title": "Aerodynamic",
        "artistName": "Daft Punk",
        "albumTitle": "Discovery",
        "trackNumber": 2,
        "discNumber": 1,
        "durationSeconds": 213,
        "isExplicit": false,
        "previewUrl": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/0e/ab/8f/0eab8f87-87db-9501-110a-ad681b23ca0f/mzaf_16233060439128880755.plus.aac.p.m4a",
        "artworkUrl": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/600x600bb.jpg",
        "artworkTemplate": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/{w}x{h}bb.jpg"
      }
    ],
    "artistId": "5468295",
    "albums": [],
    "singles": [],
    "topSongs": [],
    "similarArtists": [],
    "album": null,
    "about": "100 Best Albums There’s a video that Daft Punk made to promote 2001’s Discovery in which the French duo, wearing their famous robot helmets, dance on the Tokyo subway. Some riders smile and stare, while others look politely away. At the time, Daft Punk were big enough business to dismiss goofing off—their first album, 1997’s Homework, had already sold two million copies. And yet, when asked about Discovery’s turn toward ’70s and ’80s pop, Thomas Bangalter said the goal wasn’t to evoke a specific sound or era, but the raw wonder they’d felt encountering that music as children. Dancing on the subway in a city where they didn’t speak the language, liberated from judgement and self-criticism: It’s all there in the title.\n\nThe album’s biggest singles—“One More Time”, “Harder Better Faster Stronger”, “Digital Love”—were as useful to wedding DJs as they were to pop philosophers. And the rest—the faux-metal guitars of “Aerodynamic”, the sci-fi daydream of “Veridis Quo”, the UK garage showcase of Todd Edwards on “Face to Face”—glimpsed down dozens of stylistic alleyways without disrupting the album’s course. “Electronic music”—a term that always suggested the future, however vague—was demonstrated to be as familiar and comforting as classic rock, and no less real in its depth of feeling.\n\nYou can easily trace Discovery forward to EDM and the continuing entwinement of techno and rock. But you can also trace it back to The Beatles circa Sgt. Pepper’s Lonely Hearts Club Band or The Beach Boys circa Pet Sounds and Smile: music that took pop seriously as art, but also recontextualised older, seemingly uncool styles in ways that felt progressive and fresh. Most of all, though, Daft Punk wanted to be universal. And as implausible as it may have seemed for two French men in robot helmets, Discovery got them there. “We hope all the kids will love the video,” a disembodied voice says near the end of the promo clip. “As well as their parents.”",
    "recordLabel": "Daft Life Ltd./ADA France",
    "copyright": "℗ 2001 Daft Life Limited",
    "durationSeconds": 3668,
    "previewUrl": null,
    "motion": {
      "storefront": "gb",
      "albumId": "697194953"
    },
    "catalogueAvailable": true,
    "community": {
      "ratingCount": 4,
      "averageRating": 98,
      "distribution": [
        0,
        0,
        0,
        0,
        4
      ],
      "reviewCount": 2,
      "myRating": null,
      "myReview": null,
      "snapshot": {
        "title": "Discovery",
        "artistName": "Daft Punk",
        "artworkUrl": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/fd/4a/77/fd4a77db-0ebc-d043-41a2-f32fa1bb0fb4/dj.qrikkdwj.jpg/600x600bb.jpg"
      }
    }
  },
  "meta": {
    "apiVersion": 1,
    "migrationPhase": 3,
    "sourceOfTruth": "per_account"
  }
}
400type or id is not a music reference Rankd understands.

Captured from production: GET /v1/music/album/abc

400 response
{
  "error": {
    "code": "invalid_music_reference",
    "message": "Not a music reference Rankd understands."
  }
}
404Neither the catalogue nor Rankd knows this item.

Captured from production: GET /v1/music/album/999999999999

404 response
{
  "error": {
    "code": "not_found",
    "message": "That music is not in the catalogue."
  }
}
429Too many requests this minute. Wait Retry-After seconds, then try again.

Headers: Retry-After Seconds to wait. Always 60.

429 response
{
  "error": "rate limited"
}
↑ ↓ to move↵ to open/ or ⌘K to search