1. phantom
  2. API

Phantom Proxy API

A REST API to buy and manage proxies from your code: catalog and prices, purchases and renewals, rotating connections. Responses are JSON, the key goes in the X-API-Key header.

Get an API key api.md

Works with Claude, ChatGPT, Cursor, Copilot and other agents: copy the prompt and the agent gets the whole reference.

The API key is created in the dashboard, “API” section. It is shown once — save it.

Introduction

The Phantom Proxy API does what the dashboard does: balance, catalog and prices, buying and renewing proxies, rotating connections. All requests go to one base URL, responses are JSON.

Prices in responses are final, in US dollars — exactly what will be charged. The balance is topped up in the dashboard; the API spends the same balance.

base url https://phantom-proxy.top/api/v1

Authorization

Sign every request with your key in the X-API-Key header. The key is created in the dashboard, “API” section. It is shown once — save it.

If the key leaks, reissue it in the dashboard: the old one stops working at once.

X-API-Key: ph_…

Retries and statuses

Purchases and renewals charge your balance at once. Send an Idempotency-Key header — your own string up to 200 characters, new for every purchase. If the connection drops, repeat the request with the same key: you get the order already placed, with no second charge. If a purchase did not go through (for example, not enough money), the key can be used again. Renewals require the key.

Order status: pending — being sent to the supplier; paid and provisioning — addresses are being issued; active — working; expired — the term is over; failed — could not be issued, the money is back on your balance. If the status is not active right after buying, poll the order every few seconds.

Rotating traffic never expires and is not renewed: you buy more gigabytes, and each pool has one connection — returned by the “Connection” method.

Limits

Up to 10 requests per second per key, short bursts up to 20. Above that — 429 with a Retry-After header: seconds to wait.

Purchases: isp and ipv4 — 1–1000 addresses, ipv6 — 10–1000, shared IPv4 — 1–1000 and no more than the country has in stock, traffic — 1–2000 GB. Shared IPv4 terms — 7, 14, 30, 60 and 90 days.

Errors

Errors come with an HTTP status and a { error, message } body: error is a stable code for your program, message is human-readable text.

unauthorized (401) — no X-API-Key header; invalid_api_key (401) — key not found or reissued; rate_limited (429); bad_request, bad_type, bad_qty, bad_country, bad_period, bad_protocol (400) — invalid parameters; bad_idempotency_key (400); insufficient_funds (402) — not enough money on the balance; not_found (404); no_traffic (404) — no traffic bought for this pool yet; not_renewable (409) — only active static orders can be renewed; renewal_in_progress (409); supplier_unavailable (503) — the supplier did not answer, nothing was charged.

Account

GET/me

Key owner

Your account: ID, name, Telegram or email and balance.

request
curl "https://phantom-proxy.top/api/v1/me" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "id": 12,
  "name": "Ivan",
  "username": "ivan_tg",
  "email": null,
  "balance": 42.5
}

errors: 401 invalid_api_key · 429 rate_limited

GET/balance

Balance

Current balance in US dollars.

request
curl "https://phantom-proxy.top/api/v1/balance" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "balance": 42.5,
  "currency": "USD"
}

errors: 401 invalid_api_key · 429 rate_limited

GET/balance/history

Balance history

Transactions, newest first: topup, purchase, renewal, refund, correction. Debits are negative, ref is the order ID.

parameterindescription
limitinteger · ≤200queryHow many entries, 50 by default.
offsetintegerqueryHow many to skip.
request
curl "https://phantom-proxy.top/api/v1/balance/history" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "entries": [
    {
      "id": 119,
      "kind": "purchase",
      "amount": -29.4,
      "ref": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
      "createdAt": "2026-11-29T12:00:00.000Z"
    }
  ],
  "total": 37,
  "limit": 50,
  "offset": 0
}

errors: 401 invalid_api_key · 429 rate_limited

Catalog and prices

GET/catalog/{type}

Static catalog

Countries and terms for static proxies. Country codes from here go into a purchase.

parameterindescription
typeipv4 · isp · ipv6requiredpathipv4 — datacenter, isp — static residential, ipv6.
request
curl "https://phantom-proxy.top/api/v1/catalog/ipv4" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "type": "ipv4",
  "countries": [
    {
      "code": "DE",
      "name": "Germany"
    },
    {
      "code": "US",
      "name": "United States"
    }
  ],
  "periods": [
    "7d",
    "14d",
    "30d",
    "90d",
    "180d",
    "360d"
  ]
}

errors: 401 invalid_api_key · 429 rate_limited

GET/catalog/{type}/quote

Static price

The final price of an order — exactly what a purchase will charge.

parameterindescription
typeipv4 · isp · ipv6requiredpathipv4 — datacenter, isp — static residential, ipv6.
countrystring · ISO2requiredqueryCountry code from the catalog, e.g. DE. Some are longer: GB-ENG — England.
quantityintegerrequiredqueryNumber of addresses: isp and ipv4 — 1–1000, ipv6 — 10–1000.
periodIdstringrequiredqueryTerm: isp and ipv4 — 7d, 14d, 30d, 90d, 180d, 360d; ipv6 — 7d, 30d, 60d, 90d, 180d, 360d.
request
curl "https://phantom-proxy.top/api/v1/catalog/ipv4/quote?country=DE&quantity=10&periodId=30d" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "type": "ipv4",
  "country": "DE",
  "quantity": 10,
  "periodId": "30d",
  "perProxy": 2.94,
  "total": 29.4
}

errors: 401 invalid_api_key · 429 rate_limited · 400 bad_period

GET/shared/stock

Shared IPv4 stock

How many shared IPv4 addresses are available per country.

request
curl "https://phantom-proxy.top/api/v1/shared/stock" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "countries": [
    {
      "code": "US",
      "count": 1822
    },
    {
      "code": "NL",
      "count": 163
    }
  ]
}

errors: 401 invalid_api_key · 429 rate_limited

GET/shared/quote

Shared IPv4 price

The final price of shared IPv4 for a quantity and term.

parameterindescription
quantityinteger · 1–1000requiredqueryNumber of addresses.
periodDaysintegerrequiredqueryTerm in days: 7, 14, 30, 60 or 90.
request
curl "https://phantom-proxy.top/api/v1/shared/quote?quantity=10&periodDays=30" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "quantity": 10,
  "periodDays": 30,
  "perProxy": 0.83,
  "total": 8.25
}

errors: 401 invalid_api_key · 429 rate_limited

GET/pool/{pool}/stock

Pool stock

How many addresses are available per country in a rotating pool.

parameterindescription
pooldatacenter · residential · mobilerequiredpathRotating pool.
request
curl "https://phantom-proxy.top/api/v1/pool/residential/stock" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "pool": "residential",
  "countries": [
    {
      "code": "US",
      "count": 54481
    },
    {
      "code": "DE",
      "count": 2962
    }
  ]
}

errors: 401 invalid_api_key · 429 rate_limited

GET/pool/{pool}/quote

Traffic price

The price of gigabytes with the volume discount.

parameterindescription
pooldatacenter · residential · mobilerequiredpathRotating pool.
gigabytesinteger · 1–2000requiredqueryHow many gigabytes. The price per GB drops with volume.
request
curl "https://phantom-proxy.top/api/v1/pool/residential/quote?gigabytes=50" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "pool": "residential",
  "gigabytes": 50,
  "perGB": 1.95,
  "total": 97.5
}

errors: 401 invalid_api_key · 429 rate_limited

GET/pool/{pool}/locations/{kind}

Geo directory

Regions, cities and ISPs of a pool — codes for targeting connection lines.

parameterindescription
pooldatacenter · residential · mobilerequiredpathRotating pool.
kindstates · cities · asnsrequiredpathWhich directory.
countrystring · ISO2requiredqueryCountry code from the catalog, e.g. DE. Some are longer: GB-ENG — England.
request
curl "https://phantom-proxy.top/api/v1/pool/residential/locations/cities?country=DE" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "locations": [
    {
      "code": "berlin",
      "name": "Berlin",
      "count": 8420
    }
  ]
}

errors: 401 invalid_api_key · 429 rate_limited

Purchases and orders

POST/catalog/{type}/orders

Buy static proxies

Buys static proxies, paid from the balance. Addresses come in proxies; if the status is not active yet, fetch the order later.

parameterindescription
Idempotency-Keystring · ≤200headerYour purchase key, new for every purchase. A repeat with the same key returns the order already placed and never charges twice.
typeipv4 · isp · ipv6requiredpathipv4 — datacenter, isp — static residential, ipv6.
countrystring · ISO2requiredbodyCountry code from the catalog, e.g. DE. Some are longer: GB-ENG — England.
quantityintegerrequiredbodyNumber of addresses: isp and ipv4 — 1–1000, ipv6 — 10–1000.
periodIdstringrequiredbodyTerm: isp and ipv4 — 7d, 14d, 30d, 90d, 180d, 360d; ipv6 — 7d, 30d, 60d, 90d, 180d, 360d.
protocolhttp · socks5bodyProtocol. For ipv6 it is chosen at purchase and cannot be changed later.
request
curl -X POST "https://phantom-proxy.top/api/v1/catalog/ipv4/orders" \
  -H "X-API-Key: $PHANTOM_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"DE","quantity":10,"periodId":"30d"}'
response 200
{
  "order": {
    "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
    "number": "sd-0000500",
    "type": "ipv4",
    "country": "DE",
    "quantity": 10,
    "period": "30d",
    "protocol": "http",
    "price": 29.4,
    "status": "active",
    "autoRenew": false,
    "createdAt": "2026-11-29T12:00:00.000Z",
    "expiresAt": "2026-12-29T12:00:00.000Z",
    "proxies": [
      {
        "host": "185.22.14.7",
        "port": 8000,
        "username": "u_8f2c1a",
        "password": "p4ss_w0rd",
        "protocol": "http",
        "country": "DE"
      }
    ]
  }
}

errors: 401 invalid_api_key · 429 rate_limited · 400 bad_qty · 402 insufficient_funds · 503 supplier_unavailable

POST/shared/orders

Buy shared IPv4

Buys shared IPv4 for a term, paid from the balance.

parameterindescription
Idempotency-Keystring · ≤200headerYour purchase key, new for every purchase. A repeat with the same key returns the order already placed and never charges twice.
countrystring · ISO2requiredbodyCountry code from the catalog, e.g. DE. Some are longer: GB-ENG — England.
quantityinteger · 1–1000requiredbodyQuantity — no more than the country has in stock.
periodDaysintegerrequiredbodyTerm in days: 7, 14, 30, 60 or 90.
request
curl -X POST "https://phantom-proxy.top/api/v1/shared/orders" \
  -H "X-API-Key: $PHANTOM_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"country":"US","quantity":10,"periodDays":30}'
response 200
{
  "order": {
    "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
    "number": "ssh-0000502",
    "type": "shared",
    "country": "US",
    "quantity": 10,
    "period": "30d",
    "protocol": "http",
    "price": 8.25,
    "status": "active",
    "autoRenew": false,
    "createdAt": "2026-11-29T12:00:00.000Z",
    "expiresAt": "2026-12-29T12:00:00.000Z",
    "proxies": []
  }
}

errors: 401 invalid_api_key · 429 rate_limited · 400 bad_qty · 402 insufficient_funds · 503 supplier_unavailable

POST/pool/{pool}/orders

Buy traffic

Gigabytes of a rotating pool. Traffic never expires and adds up; the login and ports are in the “Connection” method.

parameterindescription
Idempotency-Keystring · ≤200headerYour purchase key, new for every purchase. A repeat with the same key returns the order already placed and never charges twice.
pooldatacenter · residential · mobilerequiredpathRotating pool.
gigabytesinteger · 1–2000requiredbodyHow many gigabytes. The price per GB drops with volume.
request
curl -X POST "https://phantom-proxy.top/api/v1/pool/residential/orders" \
  -H "X-API-Key: $PHANTOM_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"gigabytes":50}'
response 200
{
  "order": {
    "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
    "number": "rr-0000541",
    "type": "residential",
    "country": null,
    "quantity": 50,
    "period": null,
    "protocol": null,
    "price": 97.5,
    "status": "active",
    "autoRenew": false,
    "createdAt": "2026-11-29T12:00:00.000Z",
    "expiresAt": null,
    "proxies": []
  }
}

errors: 401 invalid_api_key · 429 rate_limited · 400 bad_qty · 402 insufficient_funds · 503 supplier_unavailable

GET/orders

List orders

Orders, newest first, without addresses — use “Get order” for them.

parameterindescription
limitinteger · ≤200queryHow many orders, 50 by default.
request
curl "https://phantom-proxy.top/api/v1/orders" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "orders": [
    {
      "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
      "number": "sd-0000500",
      "type": "ipv4",
      "country": "DE",
      "quantity": 10,
      "period": "30d",
      "protocol": "http",
      "price": 29.4,
      "status": "active",
      "autoRenew": false,
      "createdAt": "2026-11-29T12:00:00.000Z",
      "expiresAt": "2026-12-29T12:00:00.000Z"
    }
  ]
}

errors: 401 invalid_api_key · 429 rate_limited

GET/orders/{id}

Get order

An order with its proxies: host, port, username, password and protocol.

parameterindescription
idstring · uuidrequiredpathOrder ID from the purchase response or the order list.
request
curl "https://phantom-proxy.top/api/v1/orders/9c8ec245-5a79-4ee5-b1bd-21549f879f19" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "order": {
    "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
    "number": "sd-0000500",
    "type": "ipv4",
    "country": "DE",
    "quantity": 10,
    "period": "30d",
    "protocol": "http",
    "price": 29.4,
    "status": "active",
    "autoRenew": false,
    "createdAt": "2026-11-29T12:00:00.000Z",
    "expiresAt": "2026-12-29T12:00:00.000Z",
    "proxies": [
      {
        "host": "185.22.14.7",
        "port": 8000,
        "username": "u_8f2c1a",
        "password": "p4ss_w0rd",
        "protocol": "http",
        "country": "DE"
      }
    ]
  }
}

errors: 401 invalid_api_key · 429 rate_limited · 404 not_found

POST/orders/{id}/renew

Renew order

Renews active static proxies and shared IPv4 at the current price of the same volume — same addresses and credentials. Rotating traffic is not renewed.

parameterindescription
Idempotency-Keystring · ≤200requiredheaderRequired: a new key for every renewal.
idstring · uuidrequiredpathOrder ID from the purchase response or the order list.
periodDaysintegerrequiredbodyDays to add — the same terms as for a purchase.
request
curl -X POST "https://phantom-proxy.top/api/v1/orders/9c8ec245-5a79-4ee5-b1bd-21549f879f19/renew" \
  -H "X-API-Key: $PHANTOM_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"periodDays":30}'
response 200
{
  "renewal": {
    "id": "3b06fa59-3a08-4252-a4c2-42e15d024786",
    "status": "done",
    "periodDays": 30,
    "price": 29.4
  },
  "order": {
    "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
    "number": "sd-0000500",
    "type": "ipv4",
    "country": "DE",
    "quantity": 10,
    "period": "30d",
    "protocol": "http",
    "price": 29.4,
    "status": "active",
    "autoRenew": false,
    "createdAt": "2026-11-29T12:00:00.000Z",
    "expiresAt": "2027-01-28T12:00:00.000Z"
  }
}

errors: 401 invalid_api_key · 429 rate_limited · 400 bad_idempotency_key · 402 insufficient_funds · 409 not_renewable

POST/orders/{id}/auto-renew

Auto-renewal

A day before expiry the order is renewed for the same term from the balance. If the balance is short, you get a Telegram notification.

parameterindescription
idstring · uuidrequiredpathOrder ID from the purchase response or the order list.
enabledbooleanrequiredbodyOn or off.
request
curl -X POST "https://phantom-proxy.top/api/v1/orders/9c8ec245-5a79-4ee5-b1bd-21549f879f19/auto-renew" \
  -H "X-API-Key: $PHANTOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true}'
response 200
{
  "order": {
    "id": "9c8ec245-5a79-4ee5-b1bd-21549f879f19",
    "number": "sd-0000500",
    "type": "ipv4",
    "country": "DE",
    "quantity": 10,
    "period": "30d",
    "protocol": "http",
    "price": 29.4,
    "status": "active",
    "autoRenew": true,
    "createdAt": "2026-11-29T12:00:00.000Z",
    "expiresAt": "2026-12-29T12:00:00.000Z"
  }
}

errors: 401 invalid_api_key · 429 rate_limited · 404 not_found

Rotating connections

GET/pool/{pool}/connection

Connection

Host, HTTP and SOCKS5 ports, username, password and the traffic left in the pool. The connection appears after the first traffic purchase.

parameterindescription
pooldatacenter · residential · mobilerequiredpathRotating pool.
request
curl "https://phantom-proxy.top/api/v1/pool/residential/connection" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "pool": "residential",
  "host": "gw.phantom-proxy.top",
  "portHttp": 823,
  "portSocks": 824,
  "login": "d0126ccd14094188506d",
  "password": "a1b2c3d4e5f6",
  "trafficLeftBytes": 53687091200,
  "trafficUsedBytes": 0
}

errors: 401 invalid_api_key · 429 rate_limited · 404 no_traffic

GET/pool/{pool}/lines

Connection lines

Ready-made sticky-session lines: the country and rotation are in the login, each line has its own port.

parameterindescription
pooldatacenter · residential · mobilerequiredpathRotating pool.
countinteger · 1–1000queryHow many lines, 10 by default.
countrystring · ISO2queryExit country, ISO2. Without it — any country of the pool.
rotationinteger · 0–120queryNew IP every N minutes; 0 — a new IP per request.
formatstring · ≤120queryLine template with the words host, port, user, pass, e.g. http://user:pass@host:port.
request
curl "https://phantom-proxy.top/api/v1/pool/residential/lines" \
  -H "X-API-Key: $PHANTOM_KEY"
response 200
{
  "lines": [
    "d0126ccd14094188506d__cr.de__sessttl.10:a1b2c3d4e5f6@gw.phantom-proxy.top:10000"
  ]
}

errors: 401 invalid_api_key · 429 rate_limited · 404 no_traffic