Authentication
Every request carries an API key from your dashboard. Keys belong to the account, spend its balance, and can be revoked one at a time.
Every request carries an API key from your dashboard. Keys belong to the account, spend its balance, and can be revoked one at a time.
API keys
Create and revoke keys under Dashboard → Developers → API keys. A key looks like sk_live_… and is shown in full once, when you create it.
Every key spends the same account balance and sees the same watchlists, webhook endpoints and export settings.
Use one key per environment or service, so you can revoke one without touching the others.
The request rate limit counts per key; concurrency is per account (Rate limits & concurrency).
Keep keys server-side
A key spends your credits. Never put one in browser or mobile code: call Scrapely from your backend and read the key from an environment variable.
Sending the key
Method | Example | When |
|---|---|---|
Bearer header |
| Recommended. |
API key header |
| For clients that reserve |
Query parameter |
| Only for clients that cannot set headers: query strings end up in logs. |
GET /v1/platforms and the OpenAPI document are public; everything else needs a key. A cheap way to check one is GET /v1/account, which is free and returns the balance.
- cURL
- Python
- Node.js
curl "https://api.scrapelyserp.com/v1/account" \
-H "Authorization: Bearer $SCRAPELY_API_KEY"import os
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}
r = requests.get(
"https://api.scrapelyserp.com/v1/account",
headers=HEADERS,
timeout=30,
)
r.raise_for_status()
data = r.json()
print(data["balance"])const res = await fetch('https://api.scrapelyserp.com/v1/account', {
headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
console.log(data.balance);Full reference → GET /v1/account
When authentication fails
Answer | Means |
|---|---|
| No key, or the key is unknown or revoked. Nothing was charged. |
| The key belongs to the public, read-only demo workspace. Use your own account's key. |
| Too many calls (or repeated failures) in a short window. Honour |