Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get top 400 lists from iTunes

How do I get the top 400 (or more) lists for apps from iTunes? I need the top paid, free, and grossing lists for each category and overall.

I know the rss feed exists, at https://rss.itunes.apple.com/ but that only gives you the top 200. Yet sites like AppFigures and AppAnnie have lists of the top 400 or 500, and apps in the app store will show you the top 400.

I tried the EPF feed, the popularity table only has twenty rows on it, and from other forums it looks like that feed has been unavailable for months, and it doesn't update as often as these other sites seem to anyway.

I am looking for a solution directly from Apple, not via a third party. I am 99% certain that Apple provides this data hourly, but I do not know the endpoint.

like image 464
smokey_the_bear Avatar asked May 02 '15 03:05

smokey_the_bear


2 Answers

I know this is an old question, but I recently was faced with the same problem. After joining the dots from many sites, my solution goes like this:

You will need this list for the genres: https://affiliate.itunes.apple.com/resources/documentation/genre-mapping/

And this list for the country codes: https://affiliate.itunes.apple.com/resources/documentation/linking-to-the-itunes-music-store/#Legacy

This link gives you a basic RSS overview and generator, but misses so much: https://rss.itunes.apple.com/en-us

The next are examples I managed to piece together:

Top 100 Christian & Gospel
https://itunes.apple.com/au/rss/topsongs/genre=22/explicit=true/limit=100/xml

Or, the same one with JSON results
https://itunes.apple.com/au/rss/topsongs/genre=22/explicit=true/limit=100/json

Or, without the explicit songs:
https://itunes.apple.com/au/rss/topsongs/genre=22/limit=100/json    

Top 100 CCM
https://itunes.apple.com/au/rss/topalbums/genre=1094/explicit=true/limit=100/xml

Just change the genre id, and the country code.

https://itunes.apple.com/{country code}/rss/topalbums/genre={genre code}/explicit=true/limit=100/xml
like image 91
vr_driver Avatar answered Sep 30 '22 05:09

vr_driver


Here's how you do it.... you can hit a URL as follows and supply an iOS5 user agent.

_IOS_DEEP_RANK_URL_BASE = 'https://itunes.apple.com/WebObjects/MZStore.woa/wa/topChartFragmentData?genreId=%s&popId=%s&pageNumbers=%d&pageSize=%d'

_IOS_DEEP_RANK_USERAGENT =  'iTunes-iPad/5.1.1 (64GB; dt:28)'

You need to set the store front too, based on what country you want.

"X-Apple-Store-Front: 143441-1,9"
like image 28
Andrew Johnson Avatar answered Sep 30 '22 05:09

Andrew Johnson