Developers

Proxy and scraping API documentation

Manage your balance, usage and proxy users over REST, and collect pages, search results and video files without running any proxy infrastructure. All responses are JSON, and every call draws from the same prepaid balance as the proxies.

How do you authenticate API requests?

Every request carries your API key as a bearer token in the Authorization header. Keys belong to your account and are created on the API page of the dashboard after your first top-up. Making a new key stops the old one.

  • Base URLhttps://api.firstproxy.shop/v1
  • HeaderAuthorization: Bearer KEY
  • Rate limit300 requests / minute
  • Formatapplication/json
curl https://api.firstproxy.shop/v1/balance \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9"
Account API

Account API: balance, usage and proxy users

Read what you hold and what you have used, and create sub-users for teammates, tools or customers. Each proxy user has its own credentials and traffic counter.

GET/v1/balance

Returns your prepaid balance in USD, including any top-up bonus still unspent.

Request
curl https://api.firstproxy.shop/v1/balance \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9"
Response 200
{
  "currency": "USD",
  "balance": 184.62,
  "bonus_included": 31.2,
  "updated_at": "2026-11-22T09:41:07Z"
}
GET/v1/usage

Returns traffic, request counts and spend for a date range, split by product. Both from and to are optional and default to the current month.

Request
curl "https://api.firstproxy.shop/v1/usage?from=2026-11-01&to=2026-11-22" \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9"
Response 200
{
  "from": "2026-11-01",
  "to": "2026-11-22",
  "totals": {
    "traffic_gb": 41.37,
    "requests": 128904,
    "spent_usd": 12.82
  },
  "products": [
    {
      "slug": "residential-proxies",
      "traffic_gb": 36.1,
      "spent_usd": 11.19
    },
    {
      "slug": "serp-api",
      "requests": 4200,
      "spent_usd": 2.65
    }
  ]
}
GET/v1/proxy-users

Lists the proxy users on your account with their traffic and allowlisted IPs.

Request
curl https://api.firstproxy.shop/v1/proxy-users \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9"
Response 200
{
  "data": [
    {
      "id": "pu_8f3a21",
      "username": "team-ads",
      "created_at": "2026-10-04T12:20:11Z",
      "traffic_gb": 18.9,
      "allowlist": [
        "203.0.113.40"
      ]
    },
    {
      "id": "pu_c71b9e",
      "username": "crawler-eu",
      "created_at": "2026-10-29T08:02:45Z",
      "traffic_gb": 22.47,
      "allowlist": []
    }
  ],
  "has_more": false
}
POST/v1/proxy-users

Creates a proxy user. Send a label, a two-letter country, and a session of rotating or sticky. For sticky users add ttl_minutes from 1 to 120. The response returns a ready username, a one-time password and the gateway details.

Request
curl -X POST https://api.firstproxy.shop/v1/proxy-users \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9" \
  -H "Content-Type: application/json" \
  -d '{"label": "price-watch", "country": "de", "session": "sticky", "ttl_minutes": 30}'
Response 201
{
  "id": "pu_2e90d4",
  "username": "user-country-de-session-pw4k91-ttl-30m",
  "password": "Qm8vT2xLr5Zc0Wd7",
  "host": "gate.firstproxy.shop",
  "ports": {
    "http": 8000,
    "socks5": 9000
  },
  "created_at": "2026-11-22T09:44:30Z"
}
Data API

How do you scrape a page with the Web Scraper API?

Send a URL, get the page back. Set render to true when the content is built by JavaScript. Pass a country to fetch the page as a visitor from there would see it.

POST/v1/scrape
urlRequired. The absolute http or https address to fetch.
renderOptional boolean. Run the page in a headless browser first. Default false.
countryOptional two-letter code from our 64 countries. Default is chosen automatically.
Request
curl -X POST https://api.firstproxy.shop/v1/scrape \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/products/42", "render": true, "country": "us"}'
Response 200
{
  "id": "req_7d2c41a9",
  "url": "https://example.com/products/42",
  "status": 200,
  "rendered": true,
  "country": "us",
  "elapsed_ms": 2140,
  "html": "<!doctype html><html lang=\"en\"><head><title>Trail Backpack 30L</title></head><body>...</body></html>",
  "parsed": {
    "title": "Trail Backpack 30L",
    "price": "89.00",
    "currency": "USD",
    "in_stock": true
  },
  "credits_used": 1
}

Billed per 1,000 successful requests: $0.90 at the entry tier down to $0.72. See Web Scraper API pricing

Data API

How do you get search results with the SERP API?

Run a query as a searcher in a chosen country and receive organic results, ads and related searches as structured fields instead of raw HTML.

GET/v1/serp
qRequired. The search query text, URL-encoded.
countryOptional two-letter code. Sets the location of the searcher.
engineOptional. Search engine to query, such as google or bing. Default google.
languageOptional two-letter language code for the results page, such as en or de.
Request
curl -G https://api.firstproxy.shop/v1/serp \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9" \
  --data-urlencode "q=standing desk" \
  --data-urlencode "country=gb" \
  --data-urlencode "engine=google"
