> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Zenrows API (Fetch, Extract via extract=auto, and Batch) is described in OpenAPI 3.1 at https://www.zenrows.com/openapi.json and listed in the RFC 9727 API catalog at https://www.zenrows.com/.well-known/api-catalog. Use the spec for exact parameter names and types.

# Get content as seen from any country

> See prices, search results and pages exactly as visitors in any country see them, with Zenrows Fetch.

Add `proxy_country` to a Fetch request and the target sees a visitor from that country. Use it for localized prices, currencies, search results, shipping options and anything a site changes by location.

**Uses:** [Fetch](/fetch/api-reference) with [`proxy_country`](/fetch/features/proxy-country), [`premium_proxy`](/fetch/features/premium-proxy) and [Adaptive Stealth Mode](/fetch/features/adaptive-stealth-mode) (`mode=auto`)

## Ask your AI agent

With the [Zenrows MCP server](/mcp/overview) connected to Claude, Cursor or any MCP client, paste this prompt. Your agent picks the right Zenrows tools and settings on its own.

```text theme={"dark"}
Use Zenrows to read https://api.country.is/ three times, as a visitor from the US, the UK
and Germany, and show me the IP and country each request came from.
```

## Fetch a page from one country

With `mode=auto`, send `proxy_country` with a two-letter ISO code. Zenrows routes the request through that country and adds JavaScript rendering when the page needs it. This example calls `https://api.country.is/`, which answers with the caller's IP and country, so you can see where the request came from.

<CodeGroup>
  ```python Python (Requests) theme={"dark"}
  import requests

  params = {
      "apikey": "YOUR_ZENROWS_API_KEY",
      "url": "https://api.country.is/",
      "mode": "auto",
      "proxy_country": "de",
  }

  response = requests.get("https://api.zenrows.com/v1/", params=params, timeout=180)
  response.raise_for_status()
  print(response.json())
  ```

  ```bash CLI theme={"dark"}
  zenrows fetch https://api.country.is/ --proxy-country de
  ```
</CodeGroup>

The CLI runs in `mode=auto` by default, so `--proxy-country` is all it needs.

## Example output

```text theme={"dark"}
{'ip': '92.206.191.237', 'country': 'DE'}
```

## Set the proxy yourself with premium\_proxy

To control the configuration, set `premium_proxy=true` with `proxy_country`. The request goes out through a residential IP in that country:

<CodeGroup>
  ```python Python (Requests) theme={"dark"}
  import requests

  params = {
      "apikey": "YOUR_ZENROWS_API_KEY",
      "url": "https://api.country.is/",
      "premium_proxy": "true",
      "proxy_country": "de",
  }

  response = requests.get("https://api.zenrows.com/v1/", params=params, timeout=180)
  response.raise_for_status()

  info = response.json()
  print(info["ip"], info["country"])
  print("Credits billed:", response.headers["X-Request-Credits"])
  ```

  ```javascript Node.js theme={"dark"}
  const params = new URLSearchParams({
    apikey: "YOUR_ZENROWS_API_KEY",
    url: "https://api.country.is/",
    premium_proxy: "true",
    proxy_country: "de",
  });

  const response = await fetch(`https://api.zenrows.com/v1/?${params}`, {
    signal: AbortSignal.timeout(180_000),
  });
  if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);

  const info = await response.json();
  console.log(info.ip, info.country);
  console.log("Credits billed:", response.headers.get("X-Request-Credits"));
  ```

  ```bash cURL theme={"dark"}
  curl "https://api.zenrows.com/v1/?apikey=YOUR_ZENROWS_API_KEY&url=https%3A%2F%2Fapi.country.is%2F&premium_proxy=true&proxy_country=de"
  ```
</CodeGroup>

Output:

```text theme={"dark"}
87.122.37.191 DE
Credits billed: 10
```

In the CLI's manual mode, pair `--proxy-country` with `--premium-proxy`.

## Compare the same page across countries

Loop over country codes and keep each result next to its country. Swap the URL for a product, search or pricing page and parse the field you want to compare, for example the price and its currency.

```python Python (Requests) theme={"dark"}
import requests

URL = "https://api.country.is/"
COUNTRIES = ["us", "gb", "de"]

results = {}
for country in COUNTRIES:
    params = {
        "apikey": "YOUR_ZENROWS_API_KEY",
        "url": URL,
        "mode": "auto",
        "proxy_country": country,
    }
    response = requests.get("https://api.zenrows.com/v1/", params=params, timeout=180)
    if response.ok:
        results[country] = response.json()
    else:
        results[country] = f"error {response.status_code}"

for country, data in results.items():
    print(country, "->", data)
```

Output:

```text theme={"dark"}
us -> {'ip': '95.135.207.229', 'country': 'US'}
gb -> {'ip': '83.106.188.96', 'country': 'GB'}
de -> {'ip': '91.8.170.118', 'country': 'DE'}
```

To check many countries or many pages at once, run the requests in parallel, see [Run many requests concurrently](/academy/fetch/concurrent-requests).

## Customize it

| Change | How |
| - | - |
| A different country | Any ISO 3166-1 alpha-2 code, such as `us`, `gb`, `fr`, `es`, `jp`, `au`, see [Proxy country](/fetch/features/proxy-country) |
| Same country and IP across several requests | Add `session_id`, see [Keep the same IP and submit forms](/academy/fetch/sessions-and-forms) |
| Language or currency set by a cookie | Send the cookie with `custom_headers=true`, see [Custom headers](/fetch/features/headers#language-localization-and-currency) |
| A page that renders with JavaScript | Use `mode=auto`, or `js_render=true` with `premium_proxy=true` |
| A real browser in a country | Use Browser with its [country option](/browser-sessions/features/country) |

## Troubleshooting

* **`400` when you set `proxy_country`**: on a manual configuration it rides on premium proxies. Add `premium_proxy=true`, or switch to `mode=auto`.
* **The page still shows another country's content**: the site also reads a cookie or the URL path for locale. Set the site's locale cookie with `custom_headers=true`, or request the country-specific URL.
* **An IP lookup service reports a neighboring country**: lookup databases disagree for some IP ranges. Check the content of the target page itself, which is what the site serves to that country.

## Related recipes

<CardGroup cols={2}>
  <Card title="Keep the same IP and submit forms" icon="lock" href="/academy/fetch/sessions-and-forms">
    Pin one IP across requests and send POST bodies.
  </Card>

  <Card title="Run many requests concurrently" icon="arrows-split" href="/academy/fetch/concurrent-requests">
    Check many countries or pages in parallel.
  </Card>

  <Card title="Scrape pages protected by anti-bot systems" icon="shield-check" href="/academy/fetch/protected-sites">
    Combine geotargeting with Adaptive Stealth Mode.
  </Card>

  <Card title="E-commerce: products, prices and reviews" icon="shopping-cart" href="/academy/use-cases/ecommerce">
    Track prices and availability across markets.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.