Geo Targeting routes each request through a proxy exit in a specific region. Use it when content changes by location or language.
Common uses:
- Localized content: pricing, availability, shipping, store pages.
- SEO & market research: region-specific SERPs and ads.
- Fewer blocks: look like a real local user with residential exits.
Supported parameters
Available in - Extract, Search, Map and Crawl.
| Parameter | Type | Description | Default |
|---|
country | String | Routes request through the specified country | US |
state | String | Routes request through a US state. Only for country US | - |
city | String | Routes request through a specific city. Best used with country | - |
locale | String | Sets the browser language for localization | en-US |
country/state/city geo targeting changes where the request comes from. locale changes which language the browser prefers.
Usage
This request exits from New York and sets the browser language to English.
from nimble import Nimble
nimble = Nimble(api_key="YOUR-API-KEY")
result = nimble.extract(
url="https://ipinfo.io/json",
country="US",
state="NY",
locale="en-US",
)
print(result)
Best practices
Use geo targeting when content varies by location
Only specify country/state/city when the content differs by location.
# ✅ Use for location-specific content
result = nimble.extract({
"url": "https://www.example.com/products",
"country": "UK" # Prices and availability vary by country
})
# ❌ Unnecessary for global content
result = nimble.extract({
"url": "https://www.example.com/about",
"country": "DE" # About page is the same everywhere
})
Match locale to target country
Set the locale to match the country for accurate localized content.
# ✅ Locale matches country
result = nimble.extract({
"url": "https://www.example.com",
"country": "FR",
"locale": "fr-FR"
})
# ✅ Locale auto matching country
result = nimble.extract({
"url": "https://www.example.com",
"country": "FR",
"locale": "auto"
})
# ❌ Locale doesn't match country
result = nimble.extract({
"url": "https://www.example.com",
"country": "FR",
"locale": "en-US" # May not get French content
})
Start with country-level targeting
Use country-level targeting first, then add state/city if needed.
# ✅ Start simple with country
result = nimble.extract({
"url": "https://www.example.com",
"country": "US"
})
# ✅ Add state if content differs
result = nimble.extract({
"url": "https://www.example.com",
"country": "US",
"state": "NY" # Only if NY shows different content
})
# ❌ Overly specific when not needed
result = nimble.extract({
"url": "https://www.example.com/global-page",
"country": "US",
"state": "NY",
"city": "New York" # Unnecessary granularity
})