Geo-Targeting Guide
Render web pages from specific countries and cities to see location-specific content.
Overview
Geo-targeting allows you to render web pages as if you're browsing from a specific geographic location. Many websites display different content, prices, or availability based on the visitor's location. Browser7's geo-targeting feature enables you to access this location-specific content by routing your requests through proxies in your chosen country and city.
Why Use Geo-Targeting?
Price Monitoring
E-commerce sites often display different prices based on the visitor's location:
- Airlines & Hotels: Prices vary significantly by region
- Streaming Services: Subscription costs differ by country
- Retail Sites: Regional pricing and promotions
Content Availability
Access region-specific content that may be blocked or unavailable in other locations:
- News Articles: Some content is region-locked
- Product Catalogs: Different products available in different regions
- Streaming Content: TV shows and movies vary by country
Compliance & Testing
Verify your website displays correctly for users in different regions:
- Legal Compliance: Check region-specific disclaimers and terms
- Localization Testing: Verify translations and currency display
- Ad Verification: Confirm ads display correctly by region
Market Research
Understand how competitors present content in different markets:
- Competitive Analysis: Compare pricing across regions
- Product Availability: Track regional inventory
- Marketing Campaigns: Monitor location-specific promotions
How It Works
When you specify a country or city, Browser7:
- Selects a Proxy: Routes your request through a residential proxy in that location
- Sets Geolocation: Configures browser geolocation coordinates for the city
- Adjusts Settings: Sets timezone, locale, and viewport appropriate for the region
- Renders Page: Loads the page as if you're browsing from that location
The result is an authentic view of the website as users in that location would see it.
Supported Locations
Browser7 currently supports geo-targeting for 15 countries with 35 cities across two regions:
Europe (13 countries, 22 cities - via eu-api.browser7.com):
| Code | Country | Cities |
|---|---|---|
| AT | Austria | Vienna |
| BE | Belgium | Brussels |
| CH | Switzerland | Zurich, Geneva |
| CZ | Czech Republic | Prague |
| DE | Germany | Berlin, Hamburg, Munich, Frankfurt am Main |
| FR | France | Paris, Lyon |
| GB | United Kingdom | London |
| HR | Croatia | Zagreb |
| HU | Hungary | Budapest |
| IT | Italy | Milan, Turin |
| NL | Netherlands | Amsterdam, Rotterdam, The Hague, Utrecht |
| PL | Poland | Warsaw |
| SK | Slovakia | Bratislava |
North America (2 countries, 14 cities - via ca-api.browser7.com):
| Code | Country | Cities |
|---|---|---|
| CA | Canada | Montreal, Ottawa, Toronto |
| US | United States | Baltimore, Boston, Buffalo, Cleveland, Columbus, Detroit, New York, Philadelphia, Pittsburgh, Washington DC |
For the complete list of available cities, see the Supported Countries page.
Targeting Options
Auto-Selection (Default)
If you don't specify a location, Browser7 automatically selects the optimal city based on:
- Datacenter Proximity: Chooses cities close to the rendering server (≤20ms latency)
- Load Balancing: Distributes requests across available cities
- Performance: Minimizes network latency for faster renders
// No location specified - Browser7 picks the best option
const result = await client.render('https://example.com');
Country-Level Targeting
Specify a country code to render from any city within that country:
const result = await client.render('https://example.com', {
countryCode: 'US' // Random city in United States
});
Browser7 will randomly select a city from the available cities in that country.
City-Level Targeting
Specify both country and city for precise targeting:
const result = await client.render('https://example.com', {
countryCode: 'GB',
city: 'london'
});
City targeting requires the countryCode parameter. You cannot specify a city without its country code.
Best Practices
Choose the Right Level
Use auto-selection when:
- Location doesn't matter for your use case
- You want the fastest possible render times
- You're scraping content that's not geo-restricted
Use country-level when:
- You need content from a specific country
- Any city within that country is acceptable
- You want variety in city selection
Use city-level when:
- You need precise location targeting
- Testing location-specific features
- Comparing content across specific cities
Handle Location Data
Every render returns detailed information about the selected city:
{
selectedCity: {
name: 'new.york',
displayName: 'New York',
latitude: 40.7128,
longitude: -74.0060,
timezoneId: 'America/New_York'
}
}
Always log or store this data to know exactly where each render came from.
Consider Costs
Geo-targeting uses residential proxies, which are included in the standard render cost (1 cent per render). However:
- ✅ No extra cost for different countries
- ✅ No extra cost for specific cities
- ✅ Same pricing regardless of location
Test Multiple Locations
When monitoring prices or content across regions, test multiple locations:
const countries = ['US', 'GB', 'DE', 'FR'];
for (const country of countries) {
const result = await client.render(productUrl, {
countryCode: country
});
console.log(`Price in ${country}:`, extractPrice(result.html));
}
Common Use Cases
E-commerce Price Comparison
Monitor product prices across different regions:
async function comparePrices(productUrl, countries) {
const prices = {};
for (const country of countries) {
const result = await client.render(productUrl, {
countryCode: country
});
prices[country] = {
city: result.selectedCity.displayName,
price: extractPrice(result.html),
currency: extractCurrency(result.html)
};
}
return prices;
}
Region-Specific Content Testing
Verify content displays correctly in different regions:
async function testRegionalContent(url, regions) {
const results = [];
for (const { countryCode, city } of regions) {
const result = await client.render(url, {
countryCode,
city
});
results.push({
location: `${city}, ${countryCode}`,
hasRegionalBanner: result.html.includes('regional-banner'),
language: detectLanguage(result.html)
});
}
return results;
}
SDK Implementations
See language-specific examples for geo-targeting:
- Node.js Examples - Geo-targeting with the Node.js SDK
Python Examples
from browser7 import Browser7
client = Browser7(api_key='b7_your_api_key_here')
# Country-level targeting
result = client.render('https://example.com', country_code='US')
# City-level targeting
result = client.render('https://example.com', country_code='GB', city='london')
result = client.render('https://example.com', country_code='DE', city='berlin')
result = client.render('https://example.com', country_code='US', city='new.york')
# Check which city was selected
print(result.selected_city['displayName']) # e.g. 'New York'
print(result.selected_city['timezoneId']) # e.g. 'America/New_York'
# Compare prices across regions
countries = ['US', 'GB', 'DE', 'FR']
for country in countries:
result = client.render('https://example.com/product', country_code=country)
print(f"{country}: {result.selected_city['displayName']}")
PHP Examples
<?php
use Browser7\Browser7Client;
$client = new Browser7Client('b7_your_api_key_here');
// Country-level targeting
$result = $client->render('https://example.com', [
'countryCode' => 'US'
]);
// City-level targeting
$result = $client->render('https://example.com', [
'countryCode' => 'GB',
'city' => 'london'
]);
$result = $client->render('https://example.com', [
'countryCode' => 'US',
'city' => 'new.york'
]);
// Check which city was selected
echo $result->selectedCity['displayName']; // e.g. 'New York'
echo $result->selectedCity['timezoneId']; // e.g. 'America/New_York'
// Compare prices across regions
$countries = ['US', 'GB', 'DE', 'FR'];
foreach ($countries as $country) {
$result = $client->render('https://example.com/product', [
'countryCode' => $country
]);
echo "{$country}: {$result->selectedCity['displayName']}\n";
}
Related Guides
- Supported Countries - Complete list of countries and cities
- How It Works - Technical details about proxy selection
- Wait Actions - Handle dynamic content after geo-targeted render
- Error Handling - Handle location-specific errors
Troubleshooting
City Not Found Error
If you receive a "City not found" error:
- ✅ Check the city name matches the exact format (lowercase, dots for spaces: 'new.york')
- ✅ Verify the city is in the country you specified
- ✅ Consult the Supported Countries page
Content Still Wrong Region
If content doesn't reflect your target location:
- Check
result.selectedCityto confirm the render location - Some websites use additional detection methods (language headers, account settings)
- Try combining with appropriate
Accept-Languageheaders (API-level configuration)
Slower Render Times
If renders from certain locations are slower:
- This is expected due to geographic distance from datacenters
- Consider using auto-selection for optimal performance
- For time-critical applications, choose countries closer to your datacenter
Need Help?
- 📚 API Reference - Complete geo-targeting API documentation
- 💬 Support - Contact our team
- 🐛 Report Issues - SDK-specific issues