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:
| Region | Countries |
|---|---|
| North America | US, CA, MX |
| Europe | GB, DE, FR, ES, IT, NL, PL, SE, NO, CH, AT, BE |
| Asia Pacific | JP, KR, AU, SG, HK, TW, IN, ID, TH, VN, PH, MY |
| South America | BR, AR, CL, CO, PE |
| Middle East | AE, SA, IL, TR |
| Africa | ZA, NG, EG, KE |
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
Use the city name without spaces. For multi-word cities, combine them:
New York→NewYorkLos Angeles→LosAngelesSan Francisco→SanFrancisco
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
- Start broad, then narrow - Begin with country, add state/city only if needed
- Check availability - Not all cities have available IPs
- Use sessions for accuracy - Combine with sticky sessions for consistent location
- Monitor success rates - Some locations may have varying availability
Next Steps
- Session Management - Maintain IP persistence
- Proxy Formats - All connection string formats
- Integration Guides - Framework-specific examples