# Residentiële proxy's en inloggegevens

> LocalSERP Proxy-API: verkeersabonnementen, proxycredentials, subgebruikers, verbruik en beschikbare locaties, met voorbeelden voor curl, Python en Node.js.

- URL: https://localserpproxy.com/nl/docs/api/residential/
- Laatst bijgewerkt: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Beheer verkeersabonnementen (residentiële proxy's en roterende 4G/5G per GB): proxy-inloggegevens, subgebruikers met eigen inloggegevens en verkeerslimiet, dagelijks gebruik en de locaties waarop je je kunt richten via de proxygebruikersnaam.

**Eindpunten op deze pagina**

- `GET /v1/residential/subscriptions`: Verkeersabonnementen weergeven (residentiële proxy's en roterende mobiele proxy's per GB)
- `GET /v1/residential/subscriptions/{subscriptionId}`: Een abonnement voor residentiële proxy's ophalen
- `PATCH /v1/residential/subscriptions/{subscriptionId}`: De naam wijzigen of automatisch verlengen in- of uitschakelen
- `POST /v1/residential/subscriptions/{subscriptionId}/reset-password`: Een nieuw proxwachtwoord genereren voor de hoofdgebruiker
- `GET /v1/residential/subscriptions/{subscriptionId}/usage`: Dagelijks verkeersverbruik
- `GET /v1/residential/subscriptions/{subscriptionId}/sub-users`: Subgebruikers weergeven (aparte proxycredentials met een eigen verkeerslimiet)
- `POST /v1/residential/subscriptions/{subscriptionId}/sub-users`: Een subgebruiker aanmaken
- `PATCH /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`: Een subgebruiker bijwerken (label, limiet, in-/uitschakelen, nieuw wachtwoord)
- `DELETE /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`: Een subgebruiker verwijderen
- `GET /v1/catalog/countries`: Landen waar een product beschikbaar is
- `GET /v1/catalog/countries/{countryCode}/states`: Beschikbare staten/provincies in een land (US, CA, AU…)
- `GET /v1/catalog/countries/{countryCode}/cities`: Beschikbare steden in een land
- `GET /v1/catalog/countries/{countryCode}/asns`: Beschikbare ISP's (ASN) in een land — alleen residentiële proxy's

Basis-URL `https://localserpproxy.com/api/v1`. Authenticatie, fouten en limieten: zie het [API-overzicht](https://localserpproxy.com/nl/docs/api/).

## Sticky-sessies

Voeg `-session-{id}-ttl-{minutes}` toe aan de proxygebruikersnaam om hetzelfde IP te behouden: `{id}` bestaat uit 1–32 letters of cijfers naar keuze, `ttl` is 1–30 minuten. Het IP kan eerder veranderen, bijvoorbeeld wanneer het apparaat erachter offline gaat.

## Verkeersabonnementen weergeven (residentiële proxy's en roterende mobiele proxy's per GB)

`GET /v1/residential/subscriptions`

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `productId` | query | `residential` · `mobile-gb` | Nee | Alleen dit product (ontbreekt: beide). |

**Response** `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());
```

## Een abonnement voor residentiële proxy's ophalen

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |

**Response** `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());
```

## De naam wijzigen of automatisch verlengen in- of uitschakelen

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |

**Requestbody**

| Veld | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- |
| `label` | string | Nee | max. 60 tekens |
| `autoRenew` | boolean | Nee | — |

*Voorbeeld*

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

**Response** `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());
```

## Genereer een nieuw proxywachtwoord voor de hoofdgebruiker

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

Het oude wachtwoord werkt binnen 60 seconden niet meer bij de gateway.

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |

**Response** `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());
```

## Dagelijks dataverbruik

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |
| `from` | query | string (date) | Nee | Eerste dag (UTC), inclusief. Standaard = 29 dagen vóór `to`. |
| `to` | query | string (date) | Nee | Laatste dag (UTC), inclusief. Standaard = vandaag. Maximale periode: 366 dagen. |
| `subUserId` | query | string | Nee | Beperk tot één subgebruiker. |

**Response** `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());
```

## Subgebruikers weergeven (afzonderlijke proxygegevens met een eigen datalimiet)

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |

**Response** `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());
```

## Een subgebruiker aanmaken

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |

**Requestbody**

| Veld | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- |
| `label` | string | Ja | max. 60 tekens |
| `password` | string | Nee | Wordt gegenereerd als dit veld leeg blijft. — max. 64 tekens |
| `trafficLimitBytes` | integer (int64), nullable | Nee | ≥ 0 |

*Voorbeeld*

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

**Response** `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());
```

## Een subgebruiker bijwerken (label, limiet, in-/uitschakelen, nieuw wachtwoord)

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |
| `subUserId` | path | string | Ja | — |

**Requestbody**

| Veld | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- |
| `label` | string | Nee | max. 60 tekens |
| `trafficLimitBytes` | integer (int64), nullable | Nee | ≥ 0 |
| `enabled` | boolean | Nee | — |
| `regeneratePassword` | boolean | Nee | — |

*Voorbeeld*

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

**Response** `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());
```

## Een subgebruiker verwijderen

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

Authenticatie: API-sleutel in de `Authorization: Bearer API_KEY`-header.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Ja | — |
| `subUserId` | path | string | Ja | — |

**Response** `204 No Content`

Geen body: de statuscode is het antwoord.

*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
```

## Landen waar een product beschikbaar is

`GET /v1/catalog/countries`

Openbaar: geen API-sleutel nodig.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `product` | query | string | Nee | Beperk tot locaties waar dit product beschikbaar is (`residential`, `mobile`, `mobile-gb`). |

**Response** `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());
```

## Targetbare staten/provincies in een land (US, CA, AU…)

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

Waarden voor het segment `-state-{state}` van de gebruikersnaam. Lege lijst voor landen zonder targeting op staat/provincie. ZIP-codes worden niet vermeld: het segment `-zip-{zip}` accepteert elke Amerikaanse ZIP-code van 5 cijfers. De gateway geeft een foutpagina als er geen exit-IP overeenkomt.

Openbaar: geen API-sleutel nodig.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Ja | ISO 3166-1 alpha-2, in hoofdletters. |

**Response** `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());
```

## Targetbare steden in een land

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

Met `product=mobile` of `product=mobile-gb` alleen de steden waar 4G/5G-modems beschikbaar zijn.

Openbaar: geen API-sleutel nodig.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Ja | ISO 3166-1 alpha-2, in hoofdletters. |
| `product` | query | string | Nee | Beperk tot locaties waar dit product beschikbaar is (`residential`, `mobile`, `mobile-gb`). |

**Response** `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());
```

## Targetbare ISP's (ASN) in een land — alleen residentiële proxy's

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

Openbaar: geen API-sleutel nodig.

**Parameters**

| Naam | In | Type | Verplicht | Beschrijving |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Ja | ISO 3166-1 alpha-2, in hoofdletters. |

**Response** `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 is een residentiële proxydienst in de VS om lokale zoekresultaten, advertenties en prijzen per stad te controleren, met betaling in crypto en zonder een identiteitsbewijs te uploaden.
