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

# Geo-Targeting

> Target residential IPs by country, state, and city.

Geo-targeting lets you route requests through residential IPs in a specific country, region, or city. Add the targeting parameters to the username segment of your proxy credentials.

<Warning>
  Only the `country` parameter is required for geo-targeting. State and city are optional refinements — the more specific the target, the smaller the available IP pool.
</Warning>

## Targeting Format

Add targeting parameters between your client ID and session ID:

```
client-{CLIENT_ID}-country-{COUNTRY}-state-{STATE}-city-{CITY}-session-{SESSION_ID}
```

| Parameter | Required | Description                             |
| --------- | -------- | --------------------------------------- |
| `country` | Yes      | Country name (e.g. `Germany`, `Israel`) |
| `state`   | No       | State or region within the country      |
| `city`    | No       | City within the state                   |

Values are lowercase, dash-separated, with no spaces or special characters (e.g. `city-newyork`, `state-northerndistrict`).

## Country Targeting

<ResponseField name="country" type="string" required="true">
  Country name of the country you would like to target.
</ResponseField>

```
country-{COUNTRY_NAME}
```

**Examples:**

* `country-Germany`
* `country-Israel`
* `country-Hungary`

## State / Region Targeting

<ResponseField name="state" type="string">
  State or region name that matches the selected country.
</ResponseField>

```
state-{STATE_NAME}
```

**Examples:**

* `state-northerndistrict` (Israel)
* `state-pestcounty` (Hungary)
* `state-citystatebremen` (Germany)
* `state-landberlin` (Germany)

## City Targeting

<ResponseField name="city" type="string">
  City name that matches the selected state.
</ResponseField>

```
city-{CITY_NAME}
```

**Examples:**

* `city-maghar` (Israel)
* `city-god` (Hungary)
* `city-bremen` (Germany)
* `city-berlin` (Germany)

## Example Request

<CodeGroup>
  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://client-{CLIENT_ID}-country-Germany-state-landberlin-city-berlin-session-fnzwtath:{PASSWORD}@residential.roundproxies.com:5000',
      'https': 'http://client-{CLIENT_ID}-country-Germany-state-landberlin-city-berlin-session-fnzwtath:{PASSWORD}@residential.roundproxies.com:5000'
  }

  response = requests.get('https://api.ipify.org?format=json', proxies=proxies)
  print(response.json())
  ```

  ```bash cURL theme={null}
  curl -x "http://client-{CLIENT_ID}-country-Germany-state-landberlin-city-berlin-session-fnzwtath:{PASSWORD}@residential.roundproxies.com:5000" \
    https://api.ipify.org?format=json
  ```
</CodeGroup>

## Tips

* Start with country only and add `state`/`city` only if your use case demands it.
* If you receive `No Available IPs for Targeting`, drop the city first, then the state. See [Error Handling](/residentials/error-handling).
* Pair geo-targeting with a sticky [session](/residentials/session) to keep the same exit IP across requests.
