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

# Geo-location

> Site Unblocker Geo-location

You may specify your geolocation when making request to a particular website. The accepted geolocation values can be country, state, city or coordinates, and radius, but vary depending on your target URL.

## Google

### Country

Pass the full country name just like with the [**Web Scraping API Geo Parameter Locations**](https://help.decodo.com/docs/web-scraping-api-localisation#geo-parameter-locations).

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
       -H "X-SU-Geo: Germany"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': 'Germany'
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo': 'Germany'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

### City

Pass `City, State, Country` or `State, Country` format (depending on the location) to the "X-SU-Geo" header, for example: `"X-SU-Geo: New York,New York,United States"`or `"X-SU-Geo: Berlin, Germany"`

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
       -H "X-SU-Geo: Berlin, Germany"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': 'Berlin, Germany'
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo': 'Berlin, Germany'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

### State

Pass `State, Country` format to the `"X-SU-Geo"` header, for example: `"X-SU-Geo: Arizona, United States"`

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
       -H "X-SU-Geo: Arizona, United States"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': 'Arizona, United States'
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo': 'Arizona, United States'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

### Coordinates & Radius

Pass latitude, longitude, and radius to the `"X-SU-Geo"` header, for example: `"X-SU-Geo: lat: 40.8448, lng: -73.8654, rad: 20000"`. The following example uses coordinates for The Bronx, New York City, USA

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
       -H "X-SU-Geo: lat: 40.8448, lng: -73.8654, rad: 20000"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': 'lat: 40.8448, lng: -73.8654, rad: 20000'
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo': 'lat: 40.8448, lng: -73.8654, rad: 20000'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

## Amazon

For most Amazon URLs, you can either send a zip/postcode or ISO-2 country code. The same rules and exceptions apply as with [**WEB Scraping API Amazon Geo Parameter**](https://help.decodo.com/docs/web-scraping-api-amazon-geo-parameter).

### Zip/postcode

Localize results within the native country of the target marketplace, for example, when targeting `amazon.com` marketplace, you can pass a zipcode to the `"X-SU-Geo"` header, for example: `"X-SU-Geo: 10001"` header will have geolocation in New York

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://www.amazon.com/s?k=pikachu" \
       -H "X-SU-Geo: 10001"
  ```

  ```typescript Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': '10001'
  }

  response = requests.request(
      'GET',
      'https://www.amazon.com/s?k=pikachu',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo': '10001'
  }

  const response = await fetch('https://www.amazon.com/s?k=pikachu', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

### ISO-2 country code

To localize results to a place outside the native country of the target marketplace, you can use the ISO-2 country code, for example, to get geolocation - France, you could pass this value to the header: `"X-SU-Geo: FR"`. The same exceptions apply as with [**WEB Scraping API Amazon Geo Parameter**](https://help.decodo.com/docs/web-scraping-api-amazon-geo-parameter).

<Note>
  When scraping Amazon targets from the `.com` domain, the success rate may be low when using a geolocation that's identical to the one associated with the domain. For instance, when targeting `amazon.com` and using `X-SU-Geo: US`, you will likely get errors.

  In order to work around this, use localized ZIP codes that are used within the target country, eg.: `X-SU-Geo: 10001`, which would target New York, US.

  The same suggestion applies for the following domains: `.ca`, `.co.uk`, `.com.mx`, `.de`, `.fr`, `.it`, `.es`, `.com.br`, `.in`, `.co.jp`, `.nl`, `.com.au`.
</Note>

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://www.amazon.com/s?k=pikachu" \
       -H "X-SU-Geo: FR"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': 'FR'
  }

  response = requests.request(
      'GET',
      'https://www.amazon.com/s?k=pikachu',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo': 'FR'
  }

  const response = await fetch('https://www.amazon.com/s?k=pikachu', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

## All Other URLs

### Country

Pass the full country name just like with the [**Web Scraping API Geo Parameter Locations**](https://help.decodo.com/docs/web-scraping-api-localisation#/geo-parameter-locations).

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
       -H "X-SU-Geo: Germany"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Geo': 'Germany'
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Geo:' 'Germany'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

## Header Parameter

Geolocations can also be set through the authentication username. The following example sets a geolocation of `Germany`:

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "username-geo-Germany:password" "https://ip.decodo.com/"
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="Support" href="https://direct.lc.chat/12092754" cta="Let's chat!">
    Need help or just want to say hello? Our support is available 24/7. \
    You can also reach us anytime via email at [support@decodo.com](mailto:support@decodo.com).
  </Card>

  <Card title="Feedback" href="mailto:feedback@decodo.com" cta="Share feedback">
    Can't find what you're looking for? Request an article! \
    Have feedback? Share your thoughts on how we can improve.
  </Card>
</Columns>
