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 States
  • gb → United Kingdom
  • de → 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:10000

Examples:

user123-country-us:pass456@network.mrproxy.com:10000

North America

CountryCodeExample
United Statesususer-country-us:pass@network.mrproxy.com:10000
Canadacauser-country-ca:pass@network.mrproxy.com:10000
Mexicomxuser-country-mx:pass@network.mrproxy.com:10000

Europe

CountryCodeExample
United Kingdomgbuser-country-gb:pass@network.mrproxy.com:10000
Germanydeuser-country-de:pass@network.mrproxy.com:10000
Francefruser-country-fr:pass@network.mrproxy.com:10000
Spainesuser-country-es:pass@network.mrproxy.com:10000
Italyituser-country-it:pass@network.mrproxy.com:10000
Netherlandsnluser-country-nl:pass@network.mrproxy.com:10000
Polandpluser-country-pl:pass@network.mrproxy.com:10000
Swedenseuser-country-se:pass@network.mrproxy.com:10000
Switzerlandchuser-country-ch:pass@network.mrproxy.com:10000
Belgiumbeuser-country-be:pass@network.mrproxy.com:10000
Austriaatuser-country-at:pass@network.mrproxy.com:10000
Norwaynouser-country-no:pass@network.mrproxy.com:10000
Denmarkdkuser-country-dk:pass@network.mrproxy.com:10000
Finlandfiuser-country-fi:pass@network.mrproxy.com:10000
Irelandieuser-country-ie:pass@network.mrproxy.com:10000
Portugalptuser-country-pt:pass@network.mrproxy.com:10000
Greecegruser-country-gr:pass@network.mrproxy.com:10000
Czech Republicczuser-country-cz:pass@network.mrproxy.com:10000
Romaniarouser-country-ro:pass@network.mrproxy.com:10000
Hungaryhuuser-country-hu:pass@network.mrproxy.com:10000
Bulgariabguser-country-bg:pass@network.mrproxy.com:10000
Croatiahruser-country-hr:pass@network.mrproxy.com:10000
Serbiarsuser-country-rs:pass@network.mrproxy.com:10000
Slovakiaskuser-country-sk:pass@network.mrproxy.com:10000
Sloveniasiuser-country-si:pass@network.mrproxy.com:10000

Asia

CountryCodeExample
Japanjpuser-country-jp:pass@network.mrproxy.com:10000
Chinacnuser-country-cn:pass@network.mrproxy.com:10000
Indiainuser-country-in:pass@network.mrproxy.com:10000
South Koreakruser-country-kr:pass@network.mrproxy.com:10000
Singaporesguser-country-sg:pass@network.mrproxy.com:10000
Indonesiaiduser-country-id:pass@network.mrproxy.com:10000
Thailandthuser-country-th:pass@network.mrproxy.com:10000
Vietnamvnuser-country-vn:pass@network.mrproxy.com:10000
Malaysiamyuser-country-my:pass@network.mrproxy.com:10000
Philippinesphuser-country-ph:pass@network.mrproxy.com:10000
Hong Konghkuser-country-hk:pass@network.mrproxy.com:10000
Taiwantwuser-country-tw:pass@network.mrproxy.com:10000
Pakistanpkuser-country-pk:pass@network.mrproxy.com:10000
Bangladeshbduser-country-bd:pass@network.mrproxy.com:10000
Israeliluser-country-il:pass@network.mrproxy.com:10000
United Arab Emiratesaeuser-country-ae:pass@network.mrproxy.com:10000
Saudi Arabiasauser-country-sa:pass@network.mrproxy.com:10000
Turkeytruser-country-tr:pass@network.mrproxy.com:10000

Oceania

CountryCodeExample
Australiaauuser-country-au:pass@network.mrproxy.com:10000
New Zealandnzuser-country-nz:pass@network.mrproxy.com:10000

South America

CountryCodeExample
Brazilbruser-country-br:pass@network.mrproxy.com:10000
Argentinaaruser-country-ar:pass@network.mrproxy.com:10000
Chilecluser-country-cl:pass@network.mrproxy.com:10000
Colombiacouser-country-co:pass@network.mrproxy.com:10000
Perupeuser-country-pe:pass@network.mrproxy.com:10000
Venezuelaveuser-country-ve:pass@network.mrproxy.com:10000

Africa

CountryCodeExample
South Africazauser-country-za:pass@network.mrproxy.com:10000
Egypteguser-country-eg:pass@network.mrproxy.com:10000
Nigerianguser-country-ng:pass@network.mrproxy.com:10000
Kenyakeuser-country-ke:pass@network.mrproxy.com:10000
Moroccomauser-country-ma:pass@network.mrproxy.com:10000

Finding Country Codes

If you need a country code not listed above, you can:

  1. Search Online: Use "ISO 3166-1 alpha-2 [country name]"
  2. Check Wikipedia: ISO 3166-1 alpha-2 on Wikipedia
  3. 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 inconsistent

