Ahrefs helps you track how your website is performing by bringing real-time site metrics, backlinks data, and position metrics and analyze against your competitors. To help you make data-driven decisions for your SEO strategy.


In this article we will see:

  1. How to integrate Ahrefs to your Workspace

  2. Available API Functions

  3. Templates


How to integrate Ahrefs to your Workspace

The first thing you will need for integration is an Ahrefs API key. Please note, you need an Ahrefs Enterprise plan to get the API key. Here's how you can get one:

Step 1: Login or Sign up on Ahrefs (https://ahrefs.com/user/login

Step 2: Click on More → Ahrefs API


Step 3: Choose an API plan


Step 4: Go to your API Profile → Copy your access token for the API


Step 5: Go to Integrations Tab → Ahrefs → Select workspace → Paste the API key. 

Note - You will need an Ahrefs Enteprise subscription to use this API.

Now that you have set up the integration, here is how you can pull in your data:

  • Go back to the Dashboard, select the stack that you want to work on, click on the 2nd column, select the option to change column property and connect with the Ahrefs API
  • Rename the column - say Domain URL (only if you want), then select 'API' as the column property, configure third-party API and pull data (you will be asked to do so)
  • Choose the Ahrefs API from your account, then select the particular name that you have given to the Ahrefs API Key. In the next field select the specific API function you want details about. Click apply.


  • Put down the URL of the Website or the Web Page for which you want the details – you can actually put in the entire list at one go or go one-by-one.

  • Click on the refresh arrow in the second column -- you will see the Ahrefs API pulling in data automatically and adding it to the relevant column (you get to decide which data you want to access by selecting it from our data explorer). 

Here's how a typical table with Keyword metrics will look like: 

This is how it will look -

Available API Functions

1. Get metrics for the URL 

Reference Input column: Website URL, Country (Optional) 

Output: Organic & Paid Keywords, Organic & Paid Traffic, Cost 

2. Get domain rating for the URL 

Reference Input column: Website URL 

Output: Domain Rating, Ahrefs Rank 

3. Get backlink details for the URL 

Reference Input column: Website URL (Subdomain supported) 

Output: Live, All-time, Ref domains, All time Ref domains 

4. Get keyword history for the domain

Reference Input column: Website URL, Date From, Date To 

Output: Top 3, Top 4-10, 11+ 

5. Get page traffic summary for the domain

Reference Input column: Website URL, Country (Optional) 

Output: Range (0,100, 1K+, 5K+, 10K+) for traffic and pages 

6. Get overview for the keyword

Reference Input column: Keyword, Country (Optional)

Output: Clicks, CPC, CPS, Difficulty, Traffic, Volume & More

7. Get SERP overview for the keyword (10 pages) 

Reference Input column: Keyword, Country (Required) 

Output: Get top 10 SERP positions for the given keyword for that country

Templates

Ahrefs SEO Audit Template: Run an SEO audit to analyze your website's performance, improve by tracking consumer's preference and increase your online presence.

Competitor Backlink Analysis Template: Track and analyze your website's performance against your competitors.