Geolocation targeting
Target specific peers in countries or geographical locations for precise geo-targeted data collection.
Scraping Browser automatically selects the optimal peer location for your sessions, reducing the need for manual configuration in most cases. Manual geo-targeting is useful when accessing region-restricted or location-specific data.
- Country - targets peers from a specific country
- Geolocation radius – targets peers using an exact latitude, longitude, and radius simulating a precise physical location for more granular geo-targeted data collection.
Country
Add the -country
flag, after your USER
credentials within the Bright Data endpoint, followed by the 2-letter ISO code for that country.
For example, Scraping browser using Puppeteer in the USA:
EU region You can target the entire European Union region in the same manner as “Country” above by adding “eu” after “country” in your request: “-country-eu”.
Requests sent using -country-eu, will use IPs from one of the countries below which are included automatically within “eu”:
AL, AZ, KG, BA, UZ, BI, XK, SM, DE, AT, CH, UK, GB,IE, IM, FR, ES, NL, IT, PT, BE, AD, MT, MC, MA, LU, TN, DZ, GI, LI, SE, DK, FI, NO, AX, IS, GG, JE, EU, GL, VA, FX, FO.
Geolocation radius
Use the Proxy.setLocation
function to dynamically change the location of your proxies using an exact latitude, longitude, and radius.
Parameters
Specifies the latitude of the desired proxy location.
Specifies the longitude of the desired proxy location.
Defines the maximum distance from the provided coordinates within which the proxy can be located.
Defines the desired behavior in case no peers are available in the specified distance.
strict: true
- our system will search for available peers only within the specific distance.
strict: false
- if no peers are available in the specified distance we will automatically expand the distance and look for the nearest available peers.
Usage
The Proxy.setLocation
command should be invoked before navigating to the site for which the proxy is intended. This ensures that the proxy location is set accurately according to the specified parameters before any data requests are made.
How to run examples
You need to get Scraping Browsers credentials in the control panel.
Pass it in format USER:PASS
as environment variable AUTH
TARGET_URL
environment variable to change default targeted website.Code Examples
Change proxy location before scraping
Was this page helpful?