何から始めればよいですか
- 1ユーザー名で登録し、ダッシュボードにログインします。
- 2接続タブでAPIキーを作成します。キー全体は作成時に一度だけ表示されるので、すぐに安全な場所に保管してください。
- 3キーが必要なリクエストでは、毎回Authorizationヘッダーでキーを送ってください。
- 4まず/accountを呼び出してキーが使えることを確認し、その後/ordersで注文します。
認証
ご自身のアカウントに関するリクエスト (account、orders、proxy-user) にはAPIキーが必要で、ヘッダーにAuthorization: Bearer spk_...として送ります。料金、国、見積もりは公開されており、キーなしで使えます。
StarProxyはキーそのものではなく、各キーのハッシュのみを保持します。キーを紛失した場合は、ダッシュボードで新しいキーを作成してください。その時点で古いキーは使えなくなります。キーはサーバーのコードにのみ置き、ブラウザで動くコードや公開リポジトリには絶対に入れないでください。
Authorization: Bearer spk_your_api_key
ベースURLとデータ形式
- ベースURL
- https://starproxy.shop/api/v1
- リクエストとレスポンスの本文
- application/json
- 金額
- USDの数値 (例: 1047.70)
- タイムスタンプ
- ISO 8601 (UTC)
レート制限はありますか
1つのAPIキーで1分あたり最大60回呼び出せます。キーなしの公開エンドポイントは、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."
}
}| HTTP | code | 意味 |
|---|---|---|
| bad_requestHTTP 400必須の値がないか、この製品では無効な値です。 | 必須の値がないか、この製品では無効な値です。 | |
| unauthorizedHTTP 401APIキーがないか、一致しません。 | APIキーがないか、一致しません。 | |
| insufficient_balanceHTTP 402残高が注文の合計額より少なくなっています。差し引きは行われていません。 | 残高が注文の合計額より少なくなっています。差し引きは行われていません。 | |
| not_foundHTTP 404お客様のアカウントにこのidの注文はありません。 | お客様のアカウントにこのidの注文はありません。 | |
| rate_limitedHTTP 4291分間のリクエストが多すぎます。 | 1分間のリクエストが多すぎます。 | |
| server_errorHTTP 500サーバーがリクエストを完了できませんでした。差し引きは行われていません。 | サーバーがリクエストを完了できませんでした。差し引きは行われていません。 |
エンドポイント
アカウントを取得
GET/api/v1/accountAPIキーが必要
残高、プロキシのホストとポート、プロキシユーザー名とパスワード、許可IPを返します。
curl https://starproxy.shop/api/v1/account \ -H "Authorization: Bearer spk_your_api_key"
{
"username": "star_user01",
"balance_usd": 1300,
"proxy": {
"host": "gate.starproxy.shop",
"http_port": 6100,
"socks5_port": 6200,
"username": "spexample1",
"password": "your_password"
},
"allowed_ips": [
"203.0.113.10"
]
}製品と料金を取得
GET/api/v1/productsキー不要
料金ページと同じ料金表から、製品ごとの注文範囲、数量段階ごとの料金、期間割引を返します。
curl https://starproxy.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任意 | string | unlimited、residential、isp、datacenterのいずれか。初期値はresidentialです。 |
curl "https://starproxy.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必須 | string | unlimited、residential、isp、datacenterのいずれか。 |
quantity必須 | integer | unlimitedは日数 (1~365)、residentialはGB (5~5,000)、ispはIP数 (1~1,000)、datacenterはIP数 (5~5,000)。 |
concurrency任意 | integer | unlimitedのみ。200、500、1000、2000のいずれか。 |
bandwidth任意 | integer | unlimitedのみ、単位はMbps。100、200、500、1000のいずれか。 |
months任意 | integer | ispとdatacenterのみ。1、3、6、12のいずれか。 |
country任意 | string | ispとdatacenterのみ。jpのような2文字の国コード。有効な値は/countriesをご覧ください。 |
curl -X POST https://starproxy.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.41,
"unit": "day",
"total_usd": 252.3
}注文を作成
POST/api/v1/ordersAPIキーが必要
合計額を残高から差し引き、注文を作成します。状態はpending (準備中) から始まり、注文の準備ができるとactiveに変わります。開通できない場合はrefundedになり、全額が残高に戻ります。残高が足りない場合は402が返ります。
| フィールド | 型 | 意味 |
|---|---|---|
product必須 | string | unlimited、residential、isp、datacenterのいずれか。 |
quantity必須 | integer | unlimitedは日数 (1~365)、residentialはGB (5~5,000)、ispはIP数 (1~1,000)、datacenterはIP数 (5~5,000)。 |
concurrency任意 | integer | unlimitedのみ。200、500、1000、2000のいずれか。 |
bandwidth任意 | integer | unlimitedのみ、単位はMbps。100、200、500、1000のいずれか。 |
months任意 | integer | ispとdatacenterのみ。1、3、6、12のいずれか。 |
country任意 | string | ispとdatacenterのみ。jpのような2文字の国コード。有効な値は/countriesをご覧ください。 |
curl -X POST https://starproxy.shop/api/v1/orders \
-H "Authorization: Bearer spk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'{
"order": {
"id": "SP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.41,
"total_usd": 252.3,
"status": "pending",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:12:44.120Z"
},
"balance_usd": 1047.7
}注文一覧
GET/api/v1/ordersAPIキーが必要
新しい順に最大100件の注文を返します。
| フィールド | 型 | 意味 |
|---|---|---|
status任意 | string | pending、active、refundedのいずれか。空にするとすべての状態を返します。 |
curl "https://starproxy.shop/api/v1/orders?status=pending" \ -H "Authorization: Bearer spk_your_api_key"
{
"orders": [
{
"id": "SP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.41,
"total_usd": 252.3,
"status": "pending",
"created_at": "2026-10-31T09:12:44.120Z",
"updated_at": "2026-10-31T09:12:44.120Z"
}
]
}注文を取得
GET/api/v1/orders/{id}APIキーが必要
idで1件の注文を返します。開通が完了したかの確認に使えます。
| フィールド | 型 | 意味 |
|---|---|---|
id必須 | string | 注文id (例: SP-7KQ2M-X4HTD)。 |
curl https://starproxy.shop/api/v1/orders/SP-7KQ2M-X4HTD \ -H "Authorization: Bearer spk_your_api_key"
{
"order": {
"id": "SP-7KQ2M-X4HTD",
"product": "unlimited",
"quantity": 30,
"months": null,
"concurrency": 1000,
"bandwidth_mbps": 200,
"country": null,
"unit_price_usd": 8.41,
"total_usd": 252.3,
"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任意 | string | unlimited、residential、isp、datacenterのいずれか。初期値はunlimitedです。 |
country任意 | string | jpのような2文字の国コード。 |
city任意 | string | /countriesにある都市の値 (例: tokyo)。countryが必要です。 |
session任意 | string | 英数字1~32文字。同じsessionのリクエストは1つのIPを共有します。 |
ttl任意 | integer | セッションのIPを維持する分数、1~60。初期値は30です。 |
curl "https://starproxy.shop/api/v1/proxy-user?product=residential&country=jp&city=tokyo&session=job42&ttl=30" \ -H "Authorization: Bearer spk_your_api_key"
{
"username": "spexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30",
"password": "your_password",
"http": "http://spexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.starproxy.shop:6100",
"socks5": "socks5h://spexample1-zone-res-cc-jp-city-tokyo-sid-job42-ttl-30:your_password@gate.starproxy.shop:6200"
}全体の例
見積もりを取得し、残高から注文して、日本のIP経由で接続するまでを1つのスクリプトで行います。
import requests
API = "https://starproxy.shop/api/v1"
HEAD = {"Authorization": "Bearer spk_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())const API = "https://starproxy.shop/api/v1";
const HEAD = { Authorization: "Bearer spk_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からの注文はダッシュボードからの注文と同じように処理され、履歴タブに表示されます。例にあるspk_your_api_keyはご自身のキーに置き換えてください。