API documentation
One GET request returns clean JSON. This page covers how to authenticate, what comes back, what a call costs, and every endpoint.
Quick start
- Sign in. Your first API key is created for you and shown once on the dashboard. New accounts get 100 free credits.
- Copy the key and keep it secret. If you lose it, rotate or create another on the API keys page.
- Make a call:
curl "https://api.scrapingrabbit.com/v1/seo/domain-age?domain=example.com" \
-H "x-api-key: YOUR_API_KEY"The same call in JavaScript and in Python:
const response = await fetch("https://api.scrapingrabbit.com/v1/seo/domain-age?domain=example.com", {
headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY },
});
const result = await response.json();
if (!result.success) throw new Error(result.code + ": " + result.message);
console.log(result.data);import os, requests
response = requests.get(
"https://api.scrapingrabbit.com/v1/seo/domain-age",
params={"domain": "example.com"},
headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
)
result = response.json()
if not result["success"]:
raise RuntimeError(result["code"] + ": " + result["message"])
print(result["data"])Prefer to click first? The playground makes the same call and shows the exact curl command, and every endpoint has a free tool you can try without an account.
Authentication
Send your key in one of two headers. Both mean the same thing.
x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEYKeys start with sr_live_. Call the API from your server, never from a web page or an app, where anyone could read the key. You can have several keys. Rotating a key on the API keys page replaces it with a new one and the old one stops working at once, so update your code right after. Revoking a key also takes effect at once.
Base URL
https://api.scrapingrabbit.com/v1Every endpoint is a GET request with one query parameter and returns JSON.
Responses
A successful call puts the result in data. The shape of data depends on the endpoint; each endpoint's page shows a real example.
{
"success": true,
"message": "OK",
"data": { },
"meta": { "timestamp": "2026-11-28T09:15:02.311Z", "apiVersion": "1.0" }
}A failed call has success: false, a stable code to branch on in your code, and a message for people. Some errors add fields, like the credits above.
{
"success": false,
"code": "PAYMENT_REQUIRED",
"message": "You are out of credits.",
"creditsLeft": 0,
"creditsNeeded": 5
}Errors
Branch on code, not on the message text. A failed call costs nothing.
| Code | Status | Meaning |
|---|---|---|
| MISSING_API_KEY | 401 | No API key was sent. Send it in the x-api-key header or as a Bearer token. |
| INVALID_API_KEY | 401 | The API key is not valid or has been revoked. |
| INVALID_PARAMETERS | 400 | A parameter is missing, not valid, or the request has a parameter this endpoint does not take. |
| PAYMENT_REQUIRED | 402 | Not enough credits for this call. Nothing was charged. |
| NOT_FOUND | 404 | There is no endpoint at this path. |
| UPSTREAM_NOT_FOUND | 404 | The source has nothing for that input (for example an account that does not exist). Nothing was charged. |
| RATE_LIMITED | 429 | Too many requests for your plan this minute. Wait for the number of seconds in Retry-After. |
| DAILY_LIMIT_REACHED | 429 | Your daily credit limit is reached. Calls resume at 00:00 UTC (see Retry-After), or raise the limit in the dashboard. Nothing was charged. |
| UPSTREAM_ERROR | 502 | The data source failed or took too long. Nothing was charged. Trying again usually works. |
| SERVICE_UNAVAILABLE | 503 | A temporary fault on our side. Nothing was charged. |
Credits
Every endpoint has a fixed cost in credits, listed in the endpoints table below. A call is charged only after it succeeds. Failed calls, and calls where the source answers that it has nothing for your input (UPSTREAM_NOT_FOUND), are free. A call that succeeds but returns an empty list is still a successful call and is charged. Each successful answer carries an X-Credits-Charged header.
To check your balance, call https://api.scrapingrabbit.com/v1/account/credits with your key. It is free and does not count as a charged call. Plans are on the pricing page.
Rate limits
Each key has a per-minute limit that depends on your plan. Going over it returns RATE_LIMITED with a Retry-After header (seconds). Answers to calls with a valid key carry a RateLimit-Limit header.
| Plan | Requests per minute |
|---|---|
| Free | 10 |
| Starter | 60 |
| Pro | 120 |
| Scale | 300 |
Daily limit
A daily limit is a safety net against a runaway loop. Set the most credits you want to spend in a day (UTC) on the Credits page. When it is reached, calls return DAILY_LIMIT_REACHED with dailyLimit and usedToday fields and a Retry-After header, are not charged, and resume at 00:00 UTC. A burst of simultaneous calls can overshoot the limit by a few calls.
Webhooks
A webhook sends a signed POST to your URL when something happens on your account, so you do not have to poll. Add one in the dashboard. You can have up to 5. The URL must be https on the standard port. Each is shown a signing secret once, when you add it.
Events
- credits.low
- Your balance fell below 10% of your largest active credit grant.
- credits.exhausted
- Your balance reached zero.
- credits.granted
- Credits were added: a plan renewal, a plan start, a credit pack, or a refund.
- subscription.cancelled
- You cancelled your plan. It stays active until the period ends.
- subscription.expired
- Your plan ended and your account moved to the free plan.
- test.ping
- Sent when you press Send test in the dashboard.
What we send
A JSON body, and three headers that follow the Standard Webhooks format: webhook-id, webhook-timestamp (Unix seconds) and webhook-signature.
{
"id": "evt_0b1f6c3e-6d0a-4c53-9d3e-7e5a1b2c3d4e",
"type": "credits.low",
"createdAt": "2026-11-28T09:15:02.311Z",
"data": { "balance": 96, "threshold": 100 }
}Verify the signature
The signature is a base64 HMAC-SHA256 of webhook-id.webhook-timestamp.body with your secret (the part after whsec_ is base64). Check it against the raw body before you parse it, and reject a timestamp more than 5 minutes off your clock. This function is tested against our sender:
const crypto = require("node:crypto");
// secret: the whsec_ value shown once when you added the webhook
// headers: the request headers (lowercase names)
// rawBody: the body exactly as received, a string, before JSON.parse
function verifyWebhook(secret, headers, rawBody) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
const received = headers["webhook-signature"];
if (!id || !timestamp || !received) return false;
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const key = Buffer.from(secret.replace("whsec_", ""), "base64");
const expected = "v1," + crypto.createHmac("sha256", key).update(id + "." + timestamp + "." + rawBody).digest("base64");
return received.split(" ").some((candidate) => {
const a = Buffer.from(candidate);
const b = Buffer.from(expected);
return a.length === b.length && crypto.timingSafeEqual(a, b);
});
}
module.exports = verifyWebhook;
Answering and retries
Answer with any 2xx status within 10 seconds. Anything else, a timeout or a refused connection counts as a failure. We try again after 1 minute, 5 minutes, 30 minutes, 2 hours, 12 hours, so up to 6 attempts in all, then mark the delivery failed. The webhook-id stays the same on every attempt: use it to ignore repeats. We never follow redirects, and we refuse URLs that point at private or internal addresses. The dashboard shows each delivery and its result.
Endpoints
Each endpoint takes one query parameter. Click an endpoint for its page with a real example and limits.
YouTube
| Endpoint | Parameter | Credits |
|---|---|---|
| /youtube/transcript | url | 1 |
| /youtube/channel | channel_id | 1 |
| /youtube/video | url | 1 |
| /youtube/comments | urlnext_page_token (optional) | 1 |
| /youtube/resolve | handle | 1 |
| /youtube/channel/banner | channel_id | 1 |
TikTok
| Endpoint | Parameter | Credits |
|---|---|---|
| /tiktok/transcript | url | 5 |
| /tiktok/username/check | username | 5 |
| /tiktok/profile | username | 5 |
| /tiktok/engagement | username | 5 |
| Endpoint | Parameter | Credits |
|---|---|---|
| /instagram/username/check | username | 5 |
| /instagram/profile | username | 5 |
| /instagram/highlights | username | 5 |
SEO
| Endpoint | Parameter | Credits |
|---|---|---|
| /seo/domain-age | domain | 1 |
| /seo/domain-authority | domain | 1 |
| /google/autocomplete | query | 1 |
| /seo/website-traffic | domain | 1 |
| /email/verify | 1 |
Amazon
| Endpoint | Parameter | Credits |
|---|---|---|
| /amazon/autocomplete | query | 1 |
| /amazon/bestsellers | category_id | 1 |
| /amazon/search | query | 1 |
Snapchat
| Endpoint | Parameter | Credits |
|---|---|---|
| /snapchat/profile | username | 5 |
| Endpoint | Parameter | Credits |
|---|---|---|
| /google/trends | query | 5 |
| /google/maps | query | 5 |
| /google/news | query | 5 |
Apple App Store
| Endpoint | Parameter | Credits |
|---|---|---|
| /apple/search | query | 1 |
| /apple/reviews | product_id | 1 |
Walmart
| Endpoint | Parameter | Credits |
|---|---|---|
| /walmart/autocomplete | query | 1 |
| /walmart/search | query | 1 |
X (Twitter)
| Endpoint | Parameter | Credits |
|---|---|---|
| /twitter/transcript | url | 5 |
OpenAPI file
The whole API is described in an OpenAPI 3.1 file, generated from the same endpoint list as this page, so it cannot drift. Import it into Postman, Insomnia or a code generator: https://scrapingrabbit.com/openapi.json