Skip to content

Instantly share code, notes, and snippets.

@daFish
Last active September 11, 2024 17:07
Show Gist options
  • Save daFish/5990634 to your computer and use it in GitHub Desktop.
Save daFish/5990634 to your computer and use it in GitHub Desktop.
List of Apple iTunes Store Country codes in Javascript.
var countries = {
ae: 'United Arab Emirates',
ag: 'Antigua and Barbuda',
ai: 'Anguilla',
al: 'Albania',
am: 'Armenia',
ao: 'Angola',
ar: 'Argentina',
at: 'Austria',
au: 'Australia',
az: 'Azerbaijan',
bb: 'Barbados',
be: 'Belgium',
bf: 'Burkina-Faso',
bg: 'Bulgaria',
bh: 'Bahrain',
bj: 'Benin',
bm: 'Bermuda',
bn: 'Brunei Darussalam',
bo: 'Bolivia',
br: 'Brazil',
bs: 'Bahamas',
bt: 'Bhutan',
bw: 'Botswana',
by: 'Belarus',
bz: 'Belize',
ca: 'Canada',
cg: 'Democratic Republic of the Congo',
ch: 'Switzerland',
cl: 'Chile',
cn: 'China',
co: 'Colombia',
cr: 'Costa Rica',
cv: 'Cape Verde',
cy: 'Cyprus',
cz: 'Czech Republic',
de: 'Germany',
dk: 'Denmark',
dm: 'Dominica',
do: 'Dominican Republic',
dz: 'Algeria',
ec: 'Ecuador',
ee: 'Estonia',
eg: 'Egypt',
es: 'Spain',
fi: 'Finland',
fj: 'Fiji',
fm: 'Federated States of Micronesia',
fr: 'France',
gb: 'Great Britain',
gd: 'Grenada',
gh: 'Ghana',
gm: 'Gambia',
gr: 'Greece',
gt: 'Guatemala',
gw: 'Guinea Bissau',
gy: 'Guyana',
hk: 'Hong Kong',
hn: 'Honduras',
hr: 'Croatia',
hu: 'Hungaria',
id: 'Indonesia',
ie: 'Ireland',
il: 'Israel',
in: 'India',
is: 'Iceland',
it: 'Italy',
jm: 'Jamaica',
jo: 'Jordan',
jp: 'Japan',
ke: 'Kenya',
kg: 'Krygyzstan',
kh: 'Cambodia',
kn: 'Saint Kitts and Nevis',
kr: 'South Korea',
kw: 'Kuwait',
ky: 'Cayman Islands',
kz: 'Kazakhstan',
la: 'Laos',
lb: 'Lebanon',
lc: 'Saint Lucia',
lk: 'Sri Lanka',
lr: 'Liberia',
lt: 'Lithuania',
lu: 'Luxembourg',
lv: 'Latvia',
md: 'Moldova',
mg: 'Madagascar',
mk: 'Macedonia',
ml: 'Mali',
mn: 'Mongolia',
mo: 'Macau',
mr: 'Mauritania',
ms: 'Montserrat',
mt: 'Malta',
mu: 'Mauritius',
mw: 'Malawi',
mx: 'Mexico',
my: 'Malaysia',
mz: 'Mozambique',
na: 'Namibia',
ne: 'Niger',
ng: 'Nigeria',
ni: 'Nicaragua',
nl: 'Netherlands',
np: 'Nepal',
no: 'Norway',
nz: 'New Zealand',
om: 'Oman',
pa: 'Panama',
pe: 'Peru',
pg: 'Papua New Guinea',
ph: 'Philippines',
pk: 'Pakistan',
pl: 'Poland',
pt: 'Portugal',
pw: 'Palau',
py: 'Paraguay',
qa: 'Qatar',
ro: 'Romania',
ru: 'Russia',
sa: 'Saudi Arabia',
sb: 'Soloman Islands',
sc: 'Seychelles',
se: 'Sweden',
sg: 'Singapore',
si: 'Slovenia',
sk: 'Slovakia',
sl: 'Sierra Leone',
sn: 'Senegal',
sr: 'Suriname',
st: 'Sao Tome e Principe',
sv: 'El Salvador',
sz: 'Swaziland',
tc: 'Turks and Caicos Islands',
td: 'Chad',
th: 'Thailand',
tj: 'Tajikistan',
tm: 'Turkmenistan',
tn: 'Tunisia',
tr: 'Turkey',
tt: 'Republic of Trinidad and Tobago',
tw: 'Taiwan',
tz: 'Tanzania',
ua: 'Ukraine',
ug: 'Uganda',
us: 'United States of America',
uy: 'Uruguay',
uz: 'Uzbekistan',
vc: 'Saint Vincent and the Grenadines',
ve: 'Venezuela',
vg: 'British Virgin Islands',
vn: 'Vietnam',
ye: 'Yemen',
za: 'South Africa',
zw: 'Zimbabwe'
}
@jcoester
Copy link

The posted list is missing 30 countries. I created an updated version here in CSV and JSON: https://lejnine.com/app-store-country-codes.html

Well done! The only list that correctly includes the new codes like XK: Kosovo. How did you fetch this information, I'm curious to keep it up to date!

@MichaelYochpaz
Copy link

MichaelYochpaz commented Mar 3, 2023

List of all 175 available iTunes Country Stores as of April 2022

@jcoester Thank you!
Out of curiosity, how did you generate the list?
Do you just send requests using all available country codes and check which ones return valid responses?

@jcoester
Copy link

jcoester commented Mar 3, 2023

List of all 175 available iTunes Country Stores as of April 2022

@jcoester Thank you! Out of curiosity, how did you generate the list? Do you just send requests using all available country codes and check which ones return valid responses?

You're welcome, @MichaelYochpaz! I just re-ran my script and found 9 new countries:
All 184 available Apple iTunes Country Stores as of March 3rd 2023

  1. AD Andorra
  2. BD Bangladesh
  3. CF Central African Republic (the)
  4. ET Ethiopia
  5. GN Guinea
  6. LI Liechtenstein
  7. MC Monaco
  8. PS Palestine, State of
  9. WS Samoa

None of those is listed yet on Apple Availability Regions, but all return valid responses, so I assume they might add them officially soon.

@jcoester
Copy link

jcoester commented Mar 6, 2023

Permanently updated iTunes Country codes: https://github.com/jcoester/iTunes-country-codes.
184 supported countries as of March 6, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment