# Proxies residenciais e credenciais

> API da LocalSERP Proxy: assinaturas de tráfego, credenciais de proxy, subusuários, uso e locais disponíveis para segmentação, com exemplos em curl, Python e Node.js.

- URL: https://localserpproxy.com/pt/docs/api/residential/
- Última atualização: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Gerencie assinaturas de tráfego (residencial e 4G/5G rotativo por GB): credenciais de proxy, subusuários com credenciais próprias e limite de tráfego, uso diário e os locais que você pode segmentar no nome de usuário do proxy.

**Endpoints nesta página**

- `GET /v1/residential/subscriptions`: Listar assinaturas de tráfego (proxy residencial e proxies móveis rotativos por GB)
- `GET /v1/residential/subscriptions/{subscriptionId}`: Obter uma assinatura de proxy residencial
- `PATCH /v1/residential/subscriptions/{subscriptionId}`: Renomear ou ativar/desativar a renovação automática
- `POST /v1/residential/subscriptions/{subscriptionId}/reset-password`: Gerar uma nova senha de proxy para o usuário principal
- `GET /v1/residential/subscriptions/{subscriptionId}/usage`: Uso diário de tráfego
- `GET /v1/residential/subscriptions/{subscriptionId}/sub-users`: Listar subusuários (credenciais de proxy separadas, com limite de tráfego próprio)
- `POST /v1/residential/subscriptions/{subscriptionId}/sub-users`: Criar um subusuário
- `PATCH /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`: Atualizar um subusuário (rótulo, limite, ativar/desativar, nova senha)
- `DELETE /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`: Excluir um subusuário
- `GET /v1/catalog/countries`: Países onde um produto está disponível
- `GET /v1/catalog/countries/{countryCode}/states`: Estados/províncias disponíveis para segmentação em um país (US, CA, AU…)
- `GET /v1/catalog/countries/{countryCode}/cities`: Cidades disponíveis para segmentação em um país
- `GET /v1/catalog/countries/{countryCode}/asns`: ISPs (ASN) disponíveis para segmentação em um país — somente proxy residencial

