このページのエンドポイント
GET /v1/catalog/products:商品、プラン、料金POST /v1/orders:残高からプランを購入(新規サービス、トラフィック追加、またはポート延長)GET /v1/orders:注文一覧を取得GET /v1/orders/{orderId}:注文情報を取得
ベースURL https://localserpproxy.com/api/v1。認証、エラー、制限についてはAPI概要をご覧ください。
商品、プラン、料金
GET/v1/catalog/products
注文時に請求される料金を含む、すべての商品とプラン。
公開情報:APIキーは不要です。
レスポンス 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
}
]
}
]
}コード例
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());残高からプランを購入(新規サービス、トラフィック追加、またはポート期間の延長)
POST/v1/orders
常にプリペイド残高から支払われます。価格はAPIによって計算され(カタログ価格 × quantity)、残高から差し引かれた後、サービスが作成または延長され、注文はfulfillmentを含むcompletedとして返されます。プロキシの認証情報はすぐに利用できます。
- 新規レジデンシャルトラフィック:
{ "planId": "res-10" }。 - 新規ローテーション4G/5Gトラフィック(GB単位):
{ "planId": "mgb-10" }(productId: "mobile-gb"付きのトラフィックサブスクリプション。fulfillment.residentialSubscriptionIdで提供)。 - 既存のサブスクリプションにトラフィックを追加:
{ "planId": "res-10", "options": { "subscriptionId": "res_9x2m4k" } }。プランはサブスクリプションと同じ商品に属している必要があります。 - 新規モバイルポート:
{ "planId": "mob-us-30d", "quantity": 1, "options": { "country": "US" } }。必要に応じてcarrierも指定できます(国ごとのキャリアはモバイルポートを参照)。ゾーンプランの対象は、そのゾーンに含まれる国のみです(それ以外の場合はoptions.countryで422)。 - モバイルポートの期間を延長:
{ "planId": "mob-us-7d", "options": { "portId": "mob_2v8k1q" } }を指定すると、プランの期間がexpiresAtに加算されます。
残高不足 → 402 insufficient_balance。不足額と推奨チャージ額がerror.detailsに表示されます(missing、suggestedTopUp)。エラーが発生した場合、残高から差し引かれることはありません。不足分を支払うには、purchaseで同じリクエストを含むチャージを開始してください(POST /v1/topups)。チャージが反映されると、プランが購入されます。
認証:Authorization: Bearer API_KEYヘッダーにAPIキーを指定します。
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Idempotency-Key | header | string | いいえ | POSTを安全に再試行するための一意のキー(例:UUID)。24 h保持。— 最大128文字 |
リクエストボディ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
planId | string | はい | — |
quantity | integer | いいえ | 1~100、デフォルトは1 |
options | object | いいえ | — |
{
"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"
}
}レスポンス 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"
}コード例
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());注文一覧
GET/v1/orders
認証:Authorization: Bearer API_KEYヘッダーにAPIキーを指定します。
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
page | query | integer | いいえ | 1以上、デフォルトは1 |
perPage | query | integer | いいえ | 1~100、デフォルトは20 |
status | query | completed · cancelled | いいえ | 注文は支払い済み(残高から差し引き済み)の状態で作成されます。completed — 支払い済みで提供済み(認証情報はすぐに利用可能)。 |
productId | query | string | いいえ | カタログの商品ID。LocalSERP Proxyの値: residential(GB)、mobile(専用4G/5Gポート)、mobile-gb(GB単位のローテーション4G/5Gトラフィック)。クライアントは未知の値にも対応する必要があります。 |
レスポンス 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
}
}コード例
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());注文を取得
GET/v1/orders/{orderId}
認証:Authorization: Bearer API_KEYヘッダーにAPIキーを指定します。
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
orderId | path | string | はい | — |
レスポンス 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"
}コード例
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());