BuyProxy logo
Log inSign up

BuyProxy API

BuyProxy API: introduction

The base URL for every endpoint below is:

https://www.buyproxy.org/v1

This is the same self-service API that powers your dashboard, exposed for programmatic use. Sign up, verify your email, create a key, and you can top up and generate proxies without ever opening a browser again.

Authentication

Every request needs an X-API-Key header. Create a key from Personal API keys once you have an account — see Authentication for the full signup-to-key flow, including the two calls needed to create an account by API alone.

curl https://www.buyproxy.org/v1/account \
  -H "X-API-Key: bp_key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# {"email":"you@example.com","name":"you","plan":"free","planExpiresAt":null,"balanceGb":4.2,"createdAt":"..."}

Prefer a typed client? Official SDKs for Node.js, Python, Go, PHP, Ruby, Java, .NET and Rust and a command-line tool wrap everything below.

Endpoints

MethodPathDescription
GET/v1/productsEvery product, its productKey, minimum GB and live per-GB price. No key needed.
GET/v1/accountYour email, plan and plan expiry.
GET/v1/balancesSpendable GB per product, including GB still being added after a payment.
GET/v1/plansYour active plans, data left on each, and what each plan's generate call accepts.
POST/v1/plans/{planId}/generateGenerate one or more proxy connection lines against a plan.
POST/v1/topup/cardStart a card top-up or plan purchase — returns a payment link.
POST/v1/topup/cryptoStart a crypto top-up — returns an invoice URL.
GET/v1/transactionsYour payment history.
GET/v1/transactions/{id}One payment's status — poll this after a top-up until it's succeeded.

A typical flow

# 1. Pick a product and see its price
curl https://www.buyproxy.org/v1/products

# 2. Top up 10 GB of Core Residential — open payUrl to pay
curl -X POST https://www.buyproxy.org/v1/topup/card \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"kind":"topup","productKey":"residential","gb":10}'
# {"payUrl":"https://...","transactionId":"st_..."}

# 3. Wait for the payment to settle
curl https://www.buyproxy.org/v1/transactions/st_... -H "X-API-Key: $KEY"
# {"id":"st_...","status":"succeeded",...}

# 4. Find the plan and generate a US proxy
curl https://www.buyproxy.org/v1/balances -H "X-API-Key: $KEY"
curl -X POST https://www.buyproxy.org/v1/plans/PLAN_ID/generate \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"country":"US","count":5}'
# {"lines":["user-country-us:pass@gw.buyproxy.org:6969", ...]}

The full machine-readable spec is at /openapi.yaml.

Reselling to your own customers instead of using proxies yourself? See the Reseller API — a separate key type for managing sub-customers.

Errors

Every error response is {"error": "message"} with one of these status codes:

400 — malformed or invalid request body
401 — missing or invalid X-API-Key
402 — the plan has no bandwidth left
403 — the account behind this key is suspended
404 — plan or transaction not found
429 — rate limit exceeded (see Rate limits)
502 / 503 — a payment or proxy provider is unavailable right now

Was this page helpful?