App Store Adds New Countries
Previously I wrote about where to find cool scripts to handle getting the App Store Rank for each country. Back in April, Apple added a few more countries to the app store, did you know? The script attached below needs to be credited to the original author: Erica Sadun. The version I use is based off of Ben‘s script with my own modifications to it to handle multiple id’s a little cleaner, and really, just a tad of code clean up that made me feel better
The script itself is attached as a zip file here: AppStoreRank.zip. This version is still written in Perl, but it is extremely easy to add a new app to the script. At the top, just modify the following section:
@appName = ( { appName =>"Hurricane",
appID => 291430598,
categoryName => "Weather" },
{ appName => "Cat Calls",
appID => 308620543,
categoryName => "Entertainment"}
);
appName is just for display purposes
appID is your application ID from the iTunes store.
categoryName should match a category in the list below (this will pull the right category number).
As you can see in my list, the order of the parameters does not matter.
Added the following store codes to my script:
# stores added April 1, 2009
143508 => “Dominican Republic”,
143509 => ‘Ecuador’,
143516 => ‘Egypt’,
143518 => ‘Estonia’,
143510 => ‘Honduras’,
143511 => ‘Jamaica’,
143517 => ‘Kazakhstan’,
143519 => ‘Latvia’,
143520 => ‘Lithuania’,
143515 => ‘Macau’,
143521 => ‘Malta’,
143523 => ‘Moldova’,
143512 => ‘Nicaragua’,
143513 => ‘Paraguay’,
143514 => ‘Uruguay’
I am a little more retentive than most, and wanted my rankings to be listed in alphabetic order, so my version of the script does this automatically.
Also the way the script is written, it can be used as a stand alone script, or as part of a package.
If you have updated the script to add a check for Ratings, I would be very interested in seeing your changes!
Enjoy!

143459 => “Schweitz/Suisse”.
This should be
143459 => “Schweiz/Suisse”
Or it could just say “Switzerland”
There’s probably not many Swiss developers using your script, but I am one of them and couldn’t help noticing
I’ve modified it further to:
- Allow you to specify the status (free or paid), rather than hardcoded in one function.
- Specify to report on a given country (again, for those non-US developers)
- Top countries (a little quicker than waiting to probe each store front)
- Other minor improvements.
Email me if you want to publish the code.
Chris: I honestly haven’t had time to investigate the changes, but I have noticed that my results are not as stable as they were prior to the AppStore update. I can’t say when I’ll have the time, but I will definitely post an update or refer to another location for an update as soon as I find one… This is just a copy of someone else’s efforts which have been updated. A branch if you will.
This script seems to have stopped working over the last week or so. Do you happen to know how to fix it?
Thanks!
itunes.apple.com/{country}/app/{appName}/id{appID}?mt=8
http://itunes.apple.com/gb/app/jellycar-2/id337319445?mt=8
Good luck!
Hope this helps!
Cheers
TiG Team