Developer API documentation

Some Basics

How do I get access?

Authentication is token based.

In order to use the the API you’ll need to apply for a key token over here Signup. Don’t worry, it’s fast and easy.

The API is RESTful and data is provided in JSON format. Data is requested (except the sentiment service) using our internal UUIDs or a supported external UID and prefix identifying the source, see A bit about identification for supported external sources.

Not every artist has a presence on every datasource/site we track so don’t be surprised if you request data and get a 404. Similarly, for timeseries data the amount of data we have for each artist will vary.

Response Formats

JSON

Responses are returned in JSON and the generic result envelope is as follows:

{
    success: <boolean>,
    error : {}, /* Only included if success is false.
        Keys in dict: code (for the httpcode), msg (for message) */
    response: {} /* Only included if success is true */
}

Both CORS and JSONP are also provided. CORS will work in Firefox (>3.5), Chrome (>3 at least) and possible IE and Safari as well. JSONP is used by specifying the callback argument with any end point.

Which artists may I request data for?

Musicmetric tracks hundreds of thousand of artists, hopefully including the particular ones you’re after. If you’d like a list of artists that have data, you can fetch one of our Charts. In general, the more popular an artist is, the more likely we are to have data for that artist, but we have strong coverage down into the long tail of artists. If an artist is unknown to us, the A bit about identification call will return a 404 (make sure the id is correct) and if we don’t have any data from a given Artist Timeseries calls, the call will return a 204. If you’d like to tell us about an artist and their various identities across the web, the best way to do that is via the artist fantracker. If your search for an artist fails there, you’ll be able to tell us about that artist. After you’ve done that, we’ll work to add that artist to our system as quickly as possible.

Lastly

Dates are represented as epoch integer time (UTC) i.e. seconds since Jan 1st 1970. If you use these datetime stamps in Javascript you will most likely need to multiply them by 1000.

Examples presented here use the ‘curl’ command line program; any programming langauage can be used equally well.