> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scraperize.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate requests with your API key.

Every scrape request must be authenticated with an API key. Create and manage keys in your
[dashboard](https://app.scraperize.com) under **API keys**.

## Sending your key

Send the key in the `x-api-key` header:

```bash theme={null}
curl "https://api.scraperize.com/v1/twitter/tweet?url=https://x.com/…" \
  -H "x-api-key: YOUR_API_KEY"
```

A `Bearer` token is also accepted, if that fits your HTTP client better:

```bash theme={null}
curl "https://api.scraperize.com/v1/twitter/tweet?url=https://x.com/…" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

A missing, invalid, or revoked key returns **`401 UNAUTHORIZED`**.

## Key format

Keys are a 28-character random string of letters and digits — there is **no** `live`/`test` split and no
prefix. The full secret is shown **once**, when the key is created; store it securely (an environment
variable or a secret manager). If you lose it, revoke the key and create a new one.

<Warning>
  Treat your API key like a password. Never commit it to source control or expose it in client-side code
  (browser or mobile apps). Call the API from your server.
</Warning>

## Managing keys

From the dashboard you can create multiple keys, name them, see each key's last-used time, and revoke any
key immediately. Revoking takes effect right away.
