City
You can add a city header parameter together with the 2-letter ISO 3166-1 alpha-2 country code to target a specific city. For example, using customer-USERNAME-city-us_chicago will request a proxy specifically from Chicago, United States.
Examples of a few cities that you can target in the city parameter:
City
City parameter
Los Angeles
city-us_los_angeles
London
city-gb_london
Munich
city-de_munich
Request example
curl --proxytunnel --proxy "https://customer-USERNAME-city-us_chicago:[email protected]:1080" https://ip.goproxies.comnpm install axios https-proxy-agent// city-example.js
const axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');
const username = 'customer-USERNAME-city-us_los_angeles'; // e.g. city-us_los_angeles
const password = 'PASSWORD';
const proxyUrl = `http://${encodeURIComponent(username)}:${encodeURIComponent(password)}@hosting.goproxies.com:1080`;
const agent = new HttpsProxyAgent(proxyUrl);
(async () => {
try {
const res = await axios.get('https://ip.goproxies.com', { httpsAgent: agent, timeout: 10000 });
console.log('status:', res.status);
console.log('body:', res.data);
} catch (err) {
console.error('request error:', err.message);
}
})();# city_example.py
import requests
from urllib.parse import quote
username = "customer-USERNAME-city-gb_london" # e.g. city-gb_london
password = "PASSWORD"
proxy = f"http://{quote(username)}:{quote(password)}@hosting.goproxies.com:1080"
proxies = {"http": proxy, "https": proxy}
resp = requests.get("https://ip.goproxies.com", proxies=proxies, timeout=10)
print(resp.status_code)
print(resp.text)Note: City header will have priority against State and Country, so if used together those headers will be ignored.
Last updated
Was this helpful?

