Developers
Scrapigo API
Connect Scrapigo to your own tools: generate proxy lines by the thousand, buy data with your credit and read your usage, all over HTTPS with an API key.
Reference
Quickstart
- Create a key in your dashboard, under API. Pick only the permissions your tool needs.
- Store it on your server, for instance in the SCRAPIGO_KEY environment variable. Never put it in a browser or a public repository.
- Call GET /me to check it, then generate your first lines.
export SCRAPIGO_KEY="sk_live_…"
curl -s https://api.scrapigo.cc/v1/me -H "Authorization: Bearer $SCRAPIGO_KEY"Authentication
Send the key in the Authorization header of every request. Each key carries its own permissions, an optional list of allowed IPs and, for purchases, an optional daily spend cap. You can hold up to 10 keys. Regenerating your account token revokes all of them.
Authorization: Bearer sk_live_…read- Account, products, credentials, stats, quotes and purchase history.
generate- Proxy lines. They contain your proxy password.
purchase- Spends your credit. Set a daily cap on such keys.
Byte counts are strings, because they exceed the integer precision of JavaScript. Amounts in dollars are strings with two decimals. Times are Unix seconds, UTC.
Rate limits
Limits apply per minute, per key and per account (all keys together). Responses to authenticated requests carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds); 401 and 403 responses do not. Past the limit you get 429 with Retry-After. Thirty failed authentications per minute from one IP block that IP for the rest of the minute.
| Class | Per key | Per account |
|---|---|---|
| Reads GET … | 120/min | 300/min |
| Generation POST /proxies/generate | 60/min | 120/min |
| Purchases and quotes POST /purchases, /purchases/quote | 10/min | 10/min |
Errors
Errors share one shape. code is stable, write your logic against it; message is for humans and may change. Quote requestId (also in the X-Request-Id header) when you contact us.
{
"error": {
"code": "insufficient_scope",
"message": "This API key lacks the 'purchase' scope.",
"requestId": "9f2c41d07ab35e18"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | Malformed request: the message says which field. |
| 400 | idempotency_key_required | POST /purchases without a valid Idempotency-Key. |
| 401 | invalid_api_key | Missing, unknown or revoked key. |
| 402 | insufficient_credit | Not enough credit: top up in the dashboard. |
| 403 | insufficient_scope | The key lacks the permission this route needs. |
| 403 | ip_not_allowed | The call comes from an IP outside the key's list. |
| 403 | account_suspended | The account is suspended. |
| 404 | not_found | Unknown route, or a credential that is not yours. |
| 409 | product_unavailable | The product is not open yet. |
| 409 | credential_password_unavailable | This credential is too old to show its password: regenerate it in the dashboard. |
| 409 | no_credential | No active credential for this product: buy it first. |
| 422 | sticky_required | This product only serves sticky sessions. |
| 422 | country_not_allowed | Country not served by this product. |
| 422 | spend_cap_exceeded | The purchase would pass the key's daily spend cap. |
| 422 | idempotency_key_reused | This Idempotency-Key was used for a different purchase. |
| 422 | invalid_discount_code | The discount code cannot be used. |
| 422 | invalid_quantity | gb below 0.5, or not covered by the price grid. |
| 422 | contact_only | Volume above the grid: contact us. |
| 429 | rate_limited | Too many requests: wait Retry-After seconds. |
Reference
/mePermission: readYour account
Credit, remaining data per product and the key making the call. The cheapest way to check that a key works.
curl -s "https://api.scrapigo.cc/v1/me" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{
"userId": 42,
"creditUsd": "37.10",
"reserves": [
{ "product": "residential", "remainingBytes": "12884901888", "creditedBytes": "25000000000" }
],
"key": {
"id": 3, "name": "prod scraper", "prefix": "sk_live_7Hq2", "scopes": ["generate", "read"],
"ipAllowlist": ["203.0.113.7"], "dailySpendCapUsd": "50.00"
},
"callerIp": "203.0.113.7"
}/productsPermission: readProducts and prices
Every product with its volume price grid, whether it is open, the countries it serves and whether it only serves sticky sessions.
curl -s "https://api.scrapigo.cc/v1/products" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{
"data": [
{
"product": "residential",
"available": true,
"tiers": [{ "minGb": 1, "pricePerGbUsd": "0.99" }, { "minGb": 1000, "pricePerGbUsd": "0.80" }],
"countries": [],
"stickyOnly": false
}
]
}/countriesPermission: readCountries
Countries you can target with products that have no country list of their own.
curl -s "https://api.scrapigo.cc/v1/countries" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{ "data": [{ "iso": "FR", "name": "France" }, { "iso": "US", "name": "United States" }] }/credentialsPermission: readCredentials
Your active proxy credentials: the main one of each product and your sub-users, with their data allowance. Passwords are never returned here; they only appear in generated lines.
curl -s "https://api.scrapigo.cc/v1/credentials" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{
"data": [
{ "id": 12, "product": "residential", "label": "", "kind": "main", "username": "k3xq9p", "country": "any", "quotaBytes": null, "quotaUsedBytes": null },
{ "id": 31, "product": "residential", "label": "Scraper A", "kind": "sub", "username": "m7tt2c", "country": "any", "quotaBytes": "5000000000", "quotaUsedBytes": "1203000000" }
]
}/proxies/generatePermission: generateGenerate proxy lines
Returns 1 to 10,000 lines ready to paste into your tool. Nothing is stored: generate as often as you like. Each sticky line gets its own session, so 500 lines give 500 different IPs. Send Accept: text/plain to receive one line per row instead of JSON.
Parameters
productrequiredstring- residential, residential_instagram… (GET /products)
credentialIdinteger- A credential or sub-user of this product. Default: the product's main credential.
countrystring- ISO code (FR, US…) or any. Default any. Required by products with a country list.
sessionrotating | sticky- rotating: a new IP on every connection. sticky: the same IP for ttlMinutes. Default rotating.
ttlMinutes1–360- Sticky session length in minutes. Default 10.
protocolhttp | socks5- Sets the port. Default http.
formatstring- user_pass_host_port (default), host_port_user_pass, protocol_host_port_user_pass, url, user_pass, host_port, custom.
templatestring- With format custom: tokens {USER} {PASS} {HOST} {PORT} {PROTOCOL}.
quantity1–10000- Number of lines. Default 1.
curl -s -X POST "https://api.scrapigo.cc/v1/proxies/generate" \
-H "Authorization: Bearer $SCRAPIGO_KEY" \
-H "Content-Type: application/json" \
-d '{"product":"residential","country":"FR","session":"sticky","ttlMinutes":30,"format":"url","quantity":3}'Response
{
"data": [
"http://FR-30-q8d2kx0a-k3xq9p:s3cr3t-EXAMPLE@proxy.scrapigo.cc:8081",
"http://FR-30-m1v7zt4c-k3xq9p:s3cr3t-EXAMPLE@proxy.scrapigo.cc:8081",
"http://FR-30-p0s9aa3e-k3xq9p:s3cr3t-EXAMPLE@proxy.scrapigo.cc:8081"
],
"count": 3
}/purchasesPermission: purchaseBuy data
Converts credit into data for a product, at the grid price for that volume. The Idempotency-Key header is required: retrying the same request with the same key returns the original purchase (200, Idempotent-Replayed: true) and never charges twice. Use a new key for each new purchase: 1 to 64 letters, digits, - or _.
Parameters
productrequiredstring- The product to credit.
gbrequirednumber- From 0.5, rounded to 3 decimals (the response gives the gb kept). Above 1,000 GB, contact us.
codestring- Optional discount code.
# One Idempotency-Key per purchase: reusing it replays the first purchase.
curl -s -X POST "https://api.scrapigo.cc/v1/purchases" \
-H "Authorization: Bearer $SCRAPIGO_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"product":"residential","gb":25}'Response
{
"purchase": {
"id": 881, "product": "residential", "gb": 25, "pricePerGbUsd": "0.92",
"discountUsd": "0.00", "totalUsd": "23.00", "apiKeyId": 3, "createdAt": 1790330400
},
"creditUsd": "14.10",
"reserve": { "product": "residential", "remainingBytes": "37884901888" }
}/purchases/quotePermission: readPrice a purchase
Same body as a purchase. Returns the price, the discount and whether your credit covers it, without buying anything.
curl -s -X POST "https://api.scrapigo.cc/v1/purchases/quote" \
-H "Authorization: Bearer $SCRAPIGO_KEY" \
-H "Content-Type: application/json" \
-d '{"product":"residential","gb":25}'Response
{
"product": "residential", "gb": 25, "pricePerGbUsd": "0.92", "subtotalUsd": "23.00",
"discountUsd": "0.00", "totalUsd": "23.00", "creditUsd": "37.10", "creditAfterUsd": "14.10", "sufficient": true,
"spendCapRemainingUsd": "50.00", "withinSpendCap": true
}/purchasesPermission: readPurchase history
Most recent first. apiKeyId tells which key made each purchase (null: bought in the dashboard). Follow nextCursor while hasMore is true.
Parameters
limit1–200- Page size. Default 50.
cursorstring- nextCursor from the previous page.
curl -s "https://api.scrapigo.cc/v1/purchases?limit=20" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{ "data": [{ "id": 881, "product": "residential", "gb": 25, "pricePerGbUsd": "0.92", "discountUsd": "0.00", "totalUsd": "23.00", "apiKeyId": 3, "createdAt": 1790330400 }], "hasMore": false }/stats/summaryPermission: readUsage summary
Bytes sent and received, number of connections and split by product over a period. The same totals as your dashboard.
Parameters
period24h | today | 7d | 30d | 90d- UTC window. Default 7d.
curl -s "https://api.scrapigo.cc/v1/stats/summary?period=7d" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{
"period": "7d", "from": 1789776000, "to": 1790330400,
"bytesUp": "310221004", "bytesDown": "9811200332", "bytesTotal": "10121421336",
"sessions": 48210, "byProduct": { "residential": "10121421336" }
}/stats/usagePermission: readUsage over time
One point per hour or per day, empty ones included, ready to chart. ts is the start of the bucket in Unix seconds (UTC).
Parameters
granularityhour | day- hour: period 24h or 7d. day: today, 7d, 30d or 90d. Default day.
period24h | today | 7d | 30d | 90d- UTC window. Default 7d.
curl -s "https://api.scrapigo.cc/v1/stats/usage?granularity=hour&period=24h" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{ "granularity": "hour", "period": "24h", "data": [{ "ts": 1790301600, "bytes": "402113090", "sessions": 1880, "byProduct": { "residential": "402113090" } }] }/stats/breakdownPermission: readUsage breakdown
Usage split by country, credential or product, largest first.
Parameters
bycountry | credential | product- Default country.
period24h | today | 7d | 30d | 90d- UTC window. Default 7d.
curl -s "https://api.scrapigo.cc/v1/stats/breakdown?by=country&period=30d" \
-H "Authorization: Bearer $SCRAPIGO_KEY"Response
{ "by": "country", "period": "30d", "data": [{ "key": "FR", "bytes": "8120000000", "sessions": 30112 }, { "key": "US", "bytes": "2001421336", "sessions": 18098 }] }