# HProxy Overview > Accounts, authentication, the prepaid wallet and billing rules for the HProxy REST API. Source: https://hproxy.com/docs ## HProxy Documentation *Everything HProxy does, by REST: buy and manage proxies, run 116 scraper endpoints across 23 platforms, and three free no-key APIs. JSON in, JSON out.* URL: https://hproxy.com/docs Everything HProxy does, by REST. **Buy and manage proxies** from a prepaid wallet, run the **Scraper API** (116 endpoints across 23 platforms returning clean, structured JSON), or use the **free APIs**: a live proxy list and a proxy checker, no key required. All authenticated endpoints are relative to the base URL `https://hproxy.com/api/v1` and return `application/json`. Money is always integer cents (`120` = $1.20), never floats. **Your first call** ```bash curl https://hproxy.com/api/v1/me -H "X-API-Key: hpx_your_key_here" ``` ### Start here - [Quickstart](https://hproxy.com/docs/quickstart): Key, first call, first result, in three steps. - [Authentication](https://hproxy.com/docs/authentication): API keys, scopes and the spend cap. - [Proxy API](https://hproxy.com/docs/proxy-api): Buy, deliver, renew: the whole loop from code. - [Reselling guide](https://hproxy.com/docs/proxy-api/reselling): Run a proxy storefront on our API. - [Scraper API](https://hproxy.com/docs/scrapers): Any supported page into structured JSON. - [Scraper catalog](https://hproxy.com/docs/scrapers/catalog): All 116 endpoints, searchable. - [Free proxy list API](https://hproxy.com/docs/free-proxy-list): The whole live pool in one call, no key. ## Quickstart *Three steps to your first HProxy API call: create a key, verify it, then run a scraper or price a proxy plan.* URL: https://hproxy.com/docs/quickstart Three steps from zero to a working call. 1. **Create a key**: In your [dashboard](https://hproxy.com/dashboard) under **Settings → API keys**. The full key (prefixed `hpx_`) is shown once at creation, so store it somewhere safe. 2. **Verify it**: `GET /me` accepts any valid key and echoes the account it acts for, the fastest way to confirm everything is wired up. 3. **Make your first real call**: Run a scraper, or price a proxy product before buying it. Both examples below work as-is once you paste your key. ### Verify your key **GET /me** ```bash curl https://hproxy.com/api/v1/me -H "X-API-Key: hpx_your_key_here" ``` **Response** ```json { "userId": "usr_1a2b3c", "email": "you@example.com", "scopes": ["buy", "scrape"], "dailySpendCapCents": null } ``` ### Your first real call **Run a scraper** ```bash curl "https://hproxy.com/api/v1/scrape/threads/search?query=coffee" \ -H "X-API-Key: hpx_your_key_here" ``` **Price a proxy plan** ```bash curl "https://hproxy.com/api/v1/products/residential-lite/price?quantity=5" \ -H "X-API-Key: hpx_your_key_here" ``` > [!NOTE] Scraper calls are billed **per successful call** at the exact listed price, every standard endpoint is $0.00149 per call ($1.49 per 1,000), with no per-call minimum. Errors, timeouts and rate limits are never charged; a lookup whose target does not exist counts as a call, because the platform was queried. - [Authentication](https://hproxy.com/docs/authentication): How keys, scopes and the spend cap work. - [Proxy API](https://hproxy.com/docs/proxy-api): Products, quotes, orders and plans. - [Scraper API](https://hproxy.com/docs/scrapers): Endpoints, billing and the envelope. ## Authentication *Create an API key in the dashboard and send it as X-API-Key or Authorization: Bearer. Keys carry buy and scrape scopes plus an optional daily spend cap.* URL: https://hproxy.com/docs/authentication Create an API key in your dashboard under **Settings → API keys**. The full key (prefixed `hpx_`) is shown once at creation, so store it somewhere safe. Send it on every request in the `X-API-Key` header, or as a `Bearer` token, both are accepted, same as Stripe or OpenAI. **Both headers work** ```bash curl https://hproxy.com/api/v1/wallet \ -H "X-API-Key: hpx_your_key_here" # Authorization: Bearer also works curl https://hproxy.com/api/v1/wallet \ -H "Authorization: Bearer hpx_your_key_here" ``` ### Scopes Each key carries **scopes** that gate what it can do. A key missing the required scope gets a `403` with code `missing_scope`. | Field | Type | Description | | --- | --- | --- | | `buy` | `scope` | Create orders and deposits; read wallet, plans, orders and your proxies; generate lines; manage webhooks. | | `scrape` | `scope` | Run the data scrapers. Independent of buy, so a scrape key can't place orders. | ### Daily spend cap Each key can carry an optional **daily spend cap**. If a key's orders in the last 24h would exceed the cap, the next order is refused with `402` before any charge, so a leaked key can't drain your balance. > [!WARNING] **Keep your keys secret**: Keep keys server-side. Never ship them in client code. Lost a key? Revoke it and create a new one in **Settings → API keys**. ## Rate limits & idempotency *Per-key and per-IP rate limits with Retry-After, plus idempotent writes: Idempotency-Key for orders and deposits, X-Request-Id for scraper calls.* URL: https://hproxy.com/docs/rate-limits Requests are rate limited per key and per IP; exceed it and you get a `429` with a `Retry-After` header. Back off and retry. Scraper calls allow bursts of 100 with a sustained 20 requests per second per account. ### Idempotency For any write (`POST /orders`, `POST /deposits`) send an `Idempotency-Key` header with any unique string you choose. A retry with the same key converges on the same order instead of creating a second one, so a dropped connection never double-charges. **Idempotent order** ```bash curl -X POST https://hproxy.com/api/v1/orders \ -H "X-API-Key: hpx_your_key_here" \ -H "Idempotency-Key: your-unique-id-123" \ -H "Content-Type: application/json" \ -d '{"product_id":"residential-lite","quantity":5}' ``` Scraper calls have the same protection under their own `X-Request-Id` header: a retry with the same value replays the original result and is never billed twice. See [Run a scraper](https://hproxy.com/docs/scrapers/run). ## Errors *Errors return a non-2xx status and a JSON body with a human-readable error message plus a machine-readable code where useful.* URL: https://hproxy.com/docs/errors Errors return a non-2xx status and a JSON body with a human-readable `error` message, a machine-readable `code`, and the `requestId` of the call (the same value as the `X-Request-Id` response header). Scraper input errors add a `details` string naming the bad field. Branch on `code`, not on the message text: messages get reworded, codes do not. When you write to support about a failed call, include the `requestId` and we can find that exact request. | Status | Meaning | | --- | --- | | `400` | Invalid product, quantity, targeting or scraper input, or a request body the endpoint does not understand (`unknown_field`, `invalid_body`). | | `401` | Missing or invalid API key. | | `402` | Wallet balance short, or per-key daily spend cap reached. | | `403` | Key is missing the required scope, or the platform refused access to the target. | | `404` | Unknown scraper, or the target does not exist (private, deleted, wrong handle). | | `429` | Rate limited. Slow down and retry (Retry-After header). | | `502` | Transient failure fetching from the platform. Retry shortly. Never billed. | | `503` | The scraper is temporarily unavailable on our side. Retry shortly. Never billed. | ### Request body errors Every write body is checked against its documented fields **before anything runs**. A field the endpoint does not know is refused, naming the field and the accepted set, so a typo or a guessed option can never be dropped in silence and charged for. *code* | Field | Type | Description | | --- | --- | --- | | `unknown_field` | `400` | The body carries a top-level field the endpoint does not read. The message names it and lists the accepted fields, e.g. `Unknown field 'separate_plan'. This endpoint accepts: product_id, quantity, fulfillment_meta, method, expected_amount_cents.` Nothing was charged. The most common case is `country` sent at the top level of `POST /orders`: a residential order carries no country at all (you choose it per line when you [generate lines](https://hproxy.com/docs/proxy-api/plans#generate)), and a dedicated-IP order puts it inside `fulfillment_meta`. See [Create an order](https://hproxy.com/docs/proxy-api/orders#orders-create). | | `invalid_body` | `400` | The body is not valid JSON, or a field has the wrong type. The message includes the shape the endpoint expects. | **Unknown field** ```json { "error": "Unknown field 'separate_plan'. This endpoint accepts: product_id, quantity, fulfillment_meta, method, expected_amount_cents.", "code": "unknown_field", "requestId": "3f2b6d9c-7a1e-4c55-9d0e-2b8a5f6c1d47" } ``` ### Common codes Every error on `/api/v1` carries a `code`. These are the ones a client is most likely to branch on; endpoint-specific codes (`insufficient_balance`, `already_applied`, `reseller_forbidden`) are documented on their endpoints. *code* | Field | Type | Description | | --- | --- | --- | | `unauthorized` | `401` | No key, an unknown key, or a revoked one. Send `X-API-Key: hpx_…`. | | `account_blocked` | `403` | The acting account may not transact. Contact support. | | `invalid_quantity` | `400` | `quantity` is missing, zero, negative or not a whole number. Quantities are whole GB or whole IPs; a fraction is refused rather than rounded. | | `missing_product` | `400` | No `product_id` in the body. Ids come from `GET /products`. | | `unsupported_method` | `400` | A payment `method` we do not offer. Orders take `wallet` or any rail; deposits take any rail: card, crypto, alipay, wechat, upi, momo, qris, pix, dana, fpx, oxxo, boleto, paymaya, grabpay_ph. The refusal names the full list. | | `invalid_limit, invalid_offset` | `400` | A paging parameter that is not a usable number. A page size above the maximum is capped, not refused. | | `invalid_count, invalid_sticky` | `400` | Line generation: `count` must be a whole number from 1 to 5000 and at most the plan's `generate.maxCount`, `stickyMinutes` a whole number of minutes, 0 or more. | | `invalid_asn, invalid_os, invalid_strict, invalid_exclude, invalid_udp` | `400` | Line generation on Residential Premium: `asn` must be a whole AS number, `os` one of windows / android / ios / mac, `strict` and `udp` booleans, `excludeAsn` / `excludeCountries` / `excludeStates` / `excludeCities` lists of up to 20 entries. | | `not_found` | `404` | The order, plan or webhook does not exist, or does not belong to the acting account. The two cases are deliberately indistinguishable. | | `price_changed` | `409` | The order sent an `expected_amount_cents` that no longer matches the price. Nothing was charged; the body carries the current `amountCents`, `unitPriceCents` and `quantity`, so you can show the new total and ask your buyer again. | ### Gateway status codes A generated **Residential Premium** line answers with its own status codes when a request cannot be served. They come from the proxy gateway, not from `/api/v1`, so they carry no `code` field; this is what each one means and what to do. *Status* | Field | Type | Description | | --- | --- | --- | | `407` | `Proxy auth` | The username or password on the line is wrong, or the line was generated for another plan. Regenerate the line; a whitelisted IP connects without credentials. | | `403` | `Bad targeting` | A targeting token the gateway does not accept: a state and a city together, an ISP without a country, a misspelt place. Pick places and networks from the `/geo/*` lists. | | `464` | `Destination refused` | The target host, port or protocol is blocked by the network's usage policy. | | `465` | `No IP for the target` | Nothing free matches the targeting right now. Widen it (drop the city or ISP), or generate with `strict: false` to fall back within the country. | | `466` | `Plan traffic used up` | The plan's GB are spent. Top up the plan; lines keep working as soon as the balance lands. | | `467` | `Session traffic cap` | The session used up a traffic cap set for that one session. Lines generated here never set one; a username edited by hand with a `-limit-` token gets this once that cap is spent. Use a new session id. | | `568` | `Session error` | The network's own error on one sticky session. A session can keep answering 568 after it was released, so retrying the same line does not clear it. Change the session id in the username (or generate the line again) and the next request binds a fresh IP; releasing that session once more also clears it. | | `5xx` | `Gateway error` | Retry with backoff. Persisting errors are ours to chase: tell support the time and the line's port. | ### Scraper error codes A failed scrape names its cause in `code` so you can handle each one differently instead of retrying everything. **Nothing that fails on our side is billed** — errors, timeouts and rate limits all cost nothing. The one exception is a target that does not exist: the platform was queried and answered, so that call is billed like any other, and each code below says which it is. *code* | Field | Type | Description | | --- | --- | --- | | `target_not_found` | `404` | The profile, post or ID is not there. Private, deleted, or the handle is wrong. Retrying will not help; fix the input. **Billed**, because the platform was queried and gave us its answer. | | `target_restricted` | `403` | The platform refused it: age-gated, region-locked or login-only content. Retrying will not help. Not billed. | | `bad_input` | `400` | The endpoint rejected these parameters. Check the required parameters for that endpoint. Several accept **one of** a pair (a handle *or* a user id) and reject a call carrying neither. Not billed. | | `provider_failed` | `502` | A transient fetch failure. Safe and sensible to retry, ideally with a short backoff. Not billed. | | `upstream_credits_exhausted` | `503` | A capacity problem on our side, not a problem with your request. Retry shortly; if it persists, contact us. Not billed. | | `upstream_auth_rejected` | `503` | As above: ours to fix, not yours. Retry shortly and tell us if it continues. Not billed. | **Error response** ```json { "error": "No data found for this target. It may be private, deleted, or the handle/URL may be wrong.", "code": "target_not_found" } ``` > [!NOTE] **Changed recently**: Before 2026-07-30 every failed scrape answered `502` with the same generic message, so a mistyped handle looked identical to an outage. The statuses and codes above are what the API returns now. ## Account & wallet *GET /me verifies a key, GET /wallet reads your balance in integer cents, POST /deposits tops it up by card or crypto.* URL: https://hproxy.com/docs/account The shared plumbing every integration uses: verify a key, read the wallet that pays for both proxy orders and scraper calls, and top it up. Money is always integer cents. #### GET /api/v1/me **Who am I.** The fastest check that a key works. Accepts **any** valid key (no scope needed) and echoes the account it acts for plus the scopes the key carries. **cURL** ```bash curl https://hproxy.com/api/v1/me -H "X-API-Key: hpx_your_key_here" ``` **Response** ```json { "userId": "usr_1a2b3c", "email": "you@example.com", "scopes": ["buy", "scrape"], "dailySpendCapCents": null } ``` #### GET /api/v1/wallet **Get wallet.** Your current wallet balance, in integer cents. **Request** ```bash curl https://hproxy.com/api/v1/wallet -H "X-API-Key: hpx_your_key_here" ``` **Response** ```json { "balanceCents": 25765, "currency": "USD" } ``` #### POST /api/v1/deposits **Top up wallet.** Add funds to your wallet. Returns a hosted `payUrl` to complete the payment by card or crypto. Amount is in cents. | Field | Type | Required | Description | | --- | --- | --- | --- | | `amount_cents` | `integer` | required | Amount to add, in cents. Sub-minimum top-ups are bumped to the method floor. | | `method` | `string` | optional | "card" (default) or "crypto". | **Request** ```bash curl -X POST https://hproxy.com/api/v1/deposits \ -H "X-API-Key: hpx_your_key_here" \ -H "Idempotency-Key: deposit-2026-07-11-001" \ -H "Content-Type: application/json" \ -d '{"amount_cents":5000,"method":"crypto"}' ``` **Response** ```json { "depositId": "ord_...", "payUrl": "https://pay.example.com/checkout/...", "amountCents": 5000, "currency": "USD" } ``` ## Announcements and service notices *GET /announcements is the house feed for software: maintenance windows, incidents, pricing changes and action-required notices about the API. The same publish is pushed as a webhook and, when action is needed, emailed.* URL: https://hproxy.com/docs/announcements When something changes on our side, one record is written and every channel reads it: the bell in your dashboard, this endpoint, the `announcement.published` [webhook](https://hproxy.com/docs/proxy-api/webhooks), and for notices that need action, an email to every account holding an API key. You never have to watch a status page to learn that a field was renamed or a behavior corrected. #### GET /api/v1/announcements **List live notices.** Every published notice addressed to an audience your account belongs to, newest first, at most 50. Accepts **any** valid key (no scope needed). Poll it once an hour at most: it is not a queue, and nothing is lost by polling less. Branch on `kind`. | Field | Type | Description | | --- | --- | --- | | `kind` | `string` | `INFO`, `MAINTENANCE`, `INCIDENT`, `RELEASE`, `PRICING` or `ACTION_REQUIRED`. Treat `ACTION_REQUIRED` as a ticket: an integration has something to change, usually with a date in the body. | | `audience` | `string` | `ALL`, `CUSTOMERS`, `PARTNERS` or `DEVELOPERS`. Every account holding an API key is in `DEVELOPERS`, so notices about the API always reach you here. | | `publishedAt, expiresAt` | `RFC 3339` | The feed is ordered by `publishedAt`. An expired notice (a maintenance window that has passed) drops out on its own; `expiresAt` is `null` while a notice stands. | | `linkHref, linkLabel` | `string` | An optional deep link, relative to hproxy.com or absolute. `null` when there is nothing more to read. | | `unread` | `boolean` | Read state belongs to the account and is set from the dashboard, not from this endpoint. A key-only integration sees `true` until someone opens the notice there. | **Request** ```bash curl https://hproxy.com/api/v1/announcements -H "X-API-Key: hpx_your_key_here" ``` **Response** ```json { "announcements": [ { "id": "1f3c9a7e-…", "title": "Order bodies are now strict: unknown fields return 400", "body": "From 2026-09-03, POST /orders and every other write endpoint refuse a top-level field they do not read with 400 unknown_field. Check your client for fields outside the documented set.", "kind": "ACTION_REQUIRED", "audience": "DEVELOPERS", "publishedAt": "2026-09-03T18:40:12+00:00", "expiresAt": null, "linkHref": "/docs/errors", "linkLabel": "Errors", "unread": true } ] } ``` ### Get pushed instead Subscribe a [webhook](https://hproxy.com/docs/proxy-api/webhooks) to `announcement.published` and the same publish reaches your endpoint, signed like every other event. The payload carries the id, title, kind and audience; fetch the body from this endpoint if you need it. ### Email, for what cannot wait Notices that need action from you are also emailed to the address on every account that holds an API key, from the same sender as your order confirmations. That is the one channel a quiet integration still receives, so keep the account email one that a person reads. > [!NOTE] **What it is not**: This is a feed of changes we make on purpose. Live product availability is the `available` flag on [GET /products](https://hproxy.com/docs/proxy-api/products), and order outcomes live on the order itself and its webhooks. ## OpenAPI spec *GET /api/v1/openapi.json returns the full machine-readable OpenAPI 3.1 document for codegen, Postman or Insomnia.* URL: https://hproxy.com/docs/openapi The full machine-readable OpenAPI 3.1 document. Feed it to your codegen or a client like Postman or Insomnia to generate a typed SDK. **GET /openapi.json** ```bash curl https://hproxy.com/api/v1/openapi.json ``` Two more machine-readable surfaces: the complete scraper catalog as JSON at `GET /api/v1/scrapers` (no key required, see the [catalog](https://hproxy.com/docs/scrapers/catalog)), and this entire documentation as one markdown page at [/llms-full.txt](https://hproxy.com/llms-full.txt) for AI assistants.