Skip to main content

Country Targeting

WeProxies allows you to target specific geographic locations, from countries down to cities. This is essential for accessing geo-restricted content or testing localized experiences.

Basic Country Targeting

Add the country parameter to your username:

USERNAME-country-XX

Where XX is the ISO 3166-1 alpha-2 country code.

Example

# US IP
curl -x "http://wp_user-country-US:password@proxy.weproxies.com:1080" https://api.ipify.org

# UK IP
curl -x "http://wp_user-country-GB:password@proxy.weproxies.com:1080" https://api.ipify.org

# Germany IP
curl -x "http://wp_user-country-DE:password@proxy.weproxies.com:1080" https://api.ipify.org

Supported Countries

WeProxies supports 195+ countries. Here are the most popular:

RegionCountries
North AmericaUS, CA, MX
EuropeGB, DE, FR, ES, IT, NL, PL, SE, NO, CH, AT, BE
Asia PacificJP, KR, AU, SG, HK, TW, IN, ID, TH, VN, PH, MY
South AmericaBR, AR, CL, CO, PE
Middle EastAE, SA, IL, TR
AfricaZA, NG, EG, KE
Full Country List

Contact support for the complete list of available countries and their current IP availability.

State Targeting (US Only)

For the United States, you can target specific states:

USERNAME-country-US-state-XX

US State Examples

# California
curl -x "http://wp_user-country-US-state-CA:password@proxy.weproxies.com:1080" https://api.ipify.org

# New York
curl -x "http://wp_user-country-US-state-NY:password@proxy.weproxies.com:1080" https://api.ipify.org

# Texas
curl -x "http://wp_user-country-US-state-TX:password@proxy.weproxies.com:1080" https://api.ipify.org

Available US States

All 50 US states are supported using their standard abbreviations:

AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, 
MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC,
SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, DC

City Targeting

Target specific cities for precise geolocation:

USERNAME-country-XX-city-CityName

City Examples

# Los Angeles, USA
curl -x "http://wp_user-country-US-city-LosAngeles:password@proxy.weproxies.com:1080" https://api.ipify.org

# London, UK
curl -x "http://wp_user-country-GB-city-London:password@proxy.weproxies.com:1080" https://api.ipify.org

# Tokyo, Japan
curl -x "http://wp_user-country-JP-city-Tokyo:password@proxy.weproxies.com:1080" https://api.ipify.org
City Name Format

Use the city name without spaces. For multi-word cities, combine them:

  • New YorkNewYork
  • Los AngelesLosAngeles
  • San FranciscoSanFrancisco

Combined Targeting

Combine country, state, city, and session for precise control:

# Sticky session from New York City
curl -x "http://wp_user-country-US-state-NY-city-NewYork-session-abc123:password@proxy.weproxies.com:1080" \
https://api.ipify.org

Order of Parameters

Parameters can be in any order, but we recommend:

USERNAME-country-XX-state-XX-city-XX-session-XX

Code Examples

Python - Multi-Country Scraping

import requests
from concurrent.futures import ThreadPoolExecutor

USERNAME = "wp_user"
PASSWORD = "password"

def get_price(country):
proxy = {
"http": f"http://{USERNAME}-country-{country}:{PASSWORD}@proxy.weproxies.com:1080",
"https": f"http://{USERNAME}-country-{country}:{PASSWORD}@proxy.weproxies.com:1080"
}

response = requests.get(
"https://shop.example.com/product/123",
proxies=proxy,
timeout=30
)

return {
"country": country,
"price": extract_price(response.text)
}

# Scrape prices from multiple countries in parallel
countries = ["US", "GB", "DE", "FR", "JP"]

with ThreadPoolExecutor(max_workers=5) as executor:
results = list(executor.map(get_price, countries))

for result in results:
print(f"{result['country']}: {result['price']}")

Node.js - Geo-Targeted Requests

const axios = require('axios');
const HttpsProxyAgent = require('https-proxy-agent');

const USERNAME = 'wp_user';
const PASSWORD = 'password';

async function fetchFromCountry(country) {
const proxyUrl = `http://${USERNAME}-country-${country}:${PASSWORD}@proxy.weproxies.com:1080`;
const agent = new HttpsProxyAgent(proxyUrl);

const response = await axios.get('https://shop.example.com/product/123', {
httpsAgent: agent,
timeout: 30000
});

return {
country,
data: response.data
};
}

// Fetch from multiple countries
const countries = ['US', 'GB', 'DE', 'FR', 'JP'];
Promise.all(countries.map(fetchFromCountry))
.then(results => console.log(results));

Verifying Geolocation

Verify your proxy is using the correct location:

# Check IP geolocation
curl -x "http://wp_user-country-US-state-CA:password@proxy.weproxies.com:1080" \
https://ipapi.co/json/

Expected response:

{
"ip": "xxx.xxx.xxx.xxx",
"country_code": "US",
"country_name": "United States",
"region_code": "CA",
"region": "California",
"city": "Los Angeles"
}

Best Practices

  1. Start broad, then narrow - Begin with country, add state/city only if needed
  2. Check availability - Not all cities have available IPs
  3. Use sessions for accuracy - Combine with sticky sessions for consistent location
  4. Monitor success rates - Some locations may have varying availability

Next Steps