URL base `https://localserpproxy.com/api/v1`. Autenticação, erros e limites: consulte a [visão geral da API](https://localserpproxy.com/pt/docs/api/).

## Sessões persistentes

Adicione `-session-{id}-ttl-{minutes}` ao nome de usuário do proxy para manter o mesmo IP: `{id}` pode ter de 1 a 32 letras ou números à sua escolha; `ttl` corresponde a 1–30 minutos. O IP pode mudar antes, por exemplo, se o dispositivo por trás dele ficar offline.

## Listar assinaturas de tráfego (proxy residencial e proxies móveis rotativos por GB)

`GET /v1/residential/subscriptions`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `productId` | query | `residential` · `mobile-gb` | Não | Somente este produto (se ausente: ambos). |

**Resposta** `200 OK`

```json
{
  "data": [
    {
      "id": "res_9x2m4k",
      "productId": "residential",
      "label": "Residential #1",
      "planId": "res-10",
      "status": "active",
      "trafficTotalBytes": 10000000000,
      "trafficUsedBytes": 2350000000,
      "trafficRemainingBytes": 7650000000,
      "expiresAt": null,
      "autoRenew": false,
      "username": "u7k2m9",
      "password": "PASSWORD",
      "endpoint": {
        "host": "gw.localserpproxy.com",
        "httpPort": 7777,
        "socksPort": 7778
      },
      "subUserCount": 1,
      "createdAt": "2026-10-05T14:03:11Z"
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/residential/subscriptions" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/residential/subscriptions", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Obter uma assinatura de proxy residencial

`GET /v1/residential/subscriptions/{subscriptionId}`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |

**Resposta** `200 OK`

```json
{
  "id": "res_9x2m4k",
  "productId": "residential",
  "label": "Residential #1",
  "planId": "res-10",
  "status": "active",
  "trafficTotalBytes": 10000000000,
  "trafficUsedBytes": 2350000000,
  "trafficRemainingBytes": 7650000000,
  "expiresAt": null,
  "autoRenew": false,
  "username": "u7k2m9",
  "password": "PASSWORD",
  "endpoint": {
    "host": "gw.localserpproxy.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "subUserCount": 1,
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/residential/subscriptions/res_9x2m4k", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Renomear ou ativar/desativar a renovação automática

`PATCH /v1/residential/subscriptions/{subscriptionId}`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |

**Corpo da solicitação**

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| `label` | string | Não | máx. 60 caracteres |
| `autoRenew` | boolean | Não | — |

*Exemplo*

```json
{
  "label": "Price monitoring",
  "autoRenew": true
}
```

**Resposta** `200 OK`

```json
{
  "id": "res_9x2m4k",
  "productId": "residential",
  "label": "Residential #1",
  "planId": "res-10",
  "status": "active",
  "trafficTotalBytes": 10000000000,
  "trafficUsedBytes": 2350000000,
  "trafficRemainingBytes": 7650000000,
  "expiresAt": null,
  "autoRenew": false,
  "username": "u7k2m9",
  "password": "PASSWORD",
  "endpoint": {
    "host": "gw.localserpproxy.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "subUserCount": 1,
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X PATCH "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Price monitoring","autoRenew":true}'
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.patch(f"{API}/residential/subscriptions/res_9x2m4k", headers=HEADERS, json={"label": "Price monitoring", "autoRenew": True}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k`, {
  method: 'PATCH',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ label: 'Price monitoring', autoRenew: true }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Gerar uma nova senha de proxy para o usuário principal

`POST /v1/residential/subscriptions/{subscriptionId}/reset-password`

A senha antiga para de funcionar no gateway em até 60 segundos.

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |

**Resposta** `200 OK`

```json
{
  "id": "res_9x2m4k",
  "productId": "residential",
  "label": "Residential #1",
  "planId": "res-10",
  "status": "active",
  "trafficTotalBytes": 10000000000,
  "trafficUsedBytes": 2350000000,
  "trafficRemainingBytes": 7650000000,
  "expiresAt": null,
  "autoRenew": false,
  "username": "u7k2m9",
  "password": "PASSWORD",
  "endpoint": {
    "host": "gw.localserpproxy.com",
    "httpPort": 7777,
    "socksPort": 7778
  },
  "subUserCount": 1,
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k/reset-password" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.post(f"{API}/residential/subscriptions/res_9x2m4k/reset-password", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k/reset-password`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Uso diário de tráfego

`GET /v1/residential/subscriptions/{subscriptionId}/usage`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |
| `from` | query | string (date) | Não | Primeiro dia (UTC), inclusive. Padrão = 29 dias antes de `to`. |
| `to` | query | string (date) | Não | Último dia (UTC), inclusive. Padrão = hoje. Intervalo máximo de 366 dias. |
| `subUserId` | query | string | Não | Restringir a um subusuário. |

**Resposta** `200 OK`

```json
{
  "from": "2026-10-04",
  "to": "2026-10-05",
  "totalBytes": 2350000000,
  "totalRequests": 48210,
  "points": [
    {
      "date": "2026-10-04",
      "bytes": 1200000000,
      "requests": 24800
    },
    {
      "date": "2026-10-05",
      "bytes": 1150000000,
      "requests": 23410
    }
  ],
  "byCountry": [
    {
      "country": "US",
      "bytes": 2350000000
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k/usage" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/residential/subscriptions/res_9x2m4k/usage", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k/usage`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Listar subusuários (credenciais de proxy separadas, cada uma com seu próprio limite de tráfego)

`GET /v1/residential/subscriptions/{subscriptionId}/sub-users`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |

**Resposta** `200 OK`

```json
{
  "data": [
    {
      "id": "sub_3m9qk2",
      "label": "Client A",
      "username": "u7k2m9_scraper",
      "password": "PASSWORD",
      "trafficLimitBytes": 5000000000,
      "trafficUsedBytes": 1200000000,
      "enabled": true,
      "createdAt": "2026-10-05T14:03:11Z"
    }
  ],
  "limit": 50
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k/sub-users" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.get(f"{API}/residential/subscriptions/res_9x2m4k/sub-users", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k/sub-users`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Criar um subusuário

`POST /v1/residential/subscriptions/{subscriptionId}/sub-users`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |

**Corpo da solicitação**

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| `label` | string | Sim | máx. 60 caracteres |
| `password` | string | Não | Gerado se não informado. — máx. 64 caracteres |
| `trafficLimitBytes` | integer (int64), nullable | Não | ≥ 0 |

*Exemplo*

```json
{
  "label": "Scraper EU",
  "trafficLimitBytes": 5000000000
}
```

**Resposta** `201 Created`

```json
{
  "id": "sub_3m9qk2",
  "label": "Client A",
  "username": "u7k2m9_scraper",
  "password": "PASSWORD",
  "trafficLimitBytes": 5000000000,
  "trafficUsedBytes": 1200000000,
  "enabled": true,
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X POST "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k/sub-users" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Scraper EU","trafficLimitBytes":5000000000}'
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.post(f"{API}/residential/subscriptions/res_9x2m4k/sub-users", headers=HEADERS, json={"label": "Scraper EU", "trafficLimitBytes": 5000000000}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k/sub-users`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ label: 'Scraper EU', trafficLimitBytes: 5000000000 }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Atualizar um subusuário (rótulo, limite, ativar/desativar, nova senha)

`PATCH /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |
| `subUserId` | path | string | Sim | — |

**Corpo da solicitação**

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| `label` | string | Não | máx. 60 caracteres |
| `trafficLimitBytes` | integer (int64), nullable | Não | ≥ 0 |
| `enabled` | boolean | Não | — |
| `regeneratePassword` | boolean | Não | — |

*Exemplo*

```json
{
  "enabled": false
}
```

**Resposta** `200 OK`

```json
{
  "id": "sub_3m9qk2",
  "label": "Client A",
  "username": "u7k2m9_scraper",
  "password": "PASSWORD",
  "trafficLimitBytes": 5000000000,
  "trafficUsedBytes": 1200000000,
  "enabled": true,
  "createdAt": "2026-10-05T14:03:11Z"
}
```

*curl*

```bash
curl -s -X PATCH "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k/sub-users/sub_3m9qk2" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.patch(f"{API}/residential/subscriptions/res_9x2m4k/sub-users/sub_3m9qk2", headers=HEADERS, json={"enabled": False}, timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k/sub-users/sub_3m9qk2`, {
  method: 'PATCH',
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ enabled: false }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Excluir um subusuário

`DELETE /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`

Autenticação: chave da API no cabeçalho `Authorization: Bearer API_KEY`.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Sim | — |
| `subUserId` | path | string | Sim | — |

**Resposta** `204 No Content`

Sem corpo: o código de status é a resposta.

*curl*

```bash
curl -s -X DELETE "https://localserpproxy.com/api/v1/residential/subscriptions/res_9x2m4k/sub-users/sub_3m9qk2" \
  -H "Authorization: Bearer $API_KEY"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

r = requests.delete(f"{API}/residential/subscriptions/res_9x2m4k/sub-users/sub_3m9qk2", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.status_code)  # 204: done
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/residential/subscriptions/res_9x2m4k/sub-users/sub_3m9qk2`, {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.status); // 204: done
```

## Países onde um produto está disponível

`GET /v1/catalog/countries`

Público: não é necessária uma chave da API.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `product` | query | string | Não | Restrinja aos locais onde este produto está disponível (`residential`, `mobile`, `mobile-gb`). |

**Resposta** `200 OK`

```json
{
  "data": [
    {
      "code": "US",
      "name": "United States",
      "region": "Americas",
      "products": [
        "residential",
        "mobile",
        "mobile-gb"
      ],
      "cities": 6,
      "asns": 4,
      "carriers": 3
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/countries"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/countries", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/catalog/countries`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Estados / províncias disponíveis para segmentação em um país (US, CA, AU…)

`GET /v1/catalog/countries/{countryCode}/states`

Valores do segmento de nome de usuário `-state-{state}`. Lista vazia para países sem segmentação por estado. Os códigos ZIP não são listados: o segmento `-zip-{zip}` aceita qualquer código ZIP de 5 dígitos dos EUA, e o gateway retorna uma página de erro quando nenhum IP de saída corresponde.

Público: não é necessária uma chave da API.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Sim | ISO 3166-1 alpha-2, em letras maiúsculas. |

**Resposta** `200 OK`

```json
{
  "data": [
    {
      "id": "ny",
      "code": "NY",
      "name": "New York",
      "cities": 0
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/countries/US/states"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/countries/US/states", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/catalog/countries/US/states`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## Cidades disponíveis para segmentação em um país

`GET /v1/catalog/countries/{countryCode}/cities`

Com `product=mobile` ou `product=mobile-gb`, somente as cidades onde há modems 4G/5G.

Público: não é necessária uma chave da API.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Sim | ISO 3166-1 alpha-2, em letras maiúsculas. |
| `product` | query | string | Não | Restrinja aos locais onde este produto está disponível (`residential`, `mobile`, `mobile-gb`). |

**Resposta** `200 OK`

```json
{
  "data": [
    {
      "id": "new_york",
      "name": "New York",
      "state": "ny"
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/countries/US/cities"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/countries/US/cities", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/catalog/countries/US/cities`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

## ISPs (ASN) disponíveis para segmentação em um país — somente residencial

`GET /v1/catalog/countries/{countryCode}/asns`

Público: não é necessária uma chave da API.

**Parâmetros**

| Nome | Em | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Sim | ISO 3166-1 alpha-2, em letras maiúsculas. |

**Resposta** `200 OK`

```json
{
  "data": [
    {
      "asn": 7922,
      "name": "Comcast Cable"
    }
  ]
}
```

*curl*

```bash
curl -s "https://localserpproxy.com/api/v1/catalog/countries/US/asns"
```

*Python*

```python
import os
import requests

API = "https://localserpproxy.com/api/v1"

r = requests.get(f"{API}/catalog/countries/US/asns", timeout=30)
r.raise_for_status()
print(r.json())
```

*Node.js*

```javascript
// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';

const res = await fetch(`${API}/catalog/countries/US/asns`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());
```

---

LocalSERP Proxy: LocalSERP Proxy é um serviço de proxy residencial dos Estados Unidos para verificar resultados de busca locais, anúncios e preços cidade por cidade, com pagamento em cripto e sem envio de documento de identidade.