Validation

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:10000

Note: 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:10000

Examples:

user-mobile-country-us:pass@network.mrproxy.com:10000

Availability: 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:10000

Country 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:10000

Code 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
CountryCodeCountryCode
AfghanistanafLiechtensteinli
Åland IslandsaxLithuanialt
AlbaniaalLuxembourglu
AlgeriadzMacaomo
American SamoaasMacedoniamk
AndorraadMadagascarmg
AngolaaoMalawimw
AnguillaaiMalaysiamy
AntarcticaaqMaldivesmv
Antigua and BarbudaagMaliml
ArgentinaarMaltamt
ArmeniaamMarshall Islandsmh
ArubaawMartiniquemq
AustraliaauMauritaniamr
AustriaatMauritiusmu
AzerbaijanazMayotteyt
BahamasbsMexicomx
BahrainbhMicronesiafm
BangladeshbdMoldovamd
BarbadosbbMonacomc
BelarusbyMongoliamn
BelgiumbeMontenegrome
BelizebzMontserratms
BeninbjMoroccoma
BermudabmMozambiquemz
BhutanbtMyanmarmm
BoliviaboNamibiana
BonairebqNaurunr
Bosnia and HerzegovinabaNepalnp
BotswanabwNetherlandsnl
Bouvet IslandbvNew Caledonianc
BrazilbrNew Zealandnz
British Indian Ocean TerritoryioNicaraguani
BruneibnNigerne
BulgariabgNigeriang
Burkina FasobfNiuenu
BurundibiNorfolk Islandnf
CambodiakhNorthern Mariana Islandsmp
CamerooncmNorwayno
CanadacaOmanom
Cape VerdecvPakistanpk
Cayman IslandskyPalaupw
Central African RepubliccfPalestineps
ChadtdPanamapa
ChileclPapua New Guineapg
ChinacnParaguaypy
Christmas IslandcxPerupe
Cocos IslandsccPhilippinesph
ColombiacoPitcairnpn
ComoroskmPolandpl
CongocgPortugalpt
Congo (DRC)cdPuerto Ricopr
Cook IslandsckQatarqa
Costa RicacrRéunionre
Côte d'IvoireciRomaniaro
CroatiahrRussian Federationru
CubacuRwandarw
CuraçaocwSaint Barthélemybl
CypruscySaint Helenash
Czech RepublicczSaint Kitts and Neviskn
DenmarkdkSaint Lucialc
DjiboutidjSaint Martinmf
DominicadmSaint Pierre and Miquelonpm
Dominican RepublicdoSaint Vincentvc
EcuadorecSamoaws
EgyptegSan Marinosm
El SalvadorsvSao Tome and Principest
Equatorial GuineagqSaudi Arabiasa
EritreaerSenegalsn
EstoniaeeSerbiars
EswatiniszSeychellessc
EthiopiaetSierra Leonesl
Falkland IslandsfkSingaporesg
Faroe IslandsfoSint Maartensx
FijifjSlovakiask
FinlandfiSloveniasi
FrancefrSolomon Islandssb
French GuianagfSomaliaso
French PolynesiapfSouth Africaza
French Southern TerritoriestfSouth Georgiags
GabongaSouth Sudanss
GambiagmSpaines
GeorgiageSri Lankalk
GermanydeSudansd
GhanaghSurinamesr
GibraltargiSvalbard and Jan Mayensj
GreecegrSwedense
GreenlandglSwitzerlandch
GrenadagdSyriasy
GuadeloupegpTaiwantw
GuamguTajikistantj
GuatemalagtTanzaniatz
GuernseyggThailandth
GuineagnTimor-Lestetl
Guinea-BissaugwTogotg
GuyanagyTokelautk
HaitihtTongato
Heard IslandhmTrinidad and Tobagott
Holy SeevaTunisiatn
HondurashnTurkeytr
Hong KonghkTurkmenistantm
HungaryhuTurks and Caicos Islandstc
IcelandisTuvalutv
IndiainUgandaug
IndonesiaidUkraineua
IranirUnited Arab Emiratesae
IraqiqUnited Kingdomgb
IrelandieUnited Statesus
Isle of ManimUS Minor Outlying Islandsum
IsraelilUruguayuy
ItalyitUzbekistanuz
JamaicajmVanuatuvu
JapanjpVenezuelave
JerseyjeVietnamvn
JordanjoVirgin Islands (British)vg
KazakhstankzVirgin Islands (U.S.)vi
KenyakeWallis and Futunawf
KiribatikiWestern Saharaeh
North KoreakpYemenye
South KoreakrZambiazm
KuwaitkwZimbabwezw
Kyrgyzstankg
Laosla
Latvialv
Lebanonlb
Lesothols
Liberialr
Libyaly

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.