# Phantom Proxy API Base URL: `https://phantom-proxy.top/api/v1` · responses are JSON. Send the key in the `X-API-Key` header. The key is issued in the dashboard. ## 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. ## 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. ## 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 ### Key owner `GET /me` Your account: ID, name, Telegram or email and balance. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/me" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "id": 12, "name": "Ivan", "username": "ivan_tg", "email": null, "balance": 42.5 } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ### Balance `GET /balance` Current balance in US dollars. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/balance" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "balance": 42.5, "currency": "USD" } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ### Balance history `GET /balance/history` Transactions, newest first: topup, purchase, renewal, refund, correction. Debits are negative, ref is the order ID. **Parameters:** - `limit` — integer · ≤200 · query: How many entries, 50 by default. - `offset` — integer · query: How many to skip. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/balance/history" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "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 ### Static catalog `GET /catalog/{type}` Countries and terms for static proxies. Country codes from here go into a purchase. **Parameters:** - `type` — ipv4 · isp · ipv6 · path **(required)**: ipv4 — datacenter, isp — static residential, ipv6. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/catalog/ipv4" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "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 ### Static price `GET /catalog/{type}/quote` The final price of an order — exactly what a purchase will charge. **Parameters:** - `type` — ipv4 · isp · ipv6 · path **(required)**: ipv4 — datacenter, isp — static residential, ipv6. - `country` — string · ISO2 · query **(required)**: Country code from the catalog, e.g. DE. Some are longer: GB-ENG — England. - `quantity` — integer · query **(required)**: Number of addresses: isp and ipv4 — 1–1000, ipv6 — 10–1000. - `periodId` — string · query **(required)**: Term: isp and ipv4 — 7d, 14d, 30d, 90d, 180d, 360d; ipv6 — 7d, 30d, 60d, 90d, 180d, 360d. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/catalog/ipv4/quote?country=DE&quantity=10&periodId=30d" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "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 ### Shared IPv4 stock `GET /shared/stock` How many shared IPv4 addresses are available per country. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/shared/stock" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "countries": [ { "code": "US", "count": 1822 }, { "code": "NL", "count": 163 } ] } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ### Shared IPv4 price `GET /shared/quote` The final price of shared IPv4 for a quantity and term. **Parameters:** - `quantity` — integer · 1–1000 · query **(required)**: Number of addresses. - `periodDays` — integer · query **(required)**: Term in days: 7, 14, 30, 60 or 90. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/shared/quote?quantity=10&periodDays=30" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "quantity": 10, "periodDays": 30, "perProxy": 0.83, "total": 8.25 } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ### Pool stock `GET /pool/{pool}/stock` How many addresses are available per country in a rotating pool. **Parameters:** - `pool` — datacenter · residential · mobile · path **(required)**: Rotating pool. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/pool/residential/stock" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "pool": "residential", "countries": [ { "code": "US", "count": 54481 }, { "code": "DE", "count": 2962 } ] } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ### Traffic price `GET /pool/{pool}/quote` The price of gigabytes with the volume discount. **Parameters:** - `pool` — datacenter · residential · mobile · path **(required)**: Rotating pool. - `gigabytes` — integer · 1–2000 · query **(required)**: How many gigabytes. The price per GB drops with volume. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/pool/residential/quote?gigabytes=50" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "pool": "residential", "gigabytes": 50, "perGB": 1.95, "total": 97.5 } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ### Geo directory `GET /pool/{pool}/locations/{kind}` Regions, cities and ISPs of a pool — codes for targeting connection lines. **Parameters:** - `pool` — datacenter · residential · mobile · path **(required)**: Rotating pool. - `kind` — states · cities · asns · path **(required)**: Which directory. - `country` — string · ISO2 · query **(required)**: Country code from the catalog, e.g. DE. Some are longer: GB-ENG — England. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/pool/residential/locations/cities?country=DE" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "locations": [ { "code": "berlin", "name": "Berlin", "count": 8420 } ] } ``` **Errors:** 401 invalid_api_key, 429 rate_limited ## Purchases and orders ### Buy static proxies `POST /catalog/{type}/orders` Buys static proxies, paid from the balance. Addresses come in proxies; if the status is not active yet, fetch the order later. **Parameters:** - `Idempotency-Key` — string · ≤200 · header: Your purchase key, new for every purchase. A repeat with the same key returns the order already placed and never charges twice. - `type` — ipv4 · isp · ipv6 · path **(required)**: ipv4 — datacenter, isp — static residential, ipv6. - `country` — string · ISO2 · body **(required)**: Country code from the catalog, e.g. DE. Some are longer: GB-ENG — England. - `quantity` — integer · body **(required)**: Number of addresses: isp and ipv4 — 1–1000, ipv6 — 10–1000. - `periodId` — string · body **(required)**: Term: isp and ipv4 — 7d, 14d, 30d, 90d, 180d, 360d; ipv6 — 7d, 30d, 60d, 90d, 180d, 360d. - `protocol` — http · socks5 · body: Protocol. For ipv6 it is chosen at purchase and cannot be changed later. **Request body example:** ```json { "country": "DE", "quantity": 10, "periodId": "30d" } ``` **Request example:** ```sh 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:** ```json { "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 ### Buy shared IPv4 `POST /shared/orders` Buys shared IPv4 for a term, paid from the balance. **Parameters:** - `Idempotency-Key` — string · ≤200 · header: Your purchase key, new for every purchase. A repeat with the same key returns the order already placed and never charges twice. - `country` — string · ISO2 · body **(required)**: Country code from the catalog, e.g. DE. Some are longer: GB-ENG — England. - `quantity` — integer · 1–1000 · body **(required)**: Quantity — no more than the country has in stock. - `periodDays` — integer · body **(required)**: Term in days: 7, 14, 30, 60 or 90. **Request body example:** ```json { "country": "US", "quantity": 10, "periodDays": 30 } ``` **Request example:** ```sh 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:** ```json { "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 ### Buy traffic `POST /pool/{pool}/orders` Gigabytes of a rotating pool. Traffic never expires and adds up; the login and ports are in the “Connection” method. **Parameters:** - `Idempotency-Key` — string · ≤200 · header: Your purchase key, new for every purchase. A repeat with the same key returns the order already placed and never charges twice. - `pool` — datacenter · residential · mobile · path **(required)**: Rotating pool. - `gigabytes` — integer · 1–2000 · body **(required)**: How many gigabytes. The price per GB drops with volume. **Request body example:** ```json { "gigabytes": 50 } ``` **Request example:** ```sh 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:** ```json { "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 ### List orders `GET /orders` Orders, newest first, without addresses — use “Get order” for them. **Parameters:** - `limit` — integer · ≤200 · query: How many orders, 50 by default. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/orders" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "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 order `GET /orders/{id}` An order with its proxies: host, port, username, password and protocol. **Parameters:** - `id` — string · uuid · path **(required)**: Order ID from the purchase response or the order list. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/orders/9c8ec245-5a79-4ee5-b1bd-21549f879f19" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "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 ### Renew order `POST /orders/{id}/renew` Renews active static proxies and shared IPv4 at the current price of the same volume — same addresses and credentials. Rotating traffic is not renewed. **Parameters:** - `Idempotency-Key` — string · ≤200 · header **(required)**: Required: a new key for every renewal. - `id` — string · uuid · path **(required)**: Order ID from the purchase response or the order list. - `periodDays` — integer · body **(required)**: Days to add — the same terms as for a purchase. **Request body example:** ```json { "periodDays": 30 } ``` **Request example:** ```sh 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:** ```json { "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 ### Auto-renewal `POST /orders/{id}/auto-renew` 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. **Parameters:** - `id` — string · uuid · path **(required)**: Order ID from the purchase response or the order list. - `enabled` — boolean · body **(required)**: On or off. **Request body example:** ```json { "enabled": true } ``` **Request example:** ```sh 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:** ```json { "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 ### Connection `GET /pool/{pool}/connection` Host, HTTP and SOCKS5 ports, username, password and the traffic left in the pool. The connection appears after the first traffic purchase. **Parameters:** - `pool` — datacenter · residential · mobile · path **(required)**: Rotating pool. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/pool/residential/connection" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "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 ### Connection lines `GET /pool/{pool}/lines` Ready-made sticky-session lines: the country and rotation are in the login, each line has its own port. **Parameters:** - `pool` — datacenter · residential · mobile · path **(required)**: Rotating pool. - `count` — integer · 1–1000 · query: How many lines, 10 by default. - `country` — string · ISO2 · query: Exit country, ISO2. Without it — any country of the pool. - `rotation` — integer · 0–120 · query: New IP every N minutes; 0 — a new IP per request. - `format` — string · ≤120 · query: Line template with the words host, port, user, pass, e.g. http://user:pass@host:port. **Request example:** ```sh curl "https://phantom-proxy.top/api/v1/pool/residential/lines" \ -H "X-API-Key: $PHANTOM_KEY" ``` **Response 200:** ```json { "lines": [ "d0126ccd14094188506d__cr.de__sessttl.10:a1b2c3d4e5f6@gw.phantom-proxy.top:10000" ] } ``` **Errors:** 401 invalid_api_key, 429 rate_limited, 404 no_traffic