pycmc.charts.applemusic module

pycmc.charts.applemusic.albums(date, country='US', genre='All Genres')

Query the charts/applemusic/albums endpoint for the given date.

https://api.chartmetric.com/api/charts/applemusic/albums

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

  • genre: string genre (see CM docs)

Returns

A list of dictionary of albums on AppleMusic charts.

pycmc.charts.applemusic.tracks(date, country='US', genre='All Genres')

Query the charts/applemusic/tracks endpoint for the given date.

https://api.chartmetric.com/api/charts/applemusic/tracks

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

  • genre: string genre (see CM docs)

Returns

list of dictionary of tracks on AppleMusic charts

pycmc.charts.applemusic.videos(date, country='US', genre='All Genres')

Query the charts/applemusic/videos endpoint for the given date.

https://api.chartmetric.com/api/charts/applemusic/videos

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

  • genre: string genre (see CM docs)

Returns

A list of dictionary of videos on AppleMusic charts.

pycmc.charts.beatport module

pycmc.charts.beatport.tracks(date)

Query the charts/beatport/tracks endpoint for the given date. Data available on Fridays.

https://api.chartmetric.com/api/charts/beatport

Parameters

  • date: string date in ISO format %Y-%m-%d

Returns

A list of dictionary of tracks on Beatport charts.

pycmc.charts.itunes module

pycmc.charts.itunes.albums(date, country='US')

Get the top 200 albums on iTunes charts for the given date.

https://api.chartmetric.com/api/charts/itunes/albums

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

Returns

A list of dictionary of albums data on iTunes charts.

pycmc.charts.itunes.tracks(date, country='US')

Get the top 200 tracks on itunes charts for the given date.

https://api.chartmetric.com/api/charts/itunes/tracks

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

Returns

A list of dictionary of tracks data on iTunes charts.

pycmc.charts.itunes.videos(date, country='US')

Get the top 200 videos on iTunes chart for the given date.

https://api.chartmetric.com/api/charts/itunes/videos

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

Returns

A list of dictionary of videos data on iTunes charts.

pycmc.charts.shazam module

pycmc.charts.shazam.cities(country='US')

Get the list of available cities for a given country for use in city level filtering.

https://api.chartmetric.com/api/charts/shazam/:country_code/cities

Parameters

  • country: string country code, e.g. ‘US’

**Returns*

A list of available cities for a given country.

pycmc.charts.shazam.tracks(date, country='US', city=None)

Get the top 200 tracks on Shazam chart for the given date.

https://api.chartmetric.com/api/charts/shazam

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

Returns

A list of dictionary of tracks on Shazam chart.

pycmc.charts.soundcloud module

pycmc.charts.soundcloud.tracks(date, country='US', kind='top', genre='all-music')

Get the top 200 tracks on SoundCloud chart for the given date. Data available ONLY on Fridays.

https://api.chartmetric.com/api/charts/soundcloud

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

  • kind: string ‘top’ or ‘trending’

  • genre: string genre (see CM docs)

Returns

A list of dictionary of tracks on SoundCloud chart.

pycmc.charts.spotify module

Defines methods for obtaining Spotify chart data from the chartmetric.com API.

pycmc.charts.spotify.freshfind(date)

Get the tracks from the Spotify Freshfind chart for the given date. Data available ONLY on Thursdays.

https://api.chartmetric.com/api/charts/spotify/freshfind

Parameters

  • date: string date in ISO format %Y-%m-%d, only Thursdays

Returns

A list of dictionary of tracks on Spotify Freshfind.

pycmc.charts.spotify.tracks(date, country='US', viral=False)

Get the top 200 tracks on Spotify chart for the given date.

https://api.chartmetric.com/api/charts/spotify

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string two-letter country code

  • viral: if True return tracks from Spotify viral chart, otherwise return those from regional chart

Returns

A list of dictionary of tracks on Spotify chart.

pycmc.charts.youtube module

pycmc.charts.youtube.artists(date, country='US')

Get the top 100 artists of YouTube chart. Data ONLY available on Thursdays.

https://api.chartmetric.com/api/charts/youtube/artists

Parameters

date: string date in ISO format %Y-%m-%d country: string country code, e.g. ‘US’

Returns

A list of dictionary of artists of YouTube charts.

pycmc.charts.youtube.tracks(date, country='US')

Get the top 100 tracks of YouTube charts. Data ONLY available on Thursdays.

https://api.chartmetric.com/api/charts/youtube/tracks

Parameters

date: string date in ISO format %Y-%m-%d country: string country code, e.g. ‘US’

Returns

A list of dictionary of tracks of YouTube charts.

pycmc.charts.youtube.trends(date, country='US')

Get the trends of YouTube chart. Data ONLY available on Thursdays.

https://api.chartmetric.com/api/charts/youtube/trends

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

Returns

A list of dictionaries of YouTube chart trends.

pycmc.charts.youtube.videos(date, country='US')

Get the top 100 videos of YouTube chart. Data ONLY available on Thursdays.

https://api.chartmetric.com/api/charts/youtube/videos

Parameters

  • date: string date in ISO format %Y-%m-%d

  • country: string country code, e.g. ‘US’

Returns

A list of dictionary of videos of YouTube chart.

Module contents

noindex