Endpoint di halaman ini
GET /v1/catalog/products: Produk, paket, dan hargaPOST /v1/orders: Beli paket dari saldo (layanan baru, tambahan trafik, atau perpanjangan port)GET /v1/orders: Daftar pesananGET /v1/orders/{orderId}: Dapatkan detail pesanan
URL dasar https://localserpproxy.com/api/v1. Autentikasi, error, dan batas: lihat ringkasan API.
Produk, paket, dan harga
GET/v1/catalog/products
Setiap produk beserta paket dan harganya, persis seperti yang dikenakan saat Anda memesan.
Publik: tidak perlu kunci API.
Respons 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
}
]
}
]
}Contoh kode
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());Beli paket menggunakan saldo (layanan baru, tambahan trafik, atau perpanjangan port)
POST/v1/orders
Pembayaran selalu menggunakan saldo prabayar: harga dihitung oleh API (harga katalog × quantity), saldo dipotong, layanan dibuat atau diperpanjang, lalu pesanan dikembalikan completed dengan fulfillment. Kredensial proxy langsung tersedia.
- Trafik proxy residensial baru:
{ "planId": "res-10" }. - Trafik proxy seluler 4G/5G berputar baru (per GB):
{ "planId": "mgb-10" }(langganan trafik denganproductId: "mobile-gb", dikirim dalamfulfillment.residentialSubscriptionId). - Tambahkan trafik ke langganan yang sudah ada:
{ "planId": "res-10", "options": { "subscriptionId": "res_9x2m4k" } }: paket harus sesuai dengan produk langganan tersebut. - Port proxy seluler baru:
{ "planId": "mob-us-30d", "quantity": 1, "options": { "country": "US" } }, opsional dengancarrier(lihat operator di suatu negara pada Port proxy seluler). Paket zona hanya mencakup negara-negara di zonanya (422padaoptions.countryjika tidak). - Perpanjang port proxy seluler:
{ "planId": "mob-us-7d", "options": { "portId": "mob_2v8k1q" } }menambahkan durasi paket keexpiresAt.
Saldo tidak cukup → 402 insufficient_balance, dengan jumlah kekurangan dan saran isi saldo di error.details (missing, suggestedTopUp). Tidak ada saldo yang dipotong jika terjadi kesalahan. Untuk membayar selisihnya, mulai isi saldo dengan permintaan yang sama di purchase (POST /v1/topups): paket akan dibeli segera setelah saldo terisi.
Autentikasi: kunci API di header Authorization: Bearer API_KEY.
Parameter
| Nama | Di | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
Idempotency-Key | header | string | Tidak | Kunci unik (misalnya UUID) untuk mengulangi POST dengan aman. Berlaku 24 jam. — maks. 128 karakter |
Isi permintaan
| Kolom | Tipe | Wajib | Deskripsi |
|---|---|---|---|
planId | string | Ya | — |
quantity | integer | Tidak | 1–100, default 1 |
options | object | Tidak | — |
{
"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"
}
}Respons 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"
}Contoh kode
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());Daftar pesanan
GET/v1/orders
Autentikasi: kunci API di header Authorization: Bearer API_KEY.
Parameter
| Nama | Di | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
page | query | integer | Tidak | ≥ 1, default 1 |
perPage | query | integer | Tidak | 1–100, default 20 |
status | query | completed · cancelled | Tidak | Pesanan dibuat dalam status sudah dibayar (saldo telah dipotong). completed — dibayar dan dikirim (kredensial langsung tersedia). |
productId | query | string | Tidak | ID produk dari katalog. Nilai untuk LocalSERP Proxy: residential (GB), mobile (port proxy seluler 4G/5G khusus), dan mobile-gb (trafik proxy seluler 4G/5G berputar per GB). Klien harus dapat menangani nilai yang tidak dikenal. |
Respons 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
}
}Contoh kode
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());Dapatkan pesanan
GET/v1/orders/{orderId}
Autentikasi: kunci API di header Authorization: Bearer API_KEY.
Parameter
| Nama | Di | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
orderId | path | string | Ya | — |
Respons 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"
}Contoh kode
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());