Skip to main content

Get your Ahrefs API Key

1

Sign up or log in

Go to Ahrefs and sign in to your account.
2

Navigate to API Settings

  1. Click on your profile in the top right
  2. Go to “API” settings
  3. Or directly visit: https://ahrefs.com/api
3

Generate API Token

  1. Click “Generate new token” or use an existing token
  2. Copy the API token - you’ll need this for authentication
  3. Store it securely (you won’t be able to see it again)
4

Store in Corsair

Run the setup command:
When prompted, enter:
  • api_key: Your Ahrefs API token
For multi-tenant setup:

API Key Notes

Ahrefs API v3 uses the key in the Authorization: Bearer <api_key> header. Only workspace owners and admins can create API keys, and keys expire after 1 year.

Rate Limits

Ahrefs API is limited to 60 requests per minute by default. Many endpoints also consume API units based on requested fields and returned rows, with a minimum request cost unless the endpoint is marked free in Ahrefs docs. Corsair retries rate-limited responses with exponential backoff.

Required Permissions

The API key needs access to:
  • Site Explorer API - for domain metrics and backlinks data
  • Keywords Explorer API - for keyword research and metrics
Check your Ahrefs subscription to ensure API access is enabled.