Ahrefs Connection Guide

Overview

Maton connects to Ahrefs with an API key and calls Ahrefs API v3: Site Explorer, Keywords Explorer, SERP Overview, Rank Tracker, Site Audit, Brand Radar, Batch Analysis, Web and Bot Analytics, and social media management.

What You'll Need

  • An Ahrefs workspace where you are an owner or admin (only they can create API keys).
  • For most data, a plan that includes the API (Enterprise, or the API add-on). Other paid plans get free test queries, and a key scoped to public endpoints only reaches the free Domain Rating and crawler IP endpoints.

Step 1: Create an API Key

  1. Log in to Ahrefs and open Account settings → API keys.
  2. Create a key and choose its expiration date. You can also set a monthly API unit limit for it here, which is a good idea while you try things out.
  3. Copy the key.

Step 2: Connect Ahrefs

  1. Go to the Connections page, click "Add Connection", find Ahrefs and click "+ Connect". With the Maton CLI, run maton connection create ahrefs instead; it opens the same form.
  2. Paste the key under API Key and click "Connect".
  3. The Ahrefs connect form
  4. Maton checks the key with a free Domain Rating request, so connecting costs no API units. When it's accepted you'll see "Success", and the connection appears as active on the Connections page.

Troubleshooting

  • The form says Ahrefs did not validate your credentials: check that you copied the whole key and that it hasn't expired or been deleted. A key stops working when the user who created it leaves the workspace.
  • Calls return HTTP 403 or say the plan doesn't include the API: the key's workspace has no API access for that report, or the key is limited to public endpoints. Free test queries (targets such as ahrefs.com) still work on paid plans.
  • Calls fail with HTTP 429: Ahrefs allows 60 requests a minute by default. Wait a moment and retry more slowly.

Keeping Your Ahrefs Data Safe

Most Ahrefs API requests spend API units from your workspace's monthly allowance, and units aren't refundable. Set a unit limit on the key in Ahrefs. Deleting the connection in Maton removes the stored key; delete the key in Ahrefs to revoke it everywhere.