# Proxy rezydencjalne i dane dostępowe

> API LocalSERP Proxy: subskrypcje transferu, dane logowania do proxy, subużytkownicy, wykorzystanie i lokalizacje do wyboru, z przykładami curl, Python i Node.js.

- URL: https://localserpproxy.com/pl/docs/api/residential/
- Ostatnia aktualizacja: 2026-10-15
- Publisher: LocalSERP Proxy (https://localserpproxy.com)

Zarządzaj subskrypcjami transferu (proxy rezydencjalne oraz rotacyjne mobilne proxy 4G/5G rozliczane za GB): danymi dostępowymi do proxy, subużytkownikami z własnymi danymi dostępowymi i limitem transferu, dziennym zużyciem oraz lokalizacjami, które możesz wskazać w nazwie użytkownika proxy.

**Punkty końcowe na tej stronie**

- `GET /v1/residential/subscriptions`: Lista subskrypcji transferu (proxy rezydencjalne i rotujące mobilne proxy za GB)
- `GET /v1/residential/subscriptions/{subscriptionId}`: Pobierz subskrypcję proxy rezydencjalnego
- `PATCH /v1/residential/subscriptions/{subscriptionId}`: Zmień nazwę lub włącz/wyłącz automatyczne odnawianie
- `POST /v1/residential/subscriptions/{subscriptionId}/reset-password`: Wygeneruj nowe hasło proxy dla głównego użytkownika
- `GET /v1/residential/subscriptions/{subscriptionId}/usage`: Dzienne wykorzystanie transferu
- `GET /v1/residential/subscriptions/{subscriptionId}/sub-users`: Lista subużytkowników (oddzielne dane logowania do proxy z własnym limitem transferu)
- `POST /v1/residential/subscriptions/{subscriptionId}/sub-users`: Utwórz subużytkownika
- `PATCH /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`: Zaktualizuj subużytkownika (etykieta, limit, włącz/wyłącz, nowe hasło)
- `DELETE /v1/residential/subscriptions/{subscriptionId}/sub-users/{subUserId}`: Usuń subużytkownika
- `GET /v1/catalog/countries`: Kraje, w których produkt jest dostępny
- `GET /v1/catalog/countries/{countryCode}/states`: Stany/prowincje do wyboru w kraju (US, CA, AU…)
- `GET /v1/catalog/countries/{countryCode}/cities`: Miasta do wyboru w kraju
- `GET /v1/catalog/countries/{countryCode}/asns`: Dostawcy ISP do wyboru (ASN) w kraju — tylko proxy rezydencjalne

Podstawowy URL `https://localserpproxy.com/api/v1`. Uwierzytelnianie, błędy i limity: zobacz [omówienie API](https://localserpproxy.com/pl/docs/api/).

## Sesje sticky

Dodaj `-session-{id}-ttl-{minutes}` do nazwy użytkownika proxy, aby zachować ten sam IP: `{id}` to wybrane przez Ciebie 1–32 litery lub cyfry, `ttl` to 1–30 minut. IP może zmienić się wcześniej, na przykład gdy urządzenie za nim przejdzie w tryb offline.

## Lista subskrypcji transferu (proxy rezydencjalne i rotujące mobilne proxy za GB)

`GET /v1/residential/subscriptions`

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `productId` | query | `residential` · `mobile-gb` | Nie | Tylko ten produkt (brak: oba). |

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

## Pobierz subskrypcję proxy rezydencjalnego

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |

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

## Zmień nazwę lub włącz/wyłącz automatyczne odnawianie

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |

**Treść żądania**

| Pole | Typ | Wymagane | Opis |
| --- | --- | --- | --- |
| `label` | string | Nie | maks. 60 znaków |
| `autoRenew` | boolean | Nie | — |

*Przykład*

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

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

## Wygeneruj nowe hasło proxy dla głównego użytkownika

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

Stare hasło przestanie działać na bramie w ciągu 60 sekund.

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |

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

## Dzienne zużycie transferu

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |
| `from` | query | string (date) | Nie | Pierwszy dzień (UTC), włącznie. Domyślnie = 29 dni przed `to`. |
| `to` | query | string (date) | Nie | Ostatni dzień (UTC), włącznie. Domyślnie = dziś. Maksymalny zakres: 366 dni. |
| `subUserId` | query | string | Nie | Ogranicz do jednego użytkownika podrzędnego. |

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

## Lista użytkowników podrzędnych (osobne dane logowania do proxy z własnym limitem transferu)

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |

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

## Utwórz użytkownika podrzędnego

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |

**Treść żądania**

| Pole | Typ | Wymagane | Opis |
| --- | --- | --- | --- |
| `label` | string | Tak | maks. 60 znaków |
| `password` | string | Nie | Generowane, jeśli nie podano. — maks. 64 znaki |
| `trafficLimitBytes` | integer (int64), nullable | Nie | ≥ 0 |

*Przykład*

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

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

## Zaktualizuj użytkownika podrzędnego (etykieta, limit, włącz/wyłącz, nowe hasło)

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |
| `subUserId` | path | string | Tak | — |

**Treść żądania**

| Pole | Typ | Wymagane | Opis |
| --- | --- | --- | --- |
| `label` | string | Nie | maks. 60 znaków |
| `trafficLimitBytes` | integer (int64), nullable | Nie | ≥ 0 |
| `enabled` | boolean | Nie | — |
| `regeneratePassword` | boolean | Nie | — |

*Przykład*

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

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

## Usuń użytkownika podrzędnego

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

Uwierzytelnianie: klucz API w nagłówku `Authorization: Bearer API_KEY`.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string | Tak | — |
| `subUserId` | path | string | Tak | — |

**Odpowiedź** `204 No Content`

Brak treści: kod statusu jest odpowiedzią.

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

## Kraje, w których produkt jest dostępny

`GET /v1/catalog/countries`

Publiczne: klucz API nie jest wymagany.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `product` | query | string | Nie | Ogranicz do lokalizacji, w których ten produkt jest dostępny (`residential`, `mobile`, `mobile-gb`). |

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

## Stany / prowincje dostępne do targetowania w kraju (US, CA, AU…)

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

Wartości segmentu nazwy użytkownika `-state-{state}`. Pusta lista dla krajów bez targetowania stanów. Kody ZIP nie są wymienione: segment `-zip-{zip}` przyjmuje dowolny 5-cyfrowy kod ZIP w USA, a brama zwraca stronę błędu, gdy nie ma pasującego wyjściowego IP.

Publiczne: klucz API nie jest wymagany.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Tak | ISO 3166-1 alpha-2, wielkimi literami. |

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

## Miasta dostępne do targetowania w kraju

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

W przypadku `product=mobile` lub `product=mobile-gb` dostępne są tylko miasta, w których działają modemy 4G/5G.

Publiczne: klucz API nie jest wymagany.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Tak | ISO 3166-1 alpha-2, wielkimi literami. |
| `product` | query | string | Nie | Ogranicz do lokalizacji, w których ten produkt jest dostępny (`residential`, `mobile`, `mobile-gb`). |

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

## Dostępni operatorzy ISP (ASN) w kraju — tylko proxy rezydencjalne

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

Publiczne: klucz API nie jest wymagany.

**Parametry**

| Nazwa | W | Typ | Wymagane | Opis |
| --- | --- | --- | --- | --- |
| `countryCode` | path | string | Tak | ISO 3166-1 alpha-2, wielkimi literami. |

**Odpowiedź** `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 to usługa proxy rezydencjalnych w USA do sprawdzania lokalnych wyników wyszukiwania, reklam i cen miasto po mieście, z płatnością w kryptowalutach i bez przesyłania dokumentu tożsamości.
