Authentication
Authenticate every request with your ScrapeReviews API key.
Overview
Every request to the API must include your API key, in the X-API-Key header or as a Bearer token in the Authorization header. Only /health is public.
Keep your API key secret
Never put your API key in client-side code or public repositories, and never share it. Anyone with the key can spend your credits: if it leaks, revoke it immediately from your dashboard.
Getting your API key
Follow these steps to obtain your API key:
Open API Keys
Go to Dashboard > API Keys.
Create a new key
Click "Create New Key", give it a name and copy the key. Save it now: it is shown only once.
API key format
API keys start with sr_ followed by a random string:
sr_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6Making authenticated requests
Send the key in either of these headers:
X-API-Key: sr_your_api_key- API key in its own headerAuthorization: Bearer sr_your_api_key- Bearer token in the Authorization header
curl "https://api.scrapereviews.com/v1/companies/www.monzo.com" \
-H "X-API-Key: sr_your_api_key"Managing keys
In Dashboard > API Keys you can create several keys, name them and revoke any of them: a revoked key stops working immediately. All the keys of your account share the same credit balance.
Authentication errors
If authentication fails, you receive one of these errors (they cost no credits):
| Status Code | Error | Description |
|---|---|---|
| 401 | missing_api_key | No API key in the request |
| 401 | invalid_api_key | The API key does not exist or has been revoked |
| 402 | insufficient_credits | The key is valid but your credit balance is 0 |
See Error Handling for every error code.
Best practices
Use environment variables
Keep the key out of your code: the SDKs and the MCP server read it from SCRAPEREVIEWS_API_KEY.
Use different keys for different environments
Create separate keys for development, staging and production, so you can revoke one without stopping the others.
Rotate keys periodically
Create a new key, deploy it, then revoke the old one.
Never expose keys client-side
Call the API from your server, not from browser JavaScript, where anyone can read the key.