Authentication

The QuantSearch API uses API keys for authentication. API access is available on Pro and Enterprise plans.

Getting API Keys

  1. Go to your Dashboard → API Keys
  2. Click Create API Key
  3. Give it a name (e.g., "Production", "Staging")
  4. Copy the key immediately - it won't be shown again

Security Warning

Never expose API keys in client-side code. Use them only in server-side applications.

Using API Keys

Include your API key in the Authorization header:

Authorization: Bearer qs_live_abc123def456...

Example request:

curl https://www.quantsearch.ai/api/sites \
  -H "Authorization: Bearer qs_live_abc123def456..."

Key Prefixes

Prefix Environment
qs_live_ Production keys
qs_test_ Test/staging keys

Key Permissions

API keys have full access to your organization's resources:

  • Create, read, update, delete sites
  • Start and manage crawl jobs
  • Ingest and delete content
  • Query search and chat APIs

Revoking Keys

If a key is compromised:

  1. Go to Dashboard → API Keys
  2. Find the key and click Revoke
  3. Create a new key and update your applications

Revoked keys are rejected immediately.

Error Responses

Status Meaning
401 Unauthorized Missing or invalid API key
403 Forbidden Key doesn't have access to this resource

Best Practices

  • Use environment variables for API keys, never hardcode them
  • Use separate keys for production and staging
  • Rotate keys periodically
  • Monitor API usage in your dashboard