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 =>"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!