DEV Community

Dishant Singh
Dishant Singh

Posted on

Getting Started with the BuyProxy Residential Proxy API

If you've ever needed to scrape a site, check localized pricing, or verify ads from a different country, you've run into the same wall: your server's IP gets blocked, geofenced, or rate-limited almost immediately. That's the problem BuyProxy solves - a residential, ISP, mobile, and datacenter proxy network you can drive entirely over a plain JSON REST API.

This post walks through the whole flow: creating an account, generating an API key, and pulling your first proxy line - no dashboard clicking required after setup.

Why residential proxies

A datacenter IP is cheap and fast, but sites fingerprint the ASN and block it outright. A residential IP is assigned by a real ISP to a real household, so it looks like - and is - ordinary consumer traffic. That's the difference between a scraper that works and one that gets a CAPTCHA on every request.

1. Create an account

Signup is code-based, not a web form flow:

curl -X POST https://buyproxy.org/api/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "a-strong-password"}'
Enter fullscreen mode Exit fullscreen mode

That emails a 6-digit code. Confirm it and your account is live:

curl -X POST https://buyproxy.org/api/auth/verify-otp \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "code": "123456"}'
Enter fullscreen mode Exit fullscreen mode

Sign up with an address from a major provider (Gmail, Outlook, Yahoo, etc.) and you'll start with a small free bandwidth balance - enough to try the API before spending anything.

2. Create a personal API key

Every /v1/* call is authenticated with a single header, X-API-Key. Grab a key from Dashboard ‚Üí Personal API keys - it's shown once, so copy it immediately.

3. Check your account and plans

curl https://buyproxy.org/v1/account \
  -H "X-API-Key: bp_key_..."
# {"email":"you@example.com","plan":"free","balanceGb":0.1}

curl https://buyproxy.org/v1/plans \
  -H "X-API-Key: bp_key_..."
# {"plans":[{"id":"...","productId":"residential-lite","name":"Residential Lite","dataGbRemaining":0.1,"dataGbTotal":0.1,...}]}
Enter fullscreen mode Exit fullscreen mode

4. Generate a proxy line

Take a plan id from the response above and request a line:

curl -X POST https://buyproxy.org/v1/plans/<planId>/generate \
  -H "X-API-Key: bp_key_..."
# {"lines":["user123:pass456@gw.buyproxy.org:6969"]}
Enter fullscreen mode Exit fullscreen mode

That's a ready-to-use username:password@host:port line - drop it straight into requests, axios, Puppeteer, or your proxy pool. It supports both HTTP and SOCKS5, with rotating or sticky sessions depending on the plan.

A minimal Python example:

import requests

proxies = {
    "http": "http://user123:pass456@gw.buyproxy.org:6969",
    "https": "http://user123:pass456@gw.buyproxy.org:6969",
}

r = requests.get("https://httpbin.org/ip", proxies=proxies)
print(r.json())
Enter fullscreen mode Exit fullscreen mode

5. Top up when you need more bandwidth

Two ways to pay, both API-driven - no checkout page unless you want one:

# Card checkout - returns a payment URL
curl -X POST https://buyproxy.org/v1/topup/card \
  -H "X-API-Key: bp_key_..." -H "Content-Type: application/json" \
  -d '{"kind":"topup","productKey":"residential","gb":10}'

# Crypto checkout - returns an invoice URL
curl -X POST https://buyproxy.org/v1/topup/crypto \
  -H "X-API-Key: bp_key_..." -H "Content-Type: application/json" \
  -d '{"kind":"topup","productKey":"residential","gb":10}'
Enter fullscreen mode Exit fullscreen mode

What's actually available

BuyProxy covers six proxy types behind the same API: core residential, premium residential (city-level targeting, sticky sessions), ISP rotating, mobile (carrier-level targeting), datacenter IPv4, and IPv6. All targeting - country, state, city, ISP - is encoded directly in the generated line, so switching location is a parameter change, not a new integration.

Full reference (all 8 endpoints, request/response shapes, error codes): buyproxy.org/docs/api-reference

If you build something with it, I'd like to hear what you're using it for - drop a comment below.

Top comments (0)