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.comconst axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');
const username = 'customer-USERNAME-city-us_chicago'; // example
const password = 'PASSWORD';
const proxyAuth = encodeURIComponent(username) + ':' + encodeURIComponent(password);
const proxyUrl = `http://${proxyAuth}@proxy.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(res.status, res.data);
} catch (err) {
console.error('request error:', err.message);
}
})();
import requests
from urllib.parse import quote
username = "customer-USERNAME-city-us_chicago"
password = "PASSWORD"
proxy = f"http://{quote(username)}:{quote(password)}@proxy.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?

