> For the complete documentation index, see [llms.txt](https://help.proxidize.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.proxidize.com/proxidize-rest-api/proxidize-api/residential-pergb-api/whitelisting.md).

# Whitelisting

Use whitelisting to limit Residential proxy access to approved source IPs.

Whitelisting controls **who can connect**.

Country, city, and carrier control **where the proxy exits from**.

To add or update allowed IPs, use [IP Whitelist](/proxidize-rest-api/proxidize-api/residential-pergb-api/whitelisting/ip-whitelist.md).

### Format requirements

When you pass `country`, `city`, or `carrier`, use the values returned by the lookup APIs.

Use [Locations (Per Carrier)](/proxidize-rest-api/proxidize-api/residential-pergb-api/locations-per-carrier.md) to fetch valid country and city values.

Example response:

```json
[
  {
    "country": {
      "name": "Spain",
      "value": "-co-Spain",
      "locations": [
        {
          "label": "Adra, Andalusia",
          "value": "-co-Spain-st-Andalusia-ci-Adra",
          "country": "Spain",
          "state": "Andalusia",
          "city": "Adra"
        },
        {
          "label": "Aguadulce, Andalusia",
          "value": "-co-Spain-st-Andalusia-ci-Aguadulce",
          "country": "Spain",
          "state": "Andalusia",
          "city": "Aguadulce"
        }
      ]
    }
  }
]
```

Use:

* `country: Spain`
* `city: Adra`

### Get the correct carrier format

Use [Carriers (Per Location)](/proxidize-rest-api/proxidize-api/residential-pergb-api/carriers-per-location.md) with the `location` query parameter.

Then use the returned carrier `value`.

Example response:

```json
[
  {
    "name": "AS174 Cogent Communications, LLC",
    "country": "Spain",
    "value": "174",
    "available": true
  }
]
```

Use:

* `carrier: 174`

### Example

If you want Spain, Adra, Andalusia, and carrier AS174, use:

```
country=Spain
city=Adra
carrier=174
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.proxidize.com/proxidize-rest-api/proxidize-api/residential-pergb-api/whitelisting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
