Authentication
Every request carries your API key. One key works on every API.
Create a key
In Dashboard → API keys give the key a name and create it. The full key is shown once: we only store a hash of it, so nobody (us included) can show it again. If you lose it, create a new one and delete the old one. You can have up to 10 keys, disable them temporarily or delete them.
Every key of an account draws on the same credit balance: the 100 free monthly credits first, then the credits you bought. Keys do not have their own balance or their own price list, so any key can call any of the 4 APIs (YouTube, Google Maps, Trustpilot, Meta Ad Library).
Send the key
Send it in the X-API-Key header, or as a bearer token in the Authorization header. Both work on every endpoint and are equivalent; when both are present, X-API-Key wins.
curl "https://api.scrapecrate.com/v1/youtube/transcripts/dQw4w9WgXcQ" \
-H "X-API-Key: YOUR_API_KEY"
curl "https://api.scrapecrate.com/v1/youtube/transcripts/dQw4w9WgXcQ" \
-H "Authorization: Bearer YOUR_API_KEY"The key is never accepted as a query parameter: URLs end up in logs, browser history and proxies. The SDKs and the MCP server read it from the SCRAPECRATE_API_KEY environment variable when you do not pass it explicitly.
Authentication errors
Errors use the standard error format and are never billed:
| Status | Code | When |
|---|---|---|
| 401 | missing_api_key | No key in X-API-Key nor in Authorization: Bearer. |
| 401 | invalid_api_key | The key is wrong, disabled or deleted. |
| 403 | account_disabled | The account the key belongs to is suspended. |
| 429 | rate_limited | Over 300 requests per minute for the key; wait for Retry-After. |
{
"error": {
"code": "invalid_api_key",
"message": "Invalid or revoked API key.",
"request_id": "req_5a7c9e1b3d5f7a9c1e3b"
}
}Check a key and its balance
GET /v1/account answers with the balance of the account the key belongs to and costs nothing, so it is the simplest way to test a new key:
curl "https://api.scrapecrate.com/v1/account" -H "X-API-Key: YOUR_API_KEY"Keep keys safe
- Call the API from your server, never from a browser or mobile app where the key is visible.
- Keep keys in environment variables or a secret manager, not in source control.
- Use one key per application or environment, so you can revoke one without stopping the others.
- The dashboard shows when each key was last used and the usage of each key.
- If a key leaks, disable or delete it in the dashboard: it stops working on the next request.