Overview
Every endpoint lives under the base URL and speaks HTTPS only. Request bodies and responses are JSON encoded as UTF-8. Times are UTC in ISO 8601 form, money is in US dollars, and traffic is in GB.
The API covers two jobs. Account endpoints let your own tools read the balance and usage and manage proxy users. Data endpoints do the collection work for you: you send a URL, a query or a list of video links, and we handle exits, retries and rendering.
Authentication
Send your key in the Authorization header as a Bearer token. Keys start with tp_sk_ followed by random characters. Keep the key on your servers: it can spend your balance through the data endpoints.
- Top up your balance once, from $40. API access opens after the first credited top-up.
- Open the API page of your account and create a key. Copy it right away, it is shown in full only once.
- Store it as an environment variable, for example
TOPPROXY_KEY, and read it from there in your code.
One active key at a time. Creating a new key stops the previous one immediately. Roll the new key out to your services first, then replace it.
export TOPPROXY_KEY="tp_sk_7c41e9a2d05b4f8e9a13c6d2"
curl "https://api.topproxy.shop/v1/balance" -H "Authorization: Bearer $TOPPROXY_KEY"
The key in these examples is made up. Replace it with your own, or export it as TOPPROXY_KEY and the code picks it up.
Rate limit
Each account can make 300 requests per minute across all endpoints. Above that the API answers 429 with a Retry-After header that says how many seconds to wait. Long-running scrape calls count once, when they start.
A small wrapper that waits on 429 and backs off on 5xx answers keeps a busy job inside the limit without extra bookkeeping.
import os, time, requests
def call(method, path, **kw):
headers = {"Authorization": "Bearer " + os.environ["TOPPROXY_KEY"]}
for attempt in range(5):
r = requests.request(method, "https://api.topproxy.shop/v1" + path, headers=headers, timeout=120, **kw)
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", "5")))
continue
if r.status_code >= 500:
time.sleep(2 ** attempt)
continue
return r
return r
Account endpoints
Read what you have and what you used, and hand out separate proxy logins without sharing your main password.
Read the balance
GET/v1/balance
Returns the prepaid balance in US dollars, with the share that came from top-up bonuses shown separately. Use it to stop a job before the balance runs out.
curl "https://api.topproxy.shop/v1/balance" \
-H "Authorization: Bearer $TOPPROXY_KEY"
Response 200
{
"object": "balance",
"currency": "USD",
"available": 263.4,
"from_bonus": 52,
"as_of": "2026-11-23T08:12:44Z"
}
Read usage for a period
GET/v1/usage
Totals per product for a date range. Proxy products report GB or IP counts, data APIs report successful requests or GB delivered. Dates are UTC.
Parameters for GET /usage| Name | Type | Required | Description |
|---|
| start | date | Yes | First day, as YYYY-MM-DD. |
|---|
| end | date | Yes | Last day, included in the totals. |
|---|
| product | string | No | A product slug such as rotating-residential-proxies, to return one product only. |
|---|
curl "https://api.topproxy.shop/v1/usage?start=2026-11-01&end=2026-11-22" \
-H "Authorization: Bearer $TOPPROXY_KEY"
Response 200
{
"object": "usage",
"start": "2026-11-01",
"end": "2026-11-22",
"items": [
{
"product": "rotating-residential-proxies",
"unit": "GB",
"quantity": 58.24,
"cost_usd": 20.97
},
{
"product": "search-results-api",
"unit": "request",
"quantity": 12500,
"cost_usd": 10
}
],
"total_usd": 30.97
}
List proxy users
GET/v1/proxy-users
Proxy users are extra login and password pairs on your account. Each has its own traffic counter, which makes them useful for separating teams, clients or projects. All of them draw from the same balance.
curl "https://api.topproxy.shop/v1/proxy-users" \
-H "Authorization: Bearer $TOPPROXY_KEY"
Response 200
{
"object": "list",
"data": [
{
"id": "pu_41c8d2",
"user": "tp4q8w1",
"label": "pricing-team",
"created": "2026-10-11T09:30:00Z",
"traffic_gb": 31.6
},
{
"id": "pu_9e07ba",
"user": "tp6z2n5",
"label": "client-acme",
"created": "2026-11-02T14:05:12Z",
"traffic_gb": 4.08
}
],
"next_cursor": null
}
Create a proxy user
POST/v1/proxy-users
Creates a new login and password pair. The password is returned in this response only, so store it right away. Build gateway logins from the returned user exactly as with your main account name.
Parameters for POST /proxy-users| Name | Type | Required | Description |
|---|
| label | string | Yes | A name for your own reference, up to 64 characters. |
|---|
curl -X POST "https://api.topproxy.shop/v1/proxy-users" \
-H "Authorization: Bearer $TOPPROXY_KEY" \
-H "Content-Type: application/json" \
-d '{"label":"price-watch"}'
Response 200
{
"id": "pu_c3f51e",
"user": "tp8r3k6",
"label": "price-watch",
"password": "Vq7nL2xT9pWs4dHe",
"gateway": {
"host": "proxy.topproxy.shop",
"http_port": 8080,
"socks5_port": 1080
},
"login_example": "tp8r3k6_country-de",
"created": "2026-11-23T08:20:03Z"
}
Scraping API
For pages that block plain clients or need JavaScript. One call returns the finished page. Product details are on the Scraping API page.
Fetch a page
POST/v1/scrape
Send a public URL and receive the page. We pick the exit, retry when the target pushes back, and run a real browser when you ask for rendering. Calls are synchronous: the response arrives when the page is ready.
Body fields for POST /scrape| Field | Type | Required | Description |
|---|
| url | string | Yes | The page to fetch, starting with http:// or https://. |
|---|
| render | boolean | No | Run JavaScript in a browser before returning. Default false. |
|---|
| country | string | No | Two-letter exit country, any of the 64 listed. Default is automatic. |
|---|
| output | string | No | html (default), markdown, or text. |
|---|
| wait_for | string | No | CSS selector to wait for when render is true. |
|---|
| session | string | No | Reuse the same exit for calls that share this value, for multi-page flows. |
|---|
| headers | object | No | Extra request headers to send to the target, such as Accept-Language. |
|---|
curl -X POST "https://api.topproxy.shop/v1/scrape" \
-H "Authorization: Bearer $TOPPROXY_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://shop.example.com/item/5521","render":true,"country":"us","output":"html","wait_for":".price"}'
Response 200
{
"id": "scr_0b7e52f1",
"url": "https://shop.example.com/item/5521",
"target_status": 200,
"rendered": true,
"country": "us",
"duration_ms": 3180,
"billed": true,
"content_type": "text/html",
"content": "<!doctype html><html><head><title>Field Jacket</title></head><body>...</body></html>"
}
Set the client timeout to at least 120 seconds when render is true. Heavy pages can take a while to settle. The target_status field is the status code the website returned, separate from the status of the API call itself.
Search Results API
For rank tracking and keyword research. Ask as a searcher from a given country, city and device. Product details are on the Search Results API page.
Run a search query
POST/v1/search
Runs one query as a searcher in the country and language you choose, and returns the result page as structured fields: organic results, ads, and local results when the page shows them.
Body fields for POST /search| Field | Type | Required | Description |
|---|
| query | string | Yes | The search terms, as a person would type them. |
|---|
| country | string | No | Two-letter country of the searcher. Default us. |
|---|
| language | string | No | Interface language code, such as en, de or ja. |
|---|
| city | string | No | City value in lowercase with hyphens, for local results. |
|---|
| device | string | No | desktop (default) or mobile. |
|---|
| page | integer | No | Result page, starting at 1. |
|---|
curl -X POST "https://api.topproxy.shop/v1/search" \
-H "Authorization: Bearer $TOPPROXY_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"running shoes","country":"gb","language":"en","device":"desktop","page":1}'
Response 200
{
"id": "srch_5a91c0de",
"query": "running shoes",
"country": "gb",
"language": "en",
"device": "desktop",
"page": 1,
"billed": true,
"organic": [
{
"rank": 1,
"title": "Running Shoes for Road and Trail",
"link": "https://www.stridehouse.example/running-shoes",
"domain": "stridehouse.example",
"snippet": "Neutral and support shoes with free returns across the UK."
},
{
"rank": 2,
"title": "How to Choose Running Shoes",
"link": "https://www.runnersguide.example/choose-shoes",
"domain": "runnersguide.example",
"snippet": "Fit, cushioning and drop explained in plain terms."
}
],
"ads": [
{
"rank": 1,
"title": "Running Shoes Sale",
"domain": "kitbag.example"
}
],
"local": []
}
The local array is filled only when the result page shows a map or local listings, which depends on the query and the city.
Video Data API
For datasets built from public video and audio. Jobs run in the background and can hold many links. Product details are on the Video Data API page.
Queue a video job
POST/v1/video
Queues a list of public video links for download. The call returns at once with a job id. Files are prepared in the background, so poll the job or pass a callback URL that we call when the job finishes.
Body fields for POST /video| Field | Type | Required | Description |
|---|
| links | array | Yes | Public video page or file URLs. |
|---|
| resolution | string | No | Target height such as 360p, 720p or 1080p. The closest available is used. |
|---|
| container | string | No | mp4 (default), webm, or m4a and mp3 when audio_only is true. |
|---|
| audio_only | boolean | No | Keep the audio track only. Default false. |
|---|
| callback_url | string | No | HTTPS address that receives a POST with the job body when it completes. |
|---|
curl -X POST "https://api.topproxy.shop/v1/video" \
-H "Authorization: Bearer $TOPPROXY_KEY" \
-H "Content-Type: application/json" \
-d '{"links":["https://media.example.com/v/k29fq","https://media.example.com/v/p7c3m"],"resolution":"720p","container":"mp4","audio_only":false,"callback_url":"https://hooks.example.com/topproxy"}'
Response 202
{
"job_id": "vid_e4b70c19",
"status": "queued",
"links": 2,
"created": "2026-11-23T08:31:47Z"
}
Read a video job
GET/v1/video/{job_id}
Returns the job status and, once finished, one entry per link with its size and a file URL. Status moves from queued to running to done, or to failed for links that could not be fetched. Only delivered files count toward GB billing.
curl "https://api.topproxy.shop/v1/video/vid_e4b70c19" \
-H "Authorization: Bearer $TOPPROXY_KEY"
Response 200
{
"job_id": "vid_e4b70c19",
"status": "done",
"items": [
{
"link": "https://media.example.com/v/k29fq",
"state": "done",
"resolution": "720p",
"container": "mp4",
"size_gb": 0.164,
"file_url": "https://api.topproxy.shop/v1/video/vid_e4b70c19/files/0"
},
{
"link": "https://media.example.com/v/p7c3m",
"state": "failed",
"reason": "not_available"
}
],
"delivered_gb": 0.164
}
Download each file_url with the same Authorization header. Collect files soon after the job is done rather than leaving them for later.
Errors
Errors use standard HTTP status codes and share one body shape, with a short machine-readable code and a message for people. Quote the request_id when you contact support.
API error codes| Status | Code | Meaning |
|---|
| 400 | invalid_request | A field is missing or has the wrong type. The message names the field. |
|---|
| 401 | invalid_key | No key, a mistyped key, or a key that was replaced by a newer one. |
|---|
| 402 | insufficient_balance | The balance cannot cover this call. Top up and send it again. |
|---|
| 404 | not_found | The job id or proxy user does not exist on this account. |
|---|
| 422 | target_unavailable | The target refused every attempt or the URL is not public. Not billed. |
|---|
| 429 | rate_limited | More than 300 requests in one minute. Wait for the seconds in Retry-After. |
|---|
| 500 | internal_error | A fault on our side. Safe to retry with a short pause. |
|---|
| 503 | busy | Temporarily at capacity. Retry after a few seconds. |
|---|
Error body
{
"error": {
"status": 402,
"code": "insufficient_balance",
"message": "The balance is lower than the price of this call.",
"request_id": "req_3f0a77c2"
}
}
Billing
Data endpoints are paid from the same prepaid balance as proxies. Volume prices apply automatically as your usage grows.
Prices for the data endpoints| Product | Price | Billed | What counts |
|---|
| Scraping API | $0.72 to $0.90 | per 1,000 successful requests | Each call that returns the page counts once. |
|---|
| Search Results API | $0.63 to $0.80 | per 1,000 successful requests | Each result page returned counts once. |
|---|
| Video Data API | $0.038 to $0.065 | per GB of downloaded files | The size_gb of each delivered file. |
|---|
Every tier is listed on the pricing page. To send traffic through the proxy gateway yourself instead, start with the setup guides.
API questions
- Where do I create an API key?
- On the API page of your account at /account/api. The page unlocks after your first top-up of $40 or more. The full key is shown once when it is created, so copy it into your secrets store straight away.
- What happens to my old key when I create a new one?
- It stops working the moment the new key is created. Calls that still use it receive 401 invalid_key. Update every service that holds the key before you replace it, or plan a short switch-over.
- Does the API key work as a proxy password?
- No. The key is only for api.topproxy.shop. The proxy gateway uses your login and proxy password, as shown in the setup guides.
- Are failed calls billed?
- Scraping and search calls are billed per successful request, and video jobs per GB of delivered files. Calls that end in an error status are not counted.
Start calling the API
Open an account, make the first top-up, and create your key on the API page.