> Searlo API Docs — Authentication
> Source: https://searlo.tech/docs#authentication
> Full docs: https://searlo.tech/docs/full.md

# Authentication

All API requests require an API key, sent in the `x-api-key` header or as `Authorization: Bearer sk_...`. The same key works for the REST API and the MCP server.

### Getting Your API Key

1. Sign in at [dashboard.searlo.tech](https://dashboard.searlo.tech)
2. Go to **Dashboard → API Keys**
3. Click **Create New Key**
4. Copy and save the key immediately (shown only once)

### Using Your API Key

Keys start with `sk_`. Send it as the `x-api-key` request header on every call, or as `Authorization: Bearer sk_...`.

A key is shown once, when you create it: we keep only a hash of it, and lists show a masked preview (`sk_1a2b3c4d••••9f0e`), never the key itself.

An API key is for the data API (search, SERP, AI answers, web data, MCP) and for read-only views of its own account: the balance ([`GET /credits/balance`](#account)), usage, limits, history and `GET /user/profile`. Managing the account needs a dashboard login: creating or deleting API keys, exporting or deleting your data, payments and billing. An API key used on those routes gets `403` `API_KEY_SCOPE_FORBIDDEN`, and is not charged. A missing, invalid or expired key gets `401` `UNAUTHORIZED`.

## Code Examples

### cURL

```bash
curl "https://api.searlo.tech/api/v1/search/web?q=test" \
  -H "x-api-key: sk_your_api_key"
```

### JavaScript

```javascript
// Store key in environment variable
const API_KEY = process.env.SEARLO_API_KEY;

const response = await fetch(url, {
  headers: { "x-api-key": API_KEY }
});
```

### Python

```python
import os
import requests

API_KEY = os.environ["SEARLO_API_KEY"]

response = requests.get(url, headers={"x-api-key": API_KEY})
```


---
*From https://searlo.tech/docs — see full docs at https://searlo.tech/docs/full.md*