Punkty końcowe na tej stronie
GET /v1/catalog/products: Produkty, plany i cenyPOST /v1/orders: Kup plan z salda (nowa usługa, większy pakiet transferu lub przedłużenie portu)GET /v1/orders: Lista zamówieńGET /v1/orders/{orderId}: Pobierz zamówienie
Podstawowy URL: https://localserpproxy.com/api/v1. Uwierzytelnianie, błędy i limity: zobacz omówienie API.
Produkty, plany i ceny
GET/v1/catalog/products
Wszystkie produkty wraz z planami i cenami — dokładnie takimi, jakie obowiązują przy składaniu zamówienia.
Publiczne: klucz API nie jest wymagany.
Odpowiedź 200 OK
{
"data": [
{
"id": "residential",
"name": "Residential proxies",
"description": "Residential traffic for manual local search, advertising, price and application checks in US cities. State, city and ZIP selection, subject to available exits; no promise of GPS position or rankings.",
"unit": "GB",
"plans": [
{
"id": "res-10",
"productId": "residential",
"name": "Local team",
"quantity": 10,
"unit": "GB",
"durationDays": null,
"price": "7.50",
"pricePerUnit": "0.75",
"popular": false,
"features": [
"US city selection, subject to availability",
"Traffic stays until used",
"Rotating or sticky sessions"
],
"available": true,
"countries": null
}
]
}
]
}Przykłady kodu
curl -s "https://localserpproxy.com/api/v1/catalog/products"import os
import requests
API = "https://localserpproxy.com/api/v1"
r = requests.get(f"{API}/catalog/products", timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';
const res = await fetch(`${API}/catalog/products`);
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());Kup plan z salda (nowa usługa, większy pakiet ruchu lub przedłużenie portu)
POST/v1/orders
Płatność zawsze pobierana z przedpłaconego salda: cenę oblicza API (cena katalogowa × quantity), saldo zostaje obciążone, usługa utworzona lub przedłużona, a zamówienie zwrócone jako completed ze statusem fulfillment. Dane dostępowe do proxy są dostępne od razu.
- Nowy pakiet ruchu w proxy rezydencjalnym:
{ "planId": "res-10" }. - Nowy pakiet ruchu w rotacyjnym proxy 4G/5G (za GB):
{ "planId": "mgb-10" }(subskrypcja ruchu zproductId: "mobile-gb", dostarczana wfulfillment.residentialSubscriptionId). - Dodanie ruchu do istniejącej subskrypcji:
{ "planId": "res-10", "options": { "subscriptionId": "res_9x2m4k" } }: plan musi należeć do produktu subskrypcji. - Nowy port lub porty mobilne:
{ "planId": "mob-us-30d", "quantity": 1, "options": { "country": "US" } }, opcjonalnie zcarrier(zobacz operatorów w danym kraju w sekcji Porty mobilne). Plany strefowe obejmują tylko kraje należące do danej strefy (422w przeciwnym razieoptions.country). - Przedłużenie portu mobilnego:
{ "planId": "mob-us-7d", "options": { "portId": "mob_2v8k1q" } }dodaje czas trwania planu doexpiresAt.
Za mało środków na saldzie → 402 insufficient_balance — brakująca kwota i sugerowane doładowanie są podane w error.details (missing, suggestedTopUp). W razie błędu saldo nie zostaje obciążone. Aby dopłacić brakującą kwotę, rozpocznij doładowanie z tym samym żądaniem w purchase (POST /v1/topups): plan zostanie kupiony, gdy tylko doładowanie zostanie zaksięgowane.
Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.
Parametry
| Nazwa | W | Typ | Wymagane | Opis |
|---|---|---|---|---|
Idempotency-Key | header | string | Nie | Unikalny klucz (np. UUID) umożliwiający bezpieczne ponowienie żądania POST. Przechowywany przez 24 h. — maks. 128 znaków |
Treść żądania
| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
planId | string | Tak | — |
quantity | integer | Nie | 1–100, domyślnie 1 |
options | object | Nie | — |
{
"planId": "res-10"
}{
"planId": "mob-us-30d",
"quantity": 1,
"options": {
"country": "US",
"carrier": "verizon",
"autoRenew": true
}
}{
"planId": "mob-us-7d",
"options": {
"portId": "mob_2v8k1q"
}
}{
"planId": "mgb-10"
}{
"planId": "mob-us-30d",
"options": {
"country": "US",
"carrier": "verizon"
}
}Odpowiedź 201 Created
{
"id": "ord_4f8k2m9q",
"status": "completed",
"productId": "residential",
"planId": "res-10",
"planName": "Local team",
"quantity": 1,
"unitPrice": "7.50",
"subtotal": "7.50",
"discount": "0.00",
"total": "7.50",
"promoCode": null,
"currency": "USD",
"topUpId": null,
"options": {},
"fulfillment": {
"residentialSubscriptionId": "res_9x2m4k",
"mobilePortIds": []
},
"createdAt": "2026-10-05T14:03:11Z",
"paidAt": "2026-10-05T14:03:11Z"
}Przykłady kodu
curl -s -X POST "https://localserpproxy.com/api/v1/orders" \
-H "Authorization: Bearer $API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"planId":"res-10"}'import os, uuid
import requests
API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}", "Idempotency-Key": str(uuid.uuid4())}
r = requests.post(f"{API}/orders", headers=HEADERS, json={"planId": "res-10"}, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
import { randomUUID } from 'node:crypto';
const API = 'https://localserpproxy.com/api/v1';
const res = await fetch(`${API}/orders`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Idempotency-Key': randomUUID(), 'Content-Type': 'application/json' },
body: JSON.stringify({ planId: 'res-10' }),
});
if (!res.ok) throw new Error((await res.json()).error?.message ?? `HTTP ${res.status}`);
console.log(await res.json());Lista zamówień
GET/v1/orders
Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.
Parametry
| Nazwa | W | Typ | Wymagane | Opis |
|---|---|---|---|---|
page | query | integer | Nie | ≥ 1, domyślnie 1 |
perPage | query | integer | Nie | 1–100, domyślnie 20 |
status | query | completed · cancelled | Nie | Zamówienia są tworzone jako opłacone (kwota jest pobierana z salda). completed — opłacone i dostarczone (dane dostępowe dostępne od razu). |
productId | query | string | Nie | Identyfikator produktu z katalogu. Wartości dla LocalSERP Proxy: residential (GB), mobile (dedykowane porty 4G/5G) i mobile-gb (ruch w rotacyjnym proxy 4G/5G za GB). Klienci muszą obsługiwać nieznane wartości. |
Odpowiedź 200 OK
{
"data": [
{
"id": "ord_4f8k2m9q",
"status": "completed",
"productId": "residential",
"planId": "res-10",
"planName": "Local team",
"quantity": 1,
"unitPrice": "7.50",
"subtotal": "7.50",
"discount": "0.00",
"total": "7.50",
"promoCode": null,
"currency": "USD",
"topUpId": null,
"options": {},
"fulfillment": {
"residentialSubscriptionId": "res_9x2m4k",
"mobilePortIds": []
},
"createdAt": "2026-10-05T14:03:11Z",
"paidAt": "2026-10-05T14:03:11Z"
}
],
"pagination": {
"page": 1,
"perPage": 20,
"total": 1,
"totalPages": 1
}
}Przykłady kodu
curl -s "https://localserpproxy.com/api/v1/orders" \
-H "Authorization: Bearer $API_KEY"import os
import requests
API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.get(f"{API}/orders", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';
const res = await fetch(`${API}/orders`, {
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 zamówienie
GET/v1/orders/{orderId}
Uwierzytelnianie: klucz API w nagłówku Authorization: Bearer API_KEY.
Parametry
| Nazwa | W | Typ | Wymagane | Opis |
|---|---|---|---|---|
orderId | path | string | Tak | — |
Odpowiedź 200 OK
{
"id": "ord_4f8k2m9q",
"status": "completed",
"productId": "residential",
"planId": "res-10",
"planName": "Local team",
"quantity": 1,
"unitPrice": "7.50",
"subtotal": "7.50",
"discount": "0.00",
"total": "7.50",
"promoCode": null,
"currency": "USD",
"topUpId": null,
"options": {},
"fulfillment": {
"residentialSubscriptionId": "res_9x2m4k",
"mobilePortIds": []
},
"createdAt": "2026-10-05T14:03:11Z",
"paidAt": "2026-10-05T14:03:11Z"
}Przykłady kodu
curl -s "https://localserpproxy.com/api/v1/orders/ord_4f8k2m9q" \
-H "Authorization: Bearer $API_KEY"import os
import requests
API = "https://localserpproxy.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
r = requests.get(f"{API}/orders/ord_4f8k2m9q", headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json())// Node.js 18+ (built-in fetch), ES module
const API = 'https://localserpproxy.com/api/v1';
const res = await fetch(`${API}/orders/ord_4f8k2m9q`, {
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());