本文へスキップ

HiProxy APIガイド

ダッシュボードでできることは、ご自身のコードからも行えます。残高と接続情報の取得、料金の確認、残高からの注文、オプション付きプロキシユーザー名の作成を、すべてREST APIで行えます。

始め方

  1. 1ユーザー名で登録し、ダッシュボードにログインします。
  2. 2接続タブでAPIキーを発行します。キー全体は一度しか表示されないため、すぐに安全な場所に保存してください。
  3. 3キーが必要なリクエストでは、毎回Authorizationヘッダーにキーを入れます。
  4. 4まず/accountを呼び出してキーが使えることを確認し、/ordersで注文します。

認証の仕組み

ご自身のアカウントに関するリクエスト (account、orders、proxy-user) にはAPIキーが必要です。ヘッダーでAuthorization: Bearer hpk_...として送ってください。料金、国、見積もりは誰でも利用でき、キーは不要です。

HiProxyが保存するのはキーのハッシュ値だけで、キーそのものは保存しません。紛失した場合はダッシュボードで新しいキーを発行してください。その時点で古いキーは使えなくなります。キーはサーバー側のコードにだけ置き、ブラウザで動くコードや公開リポジトリには絶対に入れないでください。

HTTP header
Authorization: Bearer hpk_your_api_key

ベースURLとデータ形式

ベースURL
https://hiproxy.shop/api/v1
リクエストとレスポンスの本文
application/json
金額
USDの数値 (例: 1036.60)
タイムスタンプ
ISO 8601 (UTC)

呼び出し回数の制限はありますか

APIキー1つにつき、1分あたり60回まで呼び出せます。キーなしで呼び出す公開エンドポイントは、1つのIPにつき1分あたり60回までです。上限を超えるとHTTP 429が返ります。1分待ってから再度送ってください。

エラー応答の形式

HTTPステータスコードと、短いエラーコードとメッセージを含むJSON本文が返ります。

例
{
  "error": {
    "code": "insufficient_balance",
    "message": "Your balance is too low for this order. Top up in the dashboard."
  }
}
code
bad_requestHTTP 400必須の値がないか、この製品ではその値を受け付けません。
unauthorizedHTTP 401APIキーが送られていないか、キーが間違っています。
insufficient_balanceHTTP 402残高が注文の合計額に足りません。残高は変更されていません。
not_foundHTTP 404お客様のアカウントに、このidの注文はありません。
rate_limitedHTTP 4291分あたりのリクエスト上限を超えました。
server_errorHTTP 500サーバーがリクエストを完了できませんでした。残高は変更されていません。

エンドポイント

アカウント情報の取得

GET/api/v1/accountAPIキーが必要

残高、プロキシのホストとポート、プロキシユーザー名とパスワード、許可IPのリストを返します。

リクエスト
curl https://hiproxy.shop/api/v1/account \
  -H "Authorization: Bearer hpk_your_api_key"
レスポンス
{
  "username": "hi_user01",
  "balance_usd": 1300,
  "proxy": {
    "host": "gate.hiproxy.shop",
    "http_port": 6100,
    "socks5_port": 6200,
    "username": "hpexample1",
    "password": "your_password"
  },
  "allowed_ips": [
    "203.0.113.10"
  ]
}

製品と料金の取得

GET/api/v1/productsキー不要

各製品の注文上限、段階ごとの価格、期間割引を返します。料金ページと同じ価格表を使っています。

リクエスト
curl https://hiproxy.shop/api/v1/products
レスポンス
{
  "currency": "USD",
  "prices_as_of": "2026-10-31",
  "products": [
    {
      "id": "unlimited",
      "unit": "day",
      "quantity": {
        "meaning": "days",
        "min": 1,
        "max": 365
      },
      "...": "..."
    },
    {
      "id": "residential",
      "unit": "gb",
      "...": "..."
    }
  ]
}

国と都市の一覧

GET/api/v1/countriesキー不要

各製品が対応している国と、ユーザー名の-city-オプションで使う都市の値を返します。

フィールド意味
product任意unlimited、residential、isp、datacenterのいずれか。空の場合はresidentialです。
リクエスト
curl "https://hiproxy.shop/api/v1/countries?product=datacenter"
レスポンス
{
  "product": "datacenter",
  "countries": [
    {
      "code": "us",
      "name": "United States",
      "region": "americas",
      "datacenter": true,
      "cities": [
        {
          "name": "New York",
          "value": "new_york"
        },
        {
          "name": "Los Angeles",
          "value": "los_angeles"
        }
      ]
    }
  ]
}

見積もりを取得

POST/api/v1/quoteキー不要

残高を変更せずに注文の合計額を計算します。注文時と同じ本文を送ってください。

フィールド意味
product必須unlimited、residential、isp、datacenterのいずれか。
quantity必須unlimitedは日数 (1~365)、residentialはGB (5~5,000)、ispはIP数 (1~1,000)、datacenterはIP数 (5~5,000)。
concurrency任意unlimitedのみ。200、500、1000、2000から選びます。
bandwidth任意unlimitedのみ、単位はMbps。100、200、500、1000から選びます。
months任意ispとdatacenterのみ。1、3、6、12から選びます。
country任意ispとdatacenterのみ。jpのような2文字の国コード。有効な値は/countriesに載っています。
リクエスト
curl -X POST https://hiproxy.shop/api/v1/quote \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
レスポンス
{
  "product": "unlimited",
  "quantity": 30,
  "unit_price_usd": 8.78,
  "unit": "day",
  "total_usd": 263.4
}

注文する

POST/api/v1/ordersAPIキーが必要

合計額を残高から差し引き、注文を作成します。注文はpending (開通中) で始まり、準備ができるとactiveになります。開通できなかった注文はrefundedになり、支払った全額が残高に戻ります。残高が足りない場合は402が返ります。

フィールド意味
product必須unlimited、residential、isp、datacenterのいずれか。
quantity必須unlimitedは日数 (1~365)、residentialはGB (5~5,000)、ispはIP数 (1~1,000)、datacenterはIP数 (5~5,000)。
concurrency任意unlimitedのみ。200、500、1000、2000から選びます。
bandwidth任意unlimitedのみ、単位はMbps。100、200、500、1000から選びます。
months任意ispとdatacenterのみ。1、3、6、12から選びます。
country任意ispとdatacenterのみ。jpのような2文字の国コード。有効な値は/countriesに載っています。
リクエスト
curl -X POST https://hiproxy.shop/api/v1/orders \
  -H "Authorization: Bearer hpk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
レスポンス
{
  "order": {
    "id": "HP-7KQ2M-X4HTD",
    "product": "unlimited",
    "quantity": 30,
    "months": null,
    "concurrency": 1000,
    "bandwidth_mbps": 200,
    "country": null,
    "unit_price_usd": 8.78,
    "total_usd": 263.4,
    "status": "pending",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:12:44.120Z"
  },
  "balance_usd": 1036.6
}

注文一覧

GET/api/v1/ordersAPIキーが必要

お客様の注文を新しい順に最大100件返します。

フィールド意味
status任意pending、active、refundedのいずれか。空の場合はすべての状態の注文を返します。
リクエスト
curl "https://hiproxy.shop/api/v1/orders?status=pending" \
  -H "Authorization: Bearer hpk_your_api_key"
レスポンス
{
  "orders": [
    {
      "id": "HP-7KQ2M-X4HTD",
      "product": "unlimited",
      "quantity": 30,
      "months": null,
      "concurrency": 1000,
      "bandwidth_mbps": 200,
      "country": null,
      "unit_price_usd": 8.78,
      "total_usd": 263.4,
      "status": "pending",
      "created_at": "2026-10-31T09:12:44.120Z",
      "updated_at": "2026-10-31T09:12:44.120Z"
    }
  ]
}

注文1件の取得

GET/api/v1/orders/{id}APIキーが必要

idを指定して1件の注文を返します。開通が完了したかどうかの確認に便利です。

フィールド意味
id必須注文のid (例: HP-7KQ2M-X4HTD)。
リクエスト
curl https://hiproxy.shop/api/v1/orders/HP-7KQ2M-X4HTD \
  -H "Authorization: Bearer hpk_your_api_key"
レスポンス
{
  "order": {
    "id": "HP-7KQ2M-X4HTD",
    "product": "unlimited",
    "quantity": 30,
    "months": null,
    "concurrency": 1000,
    "bandwidth_mbps": 200,
    "country": null,
    "unit_price_usd": 8.78,
    "total_usd": 263.4,
    "status": "active",
    "created_at": "2026-10-31T09:12:44.120Z",
    "updated_at": "2026-10-31T09:40:02.511Z"
  }
}

プロキシユーザー名を作成

GET/api/v1/proxy-userAPIキーが必要

オプションを含んだプロキシユーザー名と、そのまま貼り付けられるHTTPとSOCKS5のURLを返します。sessionを指定しなければ、リクエストごとにIPが変わります。

フィールド意味
product任意unlimited、residential、isp、datacenterのいずれか。空の場合はunlimitedです。
country任意jpのような2文字の国コード。
city任意tokyoのような/countriesの都市の値。countryと一緒に指定したときだけ有効です。
session任意1~32文字の英字または数字。同じsessionのリクエストは同じIPを使います。
ttl任意セッションのIPを維持する分数 (1~60)。空の場合は30です。
リクエスト
curl "https://hiproxy.shop/api/v1/proxy-user?product=residential&country=jp&city=tokyo&session=job42&ttl=30" \
  -H "Authorization: Bearer hpk_your_api_key"
レスポンス
{
  "username": "hpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30",
  "password": "your_password",
  "http": "http://hpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.hiproxy.shop:6100",
  "socks5": "socks5h://hpexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.hiproxy.shop:6200"
}

手順ごとの例

料金を確認し、残高から注文し、日本のIPで接続するまでを1つのスクリプトで行います。

Python (requests)
import requests

API = "https://hiproxy.shop/api/v1"
HEAD = {"Authorization": "Bearer hpk_your_api_key"}

# 1) Check the price first
plan = {"product": "residential", "quantity": 100}
print(requests.post(f"{API}/quote", json=plan).json())

# 2) Order from your balance
r = requests.post(f"{API}/orders", json=plan, headers=HEAD)
order = r.json()["order"]
print(order["id"], order["status"])

# 3) Get a username for Japanese IPs
u = requests.get(f"{API}/proxy-user", headers=HEAD,
                 params={"product": "residential", "country": "jp"}).json()
proxies = {"http": u["http"], "https": u["http"]}
print(requests.get("https://ipinfo.io/json", proxies=proxies, timeout=30).json())
Node.js 18+
const API = "https://hiproxy.shop/api/v1";
const HEAD = { Authorization: "Bearer hpk_your_api_key", "Content-Type": "application/json" };

// Check the balance
const acc = await fetch(`${API}/account`, { headers: HEAD }).then((r) => r.json());
console.log(acc.balance_usd);

// Order 7 days of unlimited
const res = await fetch(`${API}/orders`, {
  method: "POST",
  headers: HEAD,
  body: JSON.stringify({ product: "unlimited", quantity: 7, concurrency: 500, bandwidth: 100 }),
});
if (res.status === 402) console.log("Top up first");
else console.log((await res.json()).order.id);

APIからの注文はダッシュボードからの注文と同じように処理され、履歴タブに表示されます。例にあるhpk_your_api_keyはご自身のAPIキーに置き換えてください。

ご自身のコードからHiProxyを呼び出す

ユーザー名で新規登録し、ダッシュボードでAPIキーを発行すれば準備完了です。