Country Codes
Learn about ISO 3166 country codes and how to target specific countries with Residential Proxy.
Country Codes (ISO 3166)
Residential Proxy uses ISO 3166-1 alpha-2 country codes to target specific geographic locations. This standardized format ensures compatibility and consistency across all proxy configurations.
What are ISO 3166 Country Codes?
ISO 3166-1 alpha-2 is an international standard that uses two-letter codes to represent countries and territories. Residential Proxy adopts this standard for country targeting in proxy configurations.
Format:
- Always 2 letters
- Case-insensitive (but lowercase is recommended)
- Based on English country names
Examples:
us→ United Statesgb→ United Kingdomde→ Germany (Deutschland)jp→ Japan
How to Use Country Codes
Country codes are inserted into your proxy username using the -country- parameter.
Basic Format:
username-country-{code}:password@network.mrproxy.com:10000Examples:
user123-country-us:pass456@network.mrproxy.com:10000Popular Country Codes
North America
| Country | Code | Example |
|---|---|---|
| United States | us | user-country-us:pass@network.mrproxy.com:10000 |
| Canada | ca | user-country-ca:pass@network.mrproxy.com:10000 |
| Mexico | mx | user-country-mx:pass@network.mrproxy.com:10000 |
Europe
| Country | Code | Example |
|---|---|---|
| United Kingdom | gb | user-country-gb:pass@network.mrproxy.com:10000 |
| Germany | de | user-country-de:pass@network.mrproxy.com:10000 |
| France | fr | user-country-fr:pass@network.mrproxy.com:10000 |
| Spain | es | user-country-es:pass@network.mrproxy.com:10000 |
| Italy | it | user-country-it:pass@network.mrproxy.com:10000 |
| Netherlands | nl | user-country-nl:pass@network.mrproxy.com:10000 |
| Poland | pl | user-country-pl:pass@network.mrproxy.com:10000 |
| Sweden | se | user-country-se:pass@network.mrproxy.com:10000 |
| Switzerland | ch | user-country-ch:pass@network.mrproxy.com:10000 |
| Belgium | be | user-country-be:pass@network.mrproxy.com:10000 |
| Austria | at | user-country-at:pass@network.mrproxy.com:10000 |
| Norway | no | user-country-no:pass@network.mrproxy.com:10000 |
| Denmark | dk | user-country-dk:pass@network.mrproxy.com:10000 |
| Finland | fi | user-country-fi:pass@network.mrproxy.com:10000 |
| Ireland | ie | user-country-ie:pass@network.mrproxy.com:10000 |
| Portugal | pt | user-country-pt:pass@network.mrproxy.com:10000 |
| Greece | gr | user-country-gr:pass@network.mrproxy.com:10000 |
| Czech Republic | cz | user-country-cz:pass@network.mrproxy.com:10000 |
| Romania | ro | user-country-ro:pass@network.mrproxy.com:10000 |
| Hungary | hu | user-country-hu:pass@network.mrproxy.com:10000 |
| Bulgaria | bg | user-country-bg:pass@network.mrproxy.com:10000 |
| Croatia | hr | user-country-hr:pass@network.mrproxy.com:10000 |
| Serbia | rs | user-country-rs:pass@network.mrproxy.com:10000 |
| Slovakia | sk | user-country-sk:pass@network.mrproxy.com:10000 |
| Slovenia | si | user-country-si:pass@network.mrproxy.com:10000 |
Asia
| Country | Code | Example |
|---|---|---|
| Japan | jp | user-country-jp:pass@network.mrproxy.com:10000 |
| China | cn | user-country-cn:pass@network.mrproxy.com:10000 |
| India | in | user-country-in:pass@network.mrproxy.com:10000 |
| South Korea | kr | user-country-kr:pass@network.mrproxy.com:10000 |
| Singapore | sg | user-country-sg:pass@network.mrproxy.com:10000 |
| Indonesia | id | user-country-id:pass@network.mrproxy.com:10000 |
| Thailand | th | user-country-th:pass@network.mrproxy.com:10000 |
| Vietnam | vn | user-country-vn:pass@network.mrproxy.com:10000 |
| Malaysia | my | user-country-my:pass@network.mrproxy.com:10000 |
| Philippines | ph | user-country-ph:pass@network.mrproxy.com:10000 |
| Hong Kong | hk | user-country-hk:pass@network.mrproxy.com:10000 |
| Taiwan | tw | user-country-tw:pass@network.mrproxy.com:10000 |
| Pakistan | pk | user-country-pk:pass@network.mrproxy.com:10000 |
| Bangladesh | bd | user-country-bd:pass@network.mrproxy.com:10000 |
| Israel | il | user-country-il:pass@network.mrproxy.com:10000 |
| United Arab Emirates | ae | user-country-ae:pass@network.mrproxy.com:10000 |
| Saudi Arabia | sa | user-country-sa:pass@network.mrproxy.com:10000 |
| Turkey | tr | user-country-tr:pass@network.mrproxy.com:10000 |
Oceania
| Country | Code | Example |
|---|---|---|
| Australia | au | user-country-au:pass@network.mrproxy.com:10000 |
| New Zealand | nz | user-country-nz:pass@network.mrproxy.com:10000 |
South America
| Country | Code | Example |
|---|---|---|
| Brazil | br | user-country-br:pass@network.mrproxy.com:10000 |
| Argentina | ar | user-country-ar:pass@network.mrproxy.com:10000 |
| Chile | cl | user-country-cl:pass@network.mrproxy.com:10000 |
| Colombia | co | user-country-co:pass@network.mrproxy.com:10000 |
| Peru | pe | user-country-pe:pass@network.mrproxy.com:10000 |
| Venezuela | ve | user-country-ve:pass@network.mrproxy.com:10000 |
Africa
| Country | Code | Example |
|---|---|---|
| South Africa | za | user-country-za:pass@network.mrproxy.com:10000 |
| Egypt | eg | user-country-eg:pass@network.mrproxy.com:10000 |
| Nigeria | ng | user-country-ng:pass@network.mrproxy.com:10000 |
| Kenya | ke | user-country-ke:pass@network.mrproxy.com:10000 |
| Morocco | ma | user-country-ma:pass@network.mrproxy.com:10000 |
Finding Country Codes
If you need a country code not listed above, you can:
- Search Online: Use "ISO 3166-1 alpha-2 [country name]"
- Check Wikipedia: ISO 3166-1 alpha-2 on Wikipedia
- Common Patterns: Usually the first two letters of the English country name
Common Code Notes:
- 🇬🇧 United Kingdom:
gb(Great Britain) - this is the official ISO 3166 code - 🇨🇭 Switzerland:
ch(from Latin Confoederatio Helvetica) - 🇬🇷 Greece:
gr(from Greek) - 🇰🇷 South Korea:
kr(from Korea)
Country Code Best Practices
Case Sensitivity
Country codes are case-insensitive, but lowercase is recommended for consistency:
# All valid, but lowercase is preferred
user-country-us:pass@network.mrproxy.com:10000 # ✅ Recommended
user-country-US:pass@network.mrproxy.com:10000 # ✅ Valid
user-country-Us:pass@network.mrproxy.com:10000 # ✅ Valid but inconsistentValidation
Always verify your country code is correct before deployment:
import requests
def test_country_proxy(country_code):
"""Test if a country code works with Residential Proxy"""
proxy = {
'http': f'http://user-country-{country_code}:pass@network.mrproxy.com:10000',
'https': f'http://user-country-{country_code}:pass@network.mrproxy.com:10000'
}
try:
response = requests.get('https://api.ipify.org', proxies=proxy, timeout=10)
print(f"✅ Country '{country_code}' works! IP: {response.text}")
return True
except Exception as e:
print(f"❌ Country '{country_code}' failed: {e}")
return False
# Test multiple countries
countries = ['us', 'gb', 'de', 'jp', 'au']
for country in countries:
test_country_proxy(country)Random Country Assignment
If you don't specify a country code in your username, Residential Proxy will automatically assign a random country:
# No country specified = random country
username:password@network.mrproxy.com:10000Note: While the Residential Proxy UI requires country selection, manual configuration allows omitting the country for random assignment. This maximizes IP distribution and is useful for broad scraping tasks.
Use Cases for Random Country:
- Maximum IP diversity
- Global scraping without geo-restrictions
- Testing from various locations
- Load distribution across regions
Mobile Proxy Country Codes
Mobile proxies use the same ISO 3166 format with the -mobile- parameter:
username-mobile-country-{code}:password@network.mrproxy.com:10000Examples:
user-mobile-country-us:pass@network.mrproxy.com:10000Availability: Mobile proxy availability varies by country. Popular countries (US, GB, IN, ID) have better coverage than smaller markets.
Common Errors
Invalid Country Code
Error: Connection fails or times out Cause: Country code doesn't exist or is misspelled Solution: Verify the code against ISO 3166-1 alpha-2 standard
# ❌ Wrong
user-country-usa:pass@network.mrproxy.com:10000 # Should be 'us', not 'usa'
# ✅ Correct
user-country-us:pass@network.mrproxy.com:10000Country Not Supported
Error: Connection fails or times out Cause: Country code is valid but not in Residential Proxy's coverage Solution: Try a nearby country or contact support
Wrong Country Format
Error: Authentication fails
Cause: Incorrect parameter name or position
Solution: Use -country- exactly as shown
# ❌ Wrong formats
user-c-us:pass@network.mrproxy.com:10000 # Wrong parameter name
user-us-country:pass@network.mrproxy.com:10000 # Wrong order
# ✅ Correct format
user-country-us:pass@network.mrproxy.com:10000Code Examples
Python: Multi-Country Scraping
import requests
from concurrent.futures import ThreadPoolExecutor
countries = ['us', 'gb', 'de', 'fr', 'jp', 'au']
def scrape_with_country(country_code):
"""Scrape using a specific country proxy"""
proxy = {
'http': f'http://user-country-{country_code}:pass@network.mrproxy.com:10000',
'https': f'http://user-country-{country_code}:pass@network.mrproxy.com:10000'
}
response = requests.get('https://example.com', proxies=proxy)
print(f"Scraped from {country_code.upper()}: {len(response.text)} bytes")
return response.text
# Scrape from all countries in parallel
with ThreadPoolExecutor(max_workers=len(countries)) as executor:
results = list(executor.map(scrape_with_country, countries))Node.js: Dynamic Country Selection
const axios = require('axios');
const countries = ['us', 'gb', 'de', 'fr', 'jp'];
async function scrapeFromCountry(countryCode) {
const proxy = {
host: 'network.mrproxy.com',
port: 10000,
auth: {
username: `user-country-${countryCode}`,
password: 'pass123'
}
};
try {
const response = await axios.get('https://example.com', { proxy });
console.log(`Scraped from ${countryCode.toUpperCase()}: ${response.data.length} bytes`);
return response.data;
} catch (error) {
console.error(`Error with ${countryCode}:`, error.message);
}
}
// Scrape from multiple countries
async function scrapeAll() {
for (const country of countries) {
await scrapeFromCountry(country);
}
}
scrapeAll();Complete Country Code Reference
Below is the complete list of all ISO 3166-1 alpha-2 country codes supported by Residential Proxy:
View All Country Codes (240+ countries) - Click to expand
| Country | Code | Country | Code | |
|---|---|---|---|---|
| Afghanistan | af | Liechtenstein | li | |
| Åland Islands | ax | Lithuania | lt | |
| Albania | al | Luxembourg | lu | |
| Algeria | dz | Macao | mo | |
| American Samoa | as | Macedonia | mk | |
| Andorra | ad | Madagascar | mg | |
| Angola | ao | Malawi | mw | |
| Anguilla | ai | Malaysia | my | |
| Antarctica | aq | Maldives | mv | |
| Antigua and Barbuda | ag | Mali | ml | |
| Argentina | ar | Malta | mt | |
| Armenia | am | Marshall Islands | mh | |
| Aruba | aw | Martinique | mq | |
| Australia | au | Mauritania | mr | |
| Austria | at | Mauritius | mu | |
| Azerbaijan | az | Mayotte | yt | |
| Bahamas | bs | Mexico | mx | |
| Bahrain | bh | Micronesia | fm | |
| Bangladesh | bd | Moldova | md | |
| Barbados | bb | Monaco | mc | |
| Belarus | by | Mongolia | mn | |
| Belgium | be | Montenegro | me | |
| Belize | bz | Montserrat | ms | |
| Benin | bj | Morocco | ma | |
| Bermuda | bm | Mozambique | mz | |
| Bhutan | bt | Myanmar | mm | |
| Bolivia | bo | Namibia | na | |
| Bonaire | bq | Nauru | nr | |
| Bosnia and Herzegovina | ba | Nepal | np | |
| Botswana | bw | Netherlands | nl | |
| Bouvet Island | bv | New Caledonia | nc | |
| Brazil | br | New Zealand | nz | |
| British Indian Ocean Territory | io | Nicaragua | ni | |
| Brunei | bn | Niger | ne | |
| Bulgaria | bg | Nigeria | ng | |
| Burkina Faso | bf | Niue | nu | |
| Burundi | bi | Norfolk Island | nf | |
| Cambodia | kh | Northern Mariana Islands | mp | |
| Cameroon | cm | Norway | no | |
| Canada | ca | Oman | om | |
| Cape Verde | cv | Pakistan | pk | |
| Cayman Islands | ky | Palau | pw | |
| Central African Republic | cf | Palestine | ps | |
| Chad | td | Panama | pa | |
| Chile | cl | Papua New Guinea | pg | |
| China | cn | Paraguay | py | |
| Christmas Island | cx | Peru | pe | |
| Cocos Islands | cc | Philippines | ph | |
| Colombia | co | Pitcairn | pn | |
| Comoros | km | Poland | pl | |
| Congo | cg | Portugal | pt | |
| Congo (DRC) | cd | Puerto Rico | pr | |
| Cook Islands | ck | Qatar | qa | |
| Costa Rica | cr | Réunion | re | |
| Côte d'Ivoire | ci | Romania | ro | |
| Croatia | hr | Russian Federation | ru | |
| Cuba | cu | Rwanda | rw | |
| Curaçao | cw | Saint Barthélemy | bl | |
| Cyprus | cy | Saint Helena | sh | |
| Czech Republic | cz | Saint Kitts and Nevis | kn | |
| Denmark | dk | Saint Lucia | lc | |
| Djibouti | dj | Saint Martin | mf | |
| Dominica | dm | Saint Pierre and Miquelon | pm | |
| Dominican Republic | do | Saint Vincent | vc | |
| Ecuador | ec | Samoa | ws | |
| Egypt | eg | San Marino | sm | |
| El Salvador | sv | Sao Tome and Principe | st | |
| Equatorial Guinea | gq | Saudi Arabia | sa | |
| Eritrea | er | Senegal | sn | |
| Estonia | ee | Serbia | rs | |
| Eswatini | sz | Seychelles | sc | |
| Ethiopia | et | Sierra Leone | sl | |
| Falkland Islands | fk | Singapore | sg | |
| Faroe Islands | fo | Sint Maarten | sx | |
| Fiji | fj | Slovakia | sk | |
| Finland | fi | Slovenia | si | |
| France | fr | Solomon Islands | sb | |
| French Guiana | gf | Somalia | so | |
| French Polynesia | pf | South Africa | za | |
| French Southern Territories | tf | South Georgia | gs | |
| Gabon | ga | South Sudan | ss | |
| Gambia | gm | Spain | es | |
| Georgia | ge | Sri Lanka | lk | |
| Germany | de | Sudan | sd | |
| Ghana | gh | Suriname | sr | |
| Gibraltar | gi | Svalbard and Jan Mayen | sj | |
| Greece | gr | Sweden | se | |
| Greenland | gl | Switzerland | ch | |
| Grenada | gd | Syria | sy | |
| Guadeloupe | gp | Taiwan | tw | |
| Guam | gu | Tajikistan | tj | |
| Guatemala | gt | Tanzania | tz | |
| Guernsey | gg | Thailand | th | |
| Guinea | gn | Timor-Leste | tl | |
| Guinea-Bissau | gw | Togo | tg | |
| Guyana | gy | Tokelau | tk | |
| Haiti | ht | Tonga | to | |
| Heard Island | hm | Trinidad and Tobago | tt | |
| Holy See | va | Tunisia | tn | |
| Honduras | hn | Turkey | tr | |
| Hong Kong | hk | Turkmenistan | tm | |
| Hungary | hu | Turks and Caicos Islands | tc | |
| Iceland | is | Tuvalu | tv | |
| India | in | Uganda | ug | |
| Indonesia | id | Ukraine | ua | |
| Iran | ir | United Arab Emirates | ae | |
| Iraq | iq | United Kingdom | gb | |
| Ireland | ie | United States | us | |
| Isle of Man | im | US Minor Outlying Islands | um | |
| Israel | il | Uruguay | uy | |
| Italy | it | Uzbekistan | uz | |
| Jamaica | jm | Vanuatu | vu | |
| Japan | jp | Venezuela | ve | |
| Jersey | je | Vietnam | vn | |
| Jordan | jo | Virgin Islands (British) | vg | |
| Kazakhstan | kz | Virgin Islands (U.S.) | vi | |
| Kenya | ke | Wallis and Futuna | wf | |
| Kiribati | ki | Western Sahara | eh | |
| North Korea | kp | Yemen | ye | |
| South Korea | kr | Zambia | zm | |
| Kuwait | kw | Zimbabwe | zw | |
| Kyrgyzstan | kg | |||
| Laos | la | |||
| Latvia | lv | |||
| Lebanon | lb | |||
| Lesotho | ls | |||
| Liberia | lr | |||
| Libya | ly |
Note: Not all countries may have proxy coverage. Availability depends on Residential Proxy's network infrastructure in each region. Contact support to verify coverage for specific countries.