Link Search Menu Expand Document

analytics.getTrendingItems

Get the top tracks and artists that are trending (being played, liked, or listened) by users on your platform.

Example URL

https://api.melodia.io/v1/analytics.getTrendingItems?time_interval=604800&count=10

Params

paramrequireddescriptiontype
time_intervalNRecent time interval, in seconds, in which to search. Defaults to 604800 (i.e., one week)Int
count_tracksNLimit for number of tracks to return (min=1, max=20, default=5)Int
count_artistsNLimit for number of tracks to return (min=1, max=20, default=5)Int

Auth

This service requires authentication. Refer to Authentication for more details.

Sample Response

{
    'statusCode': 200,
    'body': {
       "tracks": [
            {
                "trackKey": "MT239432948",
                "title": "Born on the Bayou",
                "artist": "Creedence Clearwater Revival",
                "artistKey": "MA29FE4f3gXj",
                "artwork100": "http://akamai-b.cdn.cddbp.net/cds/2.0/cover/D7E5/6608/B546/60CD_xlarge_front.jpg"
                ...
            },
            {
                "trackKey": "MT23WMd2948",
                "title": "Born in the U.S.A",
                "artist": "Bruce Springsteed",
                "artistKey": "MA29FE3243gXj",
                "artwork100": "http://akamai-b.cdn.cddbp.net/cds/2.0/cover/D7E5/6608/B546/60CD_xlarge_front.jpg"
                ...
            },
            ...
        ],
        "artists": [
            {
                "artistKey": "MT239432948",
                "artistName": "Bob Dylan"
                ...
            },
            {
                "artistKey": "MT23WMd2948",
                "artistName": "The Beach Boys",
                ...
            },
            ...
        ]
    }
}

Discussion

Call this method to get the top tracks and artists that are trending (being played, liked, or listened) by users on your platform.