Skip to content
starproxy
Get started

StarProxy API

Most of the dashboard is available from code. Check your balance, look up prices, place orders from your balance and fetch proxy usernames with options, all through one REST API.

Where do I start?

  1. 1Sign up with a username and log in to the dashboard.
  2. 2Create an API key on the Connect tab. The full key is shown once, when you create it, so store it somewhere safe right away.
  3. 3Send the key in the Authorization header with every request that needs it.
  4. 4Call /account first to check that the key works, then place orders with /orders.

Authentication

Requests about your own account (account, orders, proxy-user) require an API key, sent in the header as Authorization: Bearer spk_... Prices, countries and quotes are public and work without a key.

StarProxy keeps only a hash of each key, not the key itself. If you lose a key, create a new one in the dashboard. The old key stops working at that moment. Keep keys in server code only. Never put them in code that runs in a browser or in a public repository.

HTTP header
Authorization: Bearer spk_your_api_key

Base URL and data format

Base URL
https://starproxy.shop/api/v1
Request and response body
application/json
Amounts
USD as a number, e.g. 1047.70
Timestamps
ISO 8601 (UTC)

Is there a rate limit?

One API key can make up to 60 calls a minute. Public endpoints without a key allow 60 calls a minute per IP. Past the limit you get HTTP 429, so wait a minute and send again.

What do errors look like?

An HTTP status code, plus a JSON body with a short error code and a message.

Example
{
  "error": {
    "code": "insufficient_balance",
    "message": "Your balance is too low for this order. Top up in the dashboard."
  }
}
code
bad_requestHTTP 400A required value is missing, or the value isn't valid for this product.
unauthorizedHTTP 401The API key is missing or doesn't match.
insufficient_balanceHTTP 402Your balance is lower than the order total. Nothing was deducted.
not_foundHTTP 404There is no order with this id on your account.
rate_limitedHTTP 429Too many requests within one minute.
server_errorHTTP 500The server couldn't complete the request. Nothing was deducted.

Endpoints

Get account

GET/api/v1/accountAPI key required

Returns your balance, proxy host and ports, proxy username and password, and your Allowed IPs.

Request
curl https://starproxy.shop/api/v1/account \
  -H "Authorization: Bearer spk_your_api_key"
Response
{
  "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 products and prices

GET/api/v1/productsNo key needed

Returns each product's order range, price per quantity tier and period discounts, from the same price table as the pricing page.

Request
curl https://starproxy.shop/api/v1/products
Response
{
  "currency": "USD",
  "prices_as_of": "2026-10-31",
  "products": [
    {
      "id": "unlimited",
      "unit": "day",
      "quantity": {
        "meaning": "days",
        "min": 1,
        "max": 365
      },
      "...": "..."
    },
    {
      "id": "residential",
      "unit": "gb",
      "...": "..."
    }
  ]
}

List countries and cities

GET/api/v1/countriesNo key needed

Returns the countries each product supports, plus the city values for the -city- username option.

FieldMeaning
productOptionalOne of unlimited, residential, isp, datacenter. Defaults to residential.
Request
curl "https://starproxy.shop/api/v1/countries?product=datacenter"
Response
{
  "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"
        }
      ]
    }
  ]
}

Get a quote

POST/api/v1/quoteNo key needed

Calculates the order total and leaves your balance alone. Send the same body you would use for the order.

FieldMeaning
productRequiredOne of unlimited, residential, isp, datacenter.
quantityRequiredDays for unlimited (1~365), GB for residential (5~5,000), IP count for isp (1~1,000) or datacenter (5~5,000).
concurrencyOptionalUnlimited only. One of 200, 500, 1000, 2000.
bandwidthOptionalUnlimited only, in Mbps. One of 100, 200, 500, 1000.
monthsOptionalisp and datacenter only. One of 1, 3, 6, 12.
countryOptionalisp and datacenter only. A two-letter country code such as jp. See /countries for valid values.
Request
curl -X POST https://starproxy.shop/api/v1/quote \
  -H "Content-Type: application/json" \
  -d '{"product":"unlimited","quantity":30,"concurrency":1000,"bandwidth":200}'
Response
{
  "product": "unlimited",
  "quantity": 30,
  "unit_price_usd": 8.41,
  "unit": "day",
  "total_usd": 252.3
}

Create an order

POST/api/v1/ordersAPI key required

Takes the total from your balance and creates the order. Status starts as pending (activating) and changes to active when the order is ready. If it can't be activated, it becomes refunded and the full amount returns to your balance. A low balance returns 402.

FieldMeaning
productRequiredOne of unlimited, residential, isp, datacenter.
quantityRequiredDays for unlimited (1~365), GB for residential (5~5,000), IP count for isp (1~1,000) or datacenter (5~5,000).
concurrencyOptionalUnlimited only. One of 200, 500, 1000, 2000.
bandwidthOptionalUnlimited only, in Mbps. One of 100, 200, 500, 1000.
monthsOptionalisp and datacenter only. One of 1, 3, 6, 12.
countryOptionalisp and datacenter only. A two-letter country code such as jp. See /countries for valid values.
Request
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}'
Response
{
  "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
}

List orders

GET/api/v1/ordersAPI key required

Returns up to 100 orders, newest first.

FieldMeaning
statusOptionalOne of pending, active, refunded. Leave it empty for every status.
Request
curl "https://starproxy.shop/api/v1/orders?status=pending" \
  -H "Authorization: Bearer spk_your_api_key"
Response
{
  "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 an order

GET/api/v1/orders/{id}API key required

Returns one order by id. Use it to see whether activation is done.

FieldMeaning
idRequiredThe order id, for example SP-7KQ2M-X4HTD.
Request
curl https://starproxy.shop/api/v1/orders/SP-7KQ2M-X4HTD \
  -H "Authorization: Bearer spk_your_api_key"
Response
{
  "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"
  }
}

Generate a proxy username

GET/api/v1/proxy-userAPI key required

Returns a proxy username with your options built in, plus ready-to-paste HTTP and SOCKS5 URLs. Without session, each request gets a new IP.

FieldMeaning
productOptionalOne of unlimited, residential, isp, datacenter. Defaults to unlimited.
countryOptionalA two-letter country code such as jp.
cityOptionalA city value from /countries, such as tokyo. Requires country.
sessionOptional1~32 letters or digits. Requests with the same session share one IP.
ttlOptionalMinutes to keep the session IP, 1~60. Defaults to 30.
Request
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"
Response
{
  "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"
}

Full example

One script that gets a quote, orders from your balance and connects through a Japanese IP.

Python (requests)
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())
Node.js 18+
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 orders are processed the same way as dashboard orders and appear on the History tab. Replace spk_your_api_key in the examples with your own key.

Use StarProxy straight from your code

Sign up with a username, create an API key in the dashboard and start calling the API.