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'
}
@hienyimba
Copy link

I have been trying unsuccessfully to use the list the Iran app store here - https://baixarapk.gratis/ but it seems its now blocked. Any ideas? Their language is unique so Arabic won't work.

@benkaiser
Copy link

Sorted by country name instead of code:

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

@wulanding
Copy link

How come this list is missing Korea?

@shahul131
Copy link

USA

@GeorgeL9
Copy link

GeorgeL9 commented Nov 24, 2021

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

@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