Docs / Authentication

Getting started

Authentication

Every request carries an API key from your dashboard, sent as a header or a query parameter.

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.

Use one key per environment or service, so you can revoke one without touching the others. Every key spends the same account balance.

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

MethodExampleNotes
Bearer headerAuthorization: Bearer sk_live_…Recommended.
API key headerX-API-Key: sk_live_…For clients that reserve Authorization.
Query parameter?api_key=sk_live_…Also accepted in a POST body. Query strings end up in logs, so prefer a header.
curl "https://api.scrapelyserp.com/v1/account" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY"

When authentication fails

A missing, unknown or revoked key is a 401 UNAUTHORIZED. Repeated failures from one address are throttled with 429 RATE_LIMITED.

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key.",
    "param": "api_key",
    "docs": "/docs/errors#unauthorized"
  }
}