brd-exit-* proxy header. Country targeting works on every proxy network. City, state, ASN and ZIP code targeting work on Residential proxies only.
Which geolocation parameters does each proxy network support?
Header values use the same format as the username parameter values. Send headers to the proxy with
--proxy-header in cURL, so the target website never receives them.
What happens when a header and the username set the same parameter?
The proxy header wins. Eachbrd-exit-* header overrides only its matching username parameter, and the other username parameters stay in effect. Both the header and the username parameter override the default location set in the zone configuration in the Control Panel.
In this example, the username targets the United States and the brd-exit-country header targets the United Kingdom, so the request exits in the United Kingdom:
Shell
Country Targeting
Country targeting works on all proxy networks.
- Username parameter: add a country code to your username, like
username-country-country_code. - Proxy header: send the
brd-exit-countryheader with the country code, likebrd-exit-country: country_code, and keep your username unchanged.
The
brd-exit-country value is sent with --proxy-header, so it goes to the proxy only and is not forwarded to the target website.Default countries’ selection
In all Bright Data shared pool proxies: Datacenter, ISP and Residential shared pools (also known as “Rotating proxies”) we offer a default country selection during zone configuration. When a country(s) is selected, Bright Data will attempt to allocate a peer from the selected default countries. The allocation sequence is as follows: If there are default countries configured:- Select a random country from the default countries list.
- Attempt to allocate a peer in that country
- If peer found: route request to the peer
- If peer not found: fail the request and reply with error
EU Countries targeting
Bright Data proxy networks as well as our Web Unlocker API allow random peer selection specifically from EU-member countries via the use of the-country-eu flag. When needing to target EU peers, this will improve success rates over targeting from just one EU country, while still keeping the peer within the EU.
City Targeting
Residential proxies only. City targeting for Datacenter and ISP proxies has been deprecated and is no longer available.
username-country-country_code-city-city_code, or by sending the brd-exit-country and brd-exit-city headers. The city_code must be in lowercase only and have no spaces, for example -city-sanfrancisco or brd-exit-city:sanfrancisco.
State Targeting
Residential proxies only
-state-<state_code> to your username string, or by sending the brd-exit-country and brd-exit-state headers.
We utilize the ISO 3166-2 standard for state targeting. While this includes standard 2-letter codes (e.g., US states), we also support 3-letter and numeric codes as defined by the standard for other regions.
ASN Targeting
Residential proxies only
-asn-ASN_NUMBER to the username, or by sending the brd-exit-asn header.
ZIP Code Targeting
Residential proxies only
-zip-<zip_code> username parameter or the brd-exit-zipcode header. Here is an example of targeting an IP from Memphis, US and zip code 12345: