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

# API Token

> Connect Parable to Ahrefs using an API token

export const platform_1 = "Ahrefs"

export const limit_0 = "500 rows/request default; monthly API unit limits vary by plan"

export const platform_0 = "Ahrefs"

export const role_0 = undefined

export const tokenName_0 = "API token"

<Tabs>
  <Tab title="Setup">
    <Card title="What You'll Need" icon="key">
      | Credential    | What it is                       |
      | ------------- | -------------------------------- |
      | **API Token** | Bearer token from Ahrefs account |
    </Card>

    ## Overview

    Connect Parable to Ahrefs for SEO and content marketing analytics.

    <CardGroup cols={2}>
      <Card title="SEO Data" icon="magnifying-glass">
        Backlinks, keywords, rankings
      </Card>

      <Card title="Site Metrics" icon="chart-line">
        Domain ratings, traffic estimates
      </Card>
    </CardGroup>

    ## Prerequisites

    <Info>
      **Setup access in {platform_0}.** These steps require **{role_0}**, or a colleague with equivalent permissions who can create credentials for you.

      If that is not you, ask your {platform_0} administrator.
    </Info>

    * Any paid plan (Lite, Standard, Advanced, or Enterprise) includes API access
    * Account owner or admin role

    ## Setup Guide

    <Steps>
      <Step title="Access Account Settings">
        1. Log in to Ahrefs
        2. Click your avatar → **Account Settings**
        3. Navigate to **API** tab
      </Step>

      <Step title="Generate API Token">
        1. Find **API key** section
        2. Click **Generate** if no key exists
        3. Copy the API token

        <Warning>
          **Copy your {tokenName_0} now!**

          This is the only time it will be displayed. Store it in a secure password manager before closing this page.
        </Warning>
      </Step>

      <Step title="Enter values in the form">
        1. **API Token**: Paste your Ahrefs API token.
        2. Click **Save & test connection**.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Reference">
    ## Verify Your Setup

    <CodeGroup>
      ```bash Test Authentication theme={null}
      curl -H "Authorization: Bearer YOUR_TOKEN" \
        "https://api.ahrefs.com/v3/subscription-info"
      ```
    </CodeGroup>

    <Check>
      **Success!** If you received a `200 OK` response with valid data, your credentials are configured correctly. You can now proceed to configure this connector in Parable.
    </Check>

    <Tip>
      **Rate Limits:** {platform_1} enforces rate limits of **{limit_0}**.

      Parable handles rate limiting automatically with exponential backoff, but initial syncs of large datasets may take longer due to these limits.
    </Tip>

    ## Troubleshooting

    | Error                  | Meaning             | Solution                |
    | ---------------------- | ------------------- | ----------------------- |
    | `401 Unauthorized`     | Invalid token       | Verify token is correct |
    | `402 Payment Required` | Plan limit exceeded | Check row/query quotas  |
    | `429 Rate Limited`     | Too many requests   | Implement backoff       |

    ## Additional Resources

    <CardGroup cols={2}>
      <Card title="Ahrefs API" icon="book" href="https://docs.ahrefs.com/api/">
        Official API documentation
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