Response 200
{
  "query": "standing desk",
  "engine": "google",
  "country": "gb",
  "language": "en",
  "page": 1,
  "organic": [
    {
      "position": 1,
      "title": "Height Adjustable Standing Desks",
      "url": "https://www.deskhaus.co.uk/standing-desks",
      "domain": "deskhaus.co.uk",
      "snippet": "Electric sit-stand desks with memory presets and a five year frame warranty."
    },
    {
      "position": 2,
      "title": "Best Standing Desks of 2026 Tested",
      "url": "https://www.officegearlab.com/standing-desks",
      "domain": "officegearlab.com",
      "snippet": "We tested 24 desks for stability, noise and lift speed."
    }
  ],
  "ads": [
    {
      "position": 1,
      "title": "Sit-Stand Desks from 199 GBP",
      "domain": "flexispace.co.uk"
    }
  ],
  "related_searches": [
    "standing desk converter",
    "electric standing desk uk"
  ]
}

Billed per 1,000 successful requests: $0.80 at the entry tier down to $0.63. See SERP API pricing

Data API

How do you download videos in bulk with the Video Downloader API?

Submit a list of public video URLs with the quality and format you want. The API creates a job, downloads the files on our servers and returns download links, or writes the files to your own S3 bucket. Poll the job until it is completed.

POST/v1/video
urlsRequired. Array of public video page URLs to download in one job.
qualityOptional. Target resolution such as 1080p, 720p or 480p. The closest available quality is used.
formatOptional. Output format such as mp4 for video, or mp3 for the audio track only.
deliveryOptional object. {"type": "url"} returns download links. {"type": "s3", "bucket", "prefix"} writes the files to your bucket under that prefix.
Request
curl -X POST https://api.firstproxy.shop/v1/video \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://video.example.com/watch/8f2k1","https://video.example.com/watch/3pq7z"],"quality":"1080p","format":"mp4","delivery":{"type":"url"}}'
Response 202
{
  "job_id": "vj_5c2e81",
  "status": "queued"
}
GET/v1/video/jobs/{id}

Returns the job status and, once files are ready, one entry per file with its source URL, quality, format, size in GB and download URL. With S3 delivery the files are already in your bucket when the job shows completed.

Request
curl https://api.firstproxy.shop/v1/video/jobs/vj_5c2e81 \
  -H "Authorization: Bearer fp_sk_4d81c7a92e0b5f36a1d9"
Response 200
{
  "job_id": "vj_5c2e81",
  "status": "completed",
  "files": [
    {
      "source_url": "https://video.example.com/watch/8f2k1",
      "quality": "1080p",
      "format": "mp4",
      "size_gb": 0.412,
      "download_url": "https://api.firstproxy.shop/v1/video/jobs/vj_5c2e81/files/1"
    },
    {
      "source_url": "https://video.example.com/watch/3pq7z",
      "quality": "1080p",
      "format": "mp4",
      "size_gb": 0.287,
      "download_url": "https://api.firstproxy.shop/v1/video/jobs/vj_5c2e81/files/2"
    }
  ]
}

Billed per GB of completed files: $0.065 per GB at the entry tier down to $0.038. See Video Downloader API pricing

What do the API error codes mean?

Failures use standard HTTP status codes and a JSON body with a machine-readable code and a plain message. Safe-to-retry statuses are 429 and 5xx.

{
  "error": {
    "code": "insufficient_balance",
    "message": "Balance is lower than the cost of this request.",
    "status": 402
  }
}
StatusMeaning
400Bad requestA required field is missing or a value is malformed, for example an unknown country code. The response body names the field.
401UnauthorizedThe Authorization header is absent or the key is invalid or revoked. Create a new key in the dashboard.
402Insufficient balanceYour prepaid balance cannot cover the request. Top up and retry. Nothing is charged for a request that returns 402.
404Not foundThe resource id does not exist on your account, such as a proxy user that was already deleted.
429Rate limitMore than 300 requests in a minute. Wait for the number of seconds in the Retry-After header, then continue.
5xxServer or target errorA temporary problem on our side or at the target site. Retrying is safe, and failed scrape, SERP and video requests are not billed.
FAQ

API questions and answers

Keys, limits and billing for the REST endpoints. More answers are on the FAQ page.

How do I get an API key?

Sign in to the dashboard, open Settings and create a key. Keys are shown once, so store it in your secrets manager. You can hold several keys and revoke any of them without affecting the others.

What is the rate limit?

Each account can send 300 requests per minute across the account and data endpoints. Over the limit you receive a 429 response with a Retry-After header. Scraping and SERP calls run concurrently, so keep your own queue below the limit.

How are scraping and SERP requests billed?

Both are billed per 1,000 successful requests from your prepaid balance. The Web Scraper API runs from $0.72 to $0.90 and the SERP API from $0.63 to $0.80 per 1,000, depending on volume. Requests that fail are not charged.

How is the Video Downloader API billed?

Per GB of completed files, from $0.065 per GB at the entry tier down to $0.038 per GB at the highest volume. The size of each file is returned as size_gb in the job response, and downloads that fail are not charged.

Can I use the API and the proxy gateway together?

Yes. Both draw from the same balance. Use the account API to create proxy users and read usage, and use the gateway for traffic that your own software sends.

Get an API key in a minute

Create an account, top up from $40 and create a key on the API page of the dashboard.