The country list API enables you to retrieve a current list of country codes and their respective country names. It does not require an API key. Requests are rate-limited to once per five seconds.
- Proxy & VPN Detection API
- Email Verification API
- Phone Number Validation API
- Device Fingerprint API
- Malicious URL Scanner API
- Mobile Device Fingerprinting SDK
- Gaming Fraud Detection SDK
- Dark Web Leak API
- Malware File Scanner API
- Request List API
- Fraud Reporting API
- Account Management APIs
- Bulk Validation CSV API
- Allowlist & Blocklist APIs
- Plugins Platforms & Integrations
- IP Reputation Database
- Email Verification Database
- Custom Integrations
- Country List API
Getting Started
About the Country List API
Using the API
This API allows you to retrieve a map of country codes and names to convert from a two-character country code into a full country name. There are two versions of this list available: JSON and raw.
JSON
Raw
Example Response
Below is an example of the JSON response. The raw response is similar but uses a new line delimited colon-separated list instead.
1
{
2
"message": "Country List",
3
"success": true,
4
"countries": {
5
"US": "United States",
6
"CA": "Canada",
7
"GB": "United Kingdom",
8
"AF": "Afghanistan",
9
"AX": "Aland Islands",
10
"AL": "Albania",
11
"DZ": "Algeria",
12
"AS": "American Samoa",
13
"AD": "Andorra",
14
"AO": "Angola",
15
"AI": "Anguilla",
16
"AQ": "Antarctica",
17
"AG": "Antigua and Barbuda",
18
"AR": "Argentina",
19
"AM": "Armenia",
20
"AW": "Aruba",
21
"AU": "Australia",
22
"AT": "Austria",
23
"AZ": "Azerbaijan",
24
"BS": "Bahamas",
25
"BH": "Bahrain",
26
"BD": "Bangladesh",
27
"BB": "Barbados",
28
"BY": "Belarus",
29
"BE": "Belgium",
30
"BZ": "Belize",
31
"BJ": "Benin",
32
"BM": "Bermuda",
33
"BT": "Bhutan",
34
"BO": "Bolivia",
35
"BA": "Bosnia and Herzegovina",
36
"BW": "Botswana",
37
"BV": "Bouvet Island",
38
"BR": "Brazil",
39
"IO": "British Indian Ocean Territory",
40
"BN": "Brunei Darussalam",
41
"BG": "Bulgaria",
42
"BF": "Burkina Faso",
43
"BI": "Burundi",
44
"KH": "Cambodia",
45
"CM": "Cameroon",
46
"CV": "Cape Verde",
47
"KY": "Cayman Islands",
48
"CF": "Central African Republic",
49
"TD": "Chad",
50
"CL": "Chile",
51
"CN": "China",
52
"CX": "Christmas Island",
53
"CC": "Cocos (Keeling) Islands",
54
"CO": "Colombia",
55
"KM": "Comoros",
56
"CG": "Congo",
57
"CD": "Congo, The Democratic Republic of the",
58
"CK": "Cook Islands",
59
"CR": "Costa Rica",
60
"CI": "Cote D'Ivoire",
61
"HR": "Croatia",
62
"CU": "Cuba",
63
"CY": "Cyprus",
64
"CZ": "Czech Republic",
65
"DK": "Denmark",
66
"DJ": "Djibouti",
67
"DM": "Dominica",
68
"DO": "Dominican Republic",
69
"EC": "Ecuador",
70
"EG": "Egypt",
71
"SV": "El Salvador",
72
"GQ": "Equatorial Guinea",
73
"ER": "Eritrea",
74
"EE": "Estonia",
75
"ET": "Ethiopia",
76
"FK": "Falkland Islands (Malvinas)",
77
"FO": "Faroe Islands",
78
"FJ": "Fiji",
79
"FI": "Finland",
80
"FR": "France",
81
"GF": "French Guiana",
82
"PF": "French Polynesia",
83
"TF": "French Southern Territories",
84
"GA": "Gabon",
85
"GM": "Gambia",
86
"GE": "Georgia",
87
"DE": "Germany",
88
"GH": "Ghana",
89
"GI": "Gibraltar",
90
"GR": "Greece",
91
"GL": "Greenland",
92
"GD": "Grenada",
93
"GP": "Guadeloupe",
94
"GU": "Guam",
95
"GT": "Guatemala",
96
"GG": "Guernsey",
97
"GN": "Guinea",
98
"GW": "Guinea-Bissau",
99
"GY": "Guyana",
100
"HT": "Haiti",
101
"HM": "Heard Island and McDonald Islands",
102
"VA": "Holy See (Vatican City State)",
103
"HN": "Honduras",
104
"HK": "Hong Kong",
105
"HU": "Hungary",
106
"IS": "Iceland",
107
"IN": "India",
108
"ID": "Indonesia",
109
"IR": "Iran, Islamic Republic of",
110
"IQ": "Iraq",
111
"IE": "Ireland",
112
"IM": "Isle of Man",
113
"IL": "Israel",
114
"IT": "Italy",
115
"JM": "Jamaica",
116
"JP": "Japan",
117
"JE": "Jersey",
118
"JO": "Jordan",
119
"KZ": "Kazakhstan",
120
"KE": "Kenya",
121
"KI": "Kiribati",
122
"KP": "Korea, Democratic People's Republic of",
123
"KR": "Korea, Republic of",
124
"KW": "Kuwait",
125
"KG": "Kyrgyzstan",
126
"LA": "Lao People's Democratic Republic",
127
"LV": "Latvia",
128
"LB": "Lebanon",
129
"LS": "Lesotho",
130
"LR": "Liberia",
131
"LY": "Libyan Arab Jamahiriya",
132
"LI": "Liechtenstein",
133
"LT": "Lithuania",
134
"LU": "Luxembourg",
135
"MO": "Macao",
136
"MK": "Macedonia, The Former Yugoslav Republic of",
137
"MG": "Madagascar",
138
"MW": "Malawi",
139
"MY": "Malaysia",
140
"MV": "Maldives",
141
"ML": "Mali",
142
"MT": "Malta",
143
"MH": "Marshall Islands",
144
"MQ": "Martinique",
145
"MR": "Mauritania",
146
"MU": "Mauritius",
147
"YT": "Mayotte",
148
"MX": "Mexico",
149
"FM": "Micronesia, Federated States of",
150
"MD": "Moldova, Republic of",
151
"MC": "Monaco",
152
"MN": "Mongolia",
153
"ME": "Montenegro",
154
"MS": "Montserrat",
155
"MA": "Morocco",
156
"MZ": "Mozambique",
157
"MM": "Myanmar",
158
"NA": "Namibia",
159
"NR": "Nauru",
160
"NP": "Nepal",
161
"NL": "Netherlands",
162
"AN": "Netherlands Antilles",
163
"NC": "New Caledonia",
164
"NZ": "New Zealand",
165
"NI": "Nicaragua",
166
"NE": "Niger",
167
"NG": "Nigeria",
168
"NU": "Niue",
169
"NF": "Norfolk Island",
170
"MP": "Northern Mariana Islands",
171
"NO": "Norway",
172
"OM": "Oman",
173
"PK": "Pakistan",
174
"PW": "Palau",
175
"PS": "Palestinian Territory, Occupied",
176
"PA": "Panama",
177
"PG": "Papua New Guinea",
178
"PY": "Paraguay",
179
"PE": "Peru",
180
"PH": "Philippines",
181
"PN": "Pitcairn",
182
"PL": "Poland",
183
"PT": "Portugal",
184
"PR": "Puerto Rico",
185
"QA": "Qatar",
186
"RE": "Reunion",
187
"RO": "Romania",
188
"RU": "Russian Federation",
189
"RW": "Rwanda",
190
"BL": "Saint Barthelemy",
191
"SH": "Saint Helena",
192
"KN": "Saint Kitts and Nevis",
193
"LC": "Saint Lucia",
194
"MF": "Saint Martin",
195
"PM": "Saint Pierre and Miquelon",
196
"VC": "Saint Vincent and the Grenadines",
197
"WS": "Samoa",
198
"SM": "San Marino",
199
"ST": "Sao Tome and Principe",
200
"SA": "Saudi Arabia",
201
"SN": "Senegal",
202
"RS": "Serbia",
203
"SC": "Seychelles",
204
"SL": "Sierra Leone",
205
"SG": "Singapore",
206
"SK": "Slovakia",
207
"SI": "Slovenia",
208
"SB": "Solomon Islands",
209
"SO": "Somalia",
210
"ZA": "South Africa",
211
"GS": "South Georgia and the South Sandwich Islands",
212
"ES": "Spain",
213
"LK": "Sri Lanka",
214
"SD": "Sudan",
215
"SR": "Suriname",
216
"SJ": "Svalbard and Jan Mayen",
217
"SZ": "Swaziland",
218
"SE": "Sweden",
219
"CH": "Switzerland",
220
"SY": "Syrian Arab Republic",
221
"TW": "Taiwan, Province Of China",
222
"TJ": "Tajikistan",
223
"TZ": "Tanzania, United Republic of",
224
"TH": "Thailand",
225
"TL": "Timor-Leste",
226
"TG": "Togo",
227
"TK": "Tokelau",
228
"TO": "Tonga",
229
"TT": "Trinidad and Tobago",
230
"TN": "Tunisia",
231
"TR": "Turkey",
232
"TM": "Turkmenistan",
233
"TC": "Turks and Caicos Islands",
234
"TV": "Tuvalu",
235
"UG": "Uganda",
236
"UA": "Ukraine",
237
"AE": "United Arab Emirates",
238
"UM": "United States Minor Outlying Islands",
239
"UY": "Uruguay",
240
"UZ": "Uzbekistan",
241
"VU": "Vanuatu",
242
"VE": "Venezuela",
243
"VN": "Viet Nam",
244
"VG": "Virgin Islands, British",
245
"VI": "Virgin Islands, U.S.",
246
"WF": "Wallis And Futuna",
247
"EH": "Western Sahara",
248
"YE": "Yemen",
249
"ZM": "Zambia",
250
"ZW": "Zimbabwe"
251
}
252
}
EXAMPLE CODE
xxxxxxxxxx
1
// Base URL
2
$url = 'https://www.ipqualityscore.com/api/json/country/list';
3
4
// Finish assembling the URL and make the request.
5
$json = file_get_contents($url);
6
7
// Exit and print the response.
8
exit(print_r(json_decode($json, true)));