---
title: Geotargeting | Tabstack
description: Route requests through a proxy in a specific country to extract the content your target page serves to visitors in that region.
---

Tabstack’s extraction and generation endpoints support an optional `geo_target` parameter that routes the request through a proxy server in the specified country. Use it when the page you’re targeting serves different content based on the visitor’s geographic location.

---

## When geotargeting matters

**Pricing pages.** Many SaaS and e-commerce sites show different prices, currencies, and plan structures based on location. A pricing page viewed from the US may show USD; the same URL from Germany shows EUR with different tiers.

**Availability and inventory.** Product availability, shipping options, and stock levels are often regionalized.

**Localized content.** News sites, marketplaces, and media platforms serve regionally relevant content by default.

**Compliance monitoring.** Verify that cookie banners, consent flows, and legal disclosures appear correctly in specific jurisdictions.

**Search results.** Some sites return location-aware search results even for identical queries.

---

## Usage

Pass a `geo_target` object with a `country` property set to an ISO 3166-1 alpha-2 country code:

- [TypeScript](#tab-panel-53)
- [Python](#tab-panel-54)
- [CLI](#tab-panel-55)
- [curl](#tab-panel-56)

```
import Tabstack from '@tabstack/sdk'


const client = new Tabstack({ apiKey: process.env.TABSTACK_API_KEY })


// Extract pricing as seen from Germany
const result = await client.extract.json({
url: 'https://example.com/pricing',
geo_target: { country: 'DE' },
nocache: true, // Always fresh for regional pricing
json_schema: {
type: 'object',
properties: {
plans: {
type: 'array',
items: {
type: 'object',
properties: {
name: { type: 'string' },
price: { type: 'number', description: 'Price as a number in local currency' },
currency: { type: 'string', description: '3-letter currency code, e.g. EUR, USD' }
}
}
}
}
}
})
```

```
result = client.extract.json(
    url='https://example.com/pricing',
    geo_target={'country': 'DE'},
    nocache=True,
    json_schema={...}
)
```

Terminal window

```
# Extract pricing as seen from Germany
tabstack extract json https://example.com/pricing \
  --schema @schema.json \
  --geo DE \
  --nocache
```

Terminal window

```
curl -X POST https://api.tabstack.ai/v1/extract/json \
  -H "Authorization: Bearer $TABSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/pricing",
    "geo_target": { "country": "DE" },
    "nocache": true,
    "json_schema": { "type": "object" }
  }'
```

---

## Common country codes

| Code | Country        |
| ---- | -------------- |
| `US` | United States  |
| `GB` | United Kingdom |
| `DE` | Germany        |
| `FR` | France         |
| `JP` | Japan          |
| `AU` | Australia      |
| `CA` | Canada         |
| `BR` | Brazil         |
| `IN` | India          |
| `SG` | Singapore      |

Full list: [ISO 3166-1 alpha-2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)

---

## Multi-region extraction

To compare a page across multiple regions, run parallel requests with different `geo_target` values:

- [TypeScript](#tab-panel-57)
- [Python](#tab-panel-58)
- [curl](#tab-panel-59)

```
const regions = ['US', 'GB', 'DE', 'JP']


const results = await Promise.all(
regions.map(country =>
client.extract.json({
url: 'https://example.com/pricing',
geo_target: { country },
nocache: true,
json_schema: {/* pricing schema */}
}).then(result => ({ country, result }))
)
)


for (const { country, result } of results) {
console.log(`${country}:`, result)
}
```

```
from concurrent.futures import ThreadPoolExecutor


regions = ["US", "GB", "DE", "JP"]




def fetch(country):
    result = client.extract.json(
        url="https://example.com/pricing",
        geo_target={"country": country},
        nocache=True,
        json_schema={...},  # pricing schema
    )
    return country, result




with ThreadPoolExecutor() as executor:
    results = executor.map(fetch, regions)


for country, result in results:
    print(f"{country}:", result)
```

Terminal window

```
for country in US GB DE JP; do
  curl -X POST https://api.tabstack.ai/v1/extract/json \
    -H "Authorization: Bearer $TABSTACK_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{
      \"url\": \"https://example.com/pricing\",
      \"geo_target\": { \"country\": \"$country\" },
      \"nocache\": true,
      \"json_schema\": { \"type\": \"object\" }
    }"
done
```

---

## Notes

`geo_target` is available on `/extract/json`, `/extract/markdown`, `/generate/json`, and `/automate`. Only `/research` does not support it: it selects and routes its own sources across regions, so there is no single region to target.

Caching is per-URL. If you’ve previously extracted a URL without `geo_target`, setting it and using `nocache: true` ensures a fresh regional fetch rather than a cached neutral-region result.
