Authentication
FairCrawl uses bearer API keys on the public API surface.
Header
Authorization: Bearer fc_live_xxxImportant behavior
- API keys are org-scoped, not just user-scoped
- billing, rate limits, and job history attach to the authenticated org
- API key creation requires a payment method on file
- the same key works across the crawl, freshness, and docs discovery routes
Smoke test your auth
List the live endpoint catalog
```bash
curl https://api.faircompany.ai/v1/crawl/endpoints \
-H "Authorization: Bearer fc_live_xxx"
```
```ts
import FairCrawl from "faircrawl";
const fc = new FairCrawl({ apiKey: process.env.FAIRCRAWL_API_KEY || "fc_live_xxx" });
const catalog = await fc.endpoints();
console.log(catalog.total);
console.log(catalog.platforms.web);
```
```python
from faircrawl import FairCrawl
import httpx
import os
api_key = os.environ.get("FAIRCRAWL_API_KEY", "fc_live_xxx")
response = httpx.get(
"https://api.faircompany.ai/v1/crawl/endpoints",
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
response.raise_for_status()
print(response.json()["total"])
```
```json
{
"tool": "faircrawl_scrape",
"arguments": {
"url": "https://faircrawl.ai/docs/getting-started/authentication/",
"format": "markdown"
}
}
```
API key hygiene
- keep keys in env vars, not source files
- rotate keys per environment or workload
- use dedicated keys for agents, cron jobs, and production apps
- revoke keys from the FairCrawl app when a workload is retired
Related routes
GET /v1/crawl/endpointsGET /v1/crawl/jobsGET /v1/crawl/usage