開発者向け

API・連携ドキュメント

SocksNode を連携する方法は2つあります。HTTP(S) または SOCKS5 でプロキシゲートウェイに直接接続する方法と、REST API を通じて帯域幅・使用状況・プロキシをプログラムで管理する方法です。

このページの内容

モバイルプロキシ

4G/5G REST API

4G/5GモバイルプロキシをAPIで購入・管理できます。各Mobile IPは選んだ期間の間ローテーションするキャリアIP(最大3接続)です。購入と更新は前払いのアカウント残高(USD)から差し引かれます。read:proxies / write:proxies スコープを使用します。

https://socksnode.com/api/v1

認証

ベース URL https://socksnode.com/api/v1。Dashboard → API accessでキーを作成し、Bearer トークンとして送信してください。キーはスコープ付きです — 必要なものだけをリクエストしてください。

スコープ付与される権限
read:usage残高と使用状況分析
read:proxies保存済みプロキシ認証情報の一覧表示
write:proxies新しいプロキシ認証情報の生成
purchaseローテーションの住宅・データセンター・モバイルプロキシ用のGB購入、静的IPとISP IPの購入・更新、4G/5Gポートのレンタル・更新、自動更新の設定、24時間IPとIP Vaultのアドレス・帯域の購入 — 残高から支払われます。

レート制限: キーごとに毎分120リクエスト(プロキシ生成はさらに制限されます)。キーは秘密に保ち、サーバーサイドで管理してください。

GET /api/v1/account HTTP/1.1
Host: socksnode.com
Authorization: Bearer sk_YOUR_API_KEY

エラー

エラーは、対応する HTTP ステータスとともに JSON ボディ { "error": { "code", "message" } } を返します:

ステータス意味
400リクエストボディまたはパラメータが無効です
401API キーがない、無効、または失効しています
402プロキシを生成するための帯域幅残高が不足しています
403API キーに必要なスコープがありません
404見つからないか、あなたのものではありません。
409ポートの状態により現在は実行できません(例: 期限切れ)。
429レート制限を超過しました — Retry-After ヘッダーを参照してください
502上流ネットワークでエラー。課金されていません。
503製品はメンテナンス中です。少し後に再試行してください。
HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "error": {
    "code": "no_bandwidth",
    "message": "…"
  }
}

API エンドポイント

期間・国・州・キャリア

GET/mobile/catalog

スコープ: read:proxies

クエリパラメータ

  • countryinteger任意

    国 id。その州を返します。

  • stateinteger任意

    州 id。そのキャリアを返します。

  • availabilitystring任意

    1 を指定すると、各選択肢の現在の空き状況を追加します。

    1

  • tierstring任意

    在庫を確認するプラン。

    economybasicturboデフォルト: basic

  • modemsstring任意

    state と一緒に 1 を指定すると、その州の全モデム(空き・使用中)と各モデムの IP 保持時間を返します。項目は /mobile/proxies/PROXY_ID/modems と同じです。

    1

  • carrierinteger任意

    キャリア id。modems=1 と併用すると、そのキャリアのモデムだけを返します。

curl "https://socksnode.com/api/v1/mobile/catalog?state=12&availability=1" \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
レスポンス200
{
  "data": {
    "carriers": [
      { "id": 34, "name": "5G AT&T", "status": "ok", "pct": 82 },
      { "id": 35, "name": "5G T-Mobile", "status": "low", "pct": 11 },
      { "id": 36, "name": "5G Verizon", "status": "none", "pct": 0 }
    ]
  }
}
// status: "ok" | "low" | "none" | "unknown"
// Country and state stock is refreshed every ~15 min;
// carrier stock is checked live, right before you choose.

モバイルプロキシ一覧(認証情報付き)

GET/mobile/proxies

スコープ: read:proxies

パラメータなし。

curl "https://socksnode.com/api/v1/mobile/proxies" \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
レスポンス200
{
  "data": [
    {
      "id": "clx…",
      "name": "Port 1",
      "host": "mobile.socksnode.com",
      "port": 9094,
      "protocol": "socks5",
      "username": "sn_a1b2c3d4",
      "password": "…",
      "authMode": "userpass",
      "allowedIps": [],
      "country": "UNITED STATES",
      "state": "FLORIDA",
      "carrier": "5G AT&T",
      "rotationMinutes": 15,
      "modem": { "id": "3f9c0a1b2d4e5f607182", "code": "K7QM" },
      "status": "active",
      "paused": false,
      "bytesUsed": 0,
      "lastExitIp": null,
      "expiresAt": "2026-10-30T04:46:53.000Z"
    }
  ]
}

1つのプロキシ

GET/mobile/proxies/{id}

使用データ量と最終出口IPを含む

スコープ: read:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID" \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
レスポンス200
{
  "data": {
    "id": "clx…",
    "name": "Port 1",
    "host": "mobile.socksnode.com",
    "port": 9094,
    "protocol": "socks5",
    "username": "sn_a1b2c3d4",
    "password": "…",
    "authMode": "userpass",
    "allowedIps": [],
    "country": "UNITED STATES",
    "state": "FLORIDA",
    "carrier": "5G AT&T",
    "rotationMinutes": 15,
    "modem": { "id": "3f9c0a1b2d4e5f607182", "code": "K7QM" },
    "status": "active",
    "paused": false,
    "bytesUsed": 0,
    "lastExitIp": null,
    "expiresAt": "2026-10-30T04:46:53.000Z"
  }
}

Nポートを購入(残高から差し引き。不足時は402)

POST/mobile/proxies

スコープ: purchase

ボディパラメータ

  • tierKeystring任意

    レンタルするプラン。

    economybasicturboデフォルト: basic

  • durationKeystring必須

    レンタル期間。そのプランで販売されている期間であること。

    2h12h1d3d7d15d30d

  • quantityinteger任意

    レンタルするポート数、1–50。作成できなかった分は課金されません。

    デフォルト: 1

  • countryIdinteger任意

    カタログの国 id。省略すると空いている任意のロケーション。

  • cityIdinteger任意

    カタログの州 id。

  • spIdinteger任意

    カタログのキャリア id。

  • modemIdstring任意

    /mobile/catalog?modems=1 のモデム id(同じプラン)。cityId と quantity 1 が必要です。空きがなければ 409 modem_taken で、料金はかかりません。

  • protocolstring任意

    ポートのプロトコル。

    sockshttpデフォルト: socks

curl -X POST "https://socksnode.com/api/v1/mobile/proxies" \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "durationKey": "30d",
    "quantity": 1,
    "countryId": 1,
    "cityId": 12,
    "spId": 34,
    "protocol": "socks"
  }'
レスポンス201
{
  "data": [
    {
      "id": "clx…",
      "name": "Port 1",
      "host": "mobile.socksnode.com",
      "port": 9094,
      "protocol": "socks5",
      "username": "sn_a1b2c3d4",
      "password": "…",
      "authMode": "userpass",
      "allowedIps": [],
      "country": "UNITED STATES",
      "state": "FLORIDA",
      "carrier": "5G AT&T",
      "rotationMinutes": 15,
      "modem": { "id": "3f9c0a1b2d4e5f607182", "code": "K7QM" },
      "status": "active",
      "paused": false,
      "bytesUsed": 0,
      "lastExitIp": null,
      "expiresAt": "2026-10-30T04:46:53.000Z"
    }
  ],
  "charged": 40
}

国/州/キャリアを変更(無料)

POST/mobile/proxies/{id}/switch

スコープ: write:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

ボディパラメータ

  • countryIdinteger必須

    カタログの国 id。

  • cityIdinteger任意

    カタログの州 id。

  • spIdinteger任意

    カタログのキャリア id。

  • modemIdstring任意

    モデム一覧のモデム id。cityId が必要です。ポートはそのモデムにだけ移動します。満杯なら 409 modem_taken、一覧から消えていれば 404 modem_gone。

  • protocolstring任意

    既定はポートの現在のプロトコル。

    sockshttp

curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/switch" \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "countryId": 3,
    "cityId": 12,
    "spId": 34,
    "modemId": "8d21e7c40b9a6f5e3c12"
  }'
レスポンス200
{
  "data": {
    "id": "clx…",
    "host": "mobile.socksnode.com",
    "port": 9095,
    "protocol": "socks5",
    "country": "UNITED STATES",
    "state": "FLORIDA",
    "carrier": "5G AT&T",
    "status": "active"
  }
}
// + every other field of GET /mobile/proxies/{id}

ポート用に州のモデム一覧(空き・使用中、IP 保持時間)

GET/mobile/proxies/{id}/modems

スコープ: read:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

クエリパラメータ

  • stateinteger必須

    カタログの州 id。このポートのプランで、その州のモデムを返します。

  • carrierinteger任意

    キャリア id。modems=1 と併用すると、そのキャリアのモデムだけを返します。

curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/modems?state=12&carrier=34" \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
レスポンス200
{
  "data": {
    "modems": [
      {
        "id": "3f9c0a1b2d4e5f607182",
        "code": "K7QM",
        "carrier": "5G AT&T",
        "free": true,
        "current": true,
        "yours": 0,
        "yourPorts": [],
        "rotationMinutes": 30,
        "lastIp": "174.208.161.27",
        "lastOkAt": "2026-10-28T03:12:40.000Z",
        "failing": false
      },
      {
        "id": "8d21e7c40b9a6f5e3c12",
        "code": "R4XB",
        "carrier": "5G AT&T",
        "free": false,
        "current": false,
        "yours": 0,
        "yourPorts": [],
        "rotationMinutes": 60,
        "lastIp": null,
        "lastOkAt": null,
        "failing": false
      }
    ],
    "free": 1,
    "total": 2
  }
}
// free: has a slot for one more port. current: this port is on it.
// yours: your other live ports on it (they share its IP); yourPorts: their port numbers.
// rotationMinutes: how long the modem keeps one IP.

新しい出口IP(無料)

POST/mobile/proxies/{id}/rotate

スコープ: write:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/rotate" \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
レスポンス200
{
  "data": {
    "id": "clx…",
    "host": "mobile.socksnode.com",
    "port": 9095,
    "protocol": "socks5",
    "country": "UNITED STATES",
    "state": "FLORIDA",
    "carrier": "5G AT&T",
    "status": "active"
  }
}
// + every other field of GET /mobile/proxies/{id}

現在の出口IPを取得

GET/mobile/proxies/{id}/check-ip

スコープ: read:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

curl "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/check-ip" \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
レスポンス200
{
  "data": { "ip": "174.208.161.27" }
}

SOCKS5 ↔ HTTP(S) を切替

POST/mobile/proxies/{id}/protocol

スコープ: write:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

ボディパラメータ

  • protocolstring必須

    ポートのプロトコル。

    sockshttp

curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/protocol" \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "http"
  }'
レスポンス200
{
  "data": {
    "id": "clx…",
    "host": "mobile.socksnode.com",
    "port": 9095,
    "protocol": "socks5",
    "country": "UNITED STATES",
    "state": "FLORIDA",
    "carrier": "5G AT&T",
    "status": "active"
  }
}
// + every other field of GET /mobile/proxies/{id}

認証方式を変更

POST/mobile/proxies/{id}/auth

スコープ: write:proxies

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

ボディパラメータ

  • modestring必須

    userpass はユーザー名とパスワードで認証、whitelist はリストの IP がパスワードなしで接続。

    userpasswhitelist

  • allowedIpsstring[]任意

    公開 IPv4/IPv6 アドレスを最大3つ(範囲指定不可)。whitelist で必要。

    デフォルト: []

curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/auth" \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "whitelist",
    "allowedIps": [
      "203.0.113.7"
    ]
  }'
レスポンス200
{
  "data": {
    "id": "clx…",
    "host": "mobile.socksnode.com",
    "port": 9095,
    "protocol": "socks5",
    "country": "UNITED STATES",
    "state": "FLORIDA",
    "carrier": "5G AT&T",
    "status": "active"
  }
}
// + every other field of GET /mobile/proxies/{id}

ポートを延長(残高から差し引き)

POST/mobile/proxies/{id}/renew

スコープ: purchase

パスパラメータ

  • idstring必須

    モバイルプロキシの id。

ボディパラメータ

  • durationKeystring必須

    レンタル期間。ポートのプランで販売されている期間であること。

    2h12h1d3d7d15d30d

curl -X POST "https://socksnode.com/api/v1/mobile/proxies/PROXY_ID/renew" \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "durationKey": "30d"
  }'
レスポンス200
{
  "data": {
    "id": "clx…",
    "host": "mobile.socksnode.com",
    "port": 9095,
    "protocol": "socks5",
    "country": "UNITED STATES",
    "state": "FLORIDA",
    "carrier": "5G AT&T",
    "status": "active"
  },
  "charged": 40
}
// + every other field of GET /mobile/proxies/{id}

構築の準備はできましたか?

ダッシュボードで認証情報を生成するか、API キーを作成して自動化しましょう。