Country & City Geotargeting
The ScrapeOps Residential Proxy Aggregator enables you to use the country-level and city-level geotargeting functionality of our underlying proxy providers by using the country
and city
parameters in your requests.
If no geotargeting parameters have been set, the proxy will use a proxy from a random location, or use a proxy location that maximises the success rate.
To enable advanced proxy functionality when using the Residential Proxy endpoint you need to pass parameters by adding them to username, separated by periods.
Country Geotargeting
If you want to enable Country Geotargeting with a request, you need to pass the country parameter by adding it to proxy port username
, separated by periods. For example, to ensure your requests use US geotargeting the username would be scrapeops.country=us
.
curl -x "http://scrapeops.country=us:YOUR_API_KEY@residential-proxy.scrapeops.io:8181" "https://httpbin.org/ip"
City Geotargeting
You can target IP addresses from specific cities by adding the city
parameter along with the country
parameter. For example, to target IPs from Dublin, Ireland, your username would be scrapeops.country=ie.city=dublin
.
curl -x "http://scrapeops.country=ie.city=dublin:YOUR_API_KEY@residential-proxy.scrapeops.io:8181" "https://httpbin.org/ip"
City targeting is approximate and depends on IP availability in the requested city. The proxy will attempt to find IPs as close as possible to the specified city.
City targeting works with or without sticky sessions enabled.