Using 7Digital API


Capitol Music Group and its parent Universal Music Group have made a catalog of their songs available for the Hackathon
  • ≈ 1,500 unique artists (US and Canadian)
  • ≈ 4,500 different albums/singles - all with cover artwork
  • ≈ 14,000 tracks - all with full length audio streams
  • The 7digital API’s can be used to
    • Browse the catalog by Artist and then find tracks for that artist
    • Stream the full-length audio for all tracks
    • Access cover artwork image files for all albums and singles in the catalog
  • Each team will be given an API key and secret to access the APIs
    • Only the API key is required to browse the catalog
    • However, in order to stream the audio you will need to sign the API call with your key and secret

Important Information

  • API Keys
    • Key = 7d4vr6cgb392
    • Secret = m4ntskavq56rddsa
  • You need to add the following parameter to all API calls
    • &shopId=2020
  • When calling track and release endpoints, always use parameter
    • &usageTypes=adsupportedstreaming
  • Terminology
    • Release = Album or Single

API Schema

Catalog Endpoints

Link to Documentation
Description & Sample Call
Returns a list of artists whose names match the start letter(s) supplied -
For JSON responses
  • Add “accept: application/json” to your http header request
  • curl -H “Accept: application/json” ‘…..’

Accessing Album/Single Cover Art

The release endpoint responses return a link to the album artwork - example from (1st) call above
Sizes available - 33, 50, 100, 180, 182, 200, 350, 500 and 800 pixels
The size of images returned by any API response can be adjusted by adding imageSize parameter to the request

Catalog Metadata

Streaming Audio

To stream a track you will need to build your own API call to the 7digital streaming service
  • All streaming links need to be "Oauth" signed using the API Key & Secret
  • Once generated a streaming link is only valid for 60 minutes and can only be used once
In order to stream a specific track you must specify a 7digital trackId
  • 7digital trackId's are returned by the catalog search API endpoints
Documentation on how to build a streaming link can be found here - GET /stream/catalogue

Building & Signing Streaming Links

To help build streaming links and sign them with Oauth headers we have a form that you can use here - 7digital Oauth signature reference
Here is an example of how to complete that form

Streaming Parts Of a Track

If you want to stream part of a track (clip) then you can use the range request on your streaming link
curl -v -o partial.mp4 -H "Range:bytes=81920-" "{url to aac stream}"
Please note - you'll need to calculate the number of bytes that you want to start and/or finish at