Ahrefs is an SEO platform for backlink analysis, keyword research, rank tracking, and site audits. The Ahrefs connector reads Ahrefs API v3: Domain Rating, backlinks, referring domains, anchors, organic keywords, top pages, and competitors from Site Explorer; keyword metrics and ideas from Keywords Explorer; Google results from SERP Overview; your Rank Tracker and Site Audit projects; and your API unit usage.
Power end-to-end data operations for your Ahrefs API with Nexla. Our bi-directional Ahrefs connector is purpose-built for Ahrefs, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Ahrefs or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Ahrefs workflows fast, secure, and fully governed.
Features
Type: API
SourceDestination
Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Sign in to Ahrefs as a workspace owner or admin. Only owners and admins can see the API keys section.
Go to Account settings > API keys (app.ahrefs.com/account/api-keys), and create a key.
Choose an expiration date, copy the key, and store it securely.
For details, see Ahrefs' API keys creation and management guide. A key stops working on its expiration date, and also when the user who created it is removed from the workspace. On the same page you can cap how many API units each key may use per month.
Ahrefs bills API units for most requests
Ahrefs charges API units for each request: the number of rows returned times the cost of the fields requested, with a minimum of 50 units per request. Most fields cost 1 unit per row, and some, such as traffic, volume, and difficulty, cost 10. The list templates below have small default row limits, and each template lists its approximate cost with the default settings. Keep Max Rows and Fields small, and check your usage with the Get API Limits and Usage template, which is free.
These endpoints are free: Get API Limits and Usage, List Projects, List Project Keywords, Get Rank Tracker Overview, and List Site Audit Projects. List Site Audit Issues costs a fixed 50 units per request.
Ahrefs also offers free test queries on any paid plan: Site Explorer requests for ahrefs.com, yep.com, or firehose.com (or any URL on those domains), and Keywords Explorer and SERP Overview requests for only the keyword ahrefs, yep, or firehose, use no units. The templates default to these targets and keywords, so you can test them for free; change Target or Keywords to analyze your own data.
The Rank Tracker and Site Audit templates (List Projects, List Project Keywords, Get Rank Tracker Overview, List Site Audit Projects, and List Site Audit Issues) read your Ahrefs projects, which needs an Ahrefs plan with API access to projects. On lower plans Ahrefs returns HTTP 403 with the error Insufficient plan.
Ahrefs API v3 key sent as Authorization: Bearer <key>. The connection test reads subscription limits and usage, which costs no API units.
Field
Required
Secret
Description
API Key
Yes
Yes
Ahrefs API v3 key from Account settings > API keys (app.ahrefs.com/account/api-keys; workspace owners and admins only). Paste the key only, without 'Bearer '.
After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Paste your Ahrefs API key into the API Key field. Nexla sends it in the Authorization header as Bearer <key>; enter only the key, without Bearer.
The API key is sensitive and should be kept secure. If it is exposed or expires, create a new key in Ahrefs under Account settings > API keys, and update this credential.
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
Nexla tests the credential by reading your subscription's API limits and usage, which uses no API units.
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Ahrefs connector tile, then select the credential that will be used to connect to your Ahrefs workspace, and click Next; or, create a new Ahrefs credential for use in this flow.
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Ahrefs endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below, grouped by area.
Each template makes one request per run. These Ahrefs reports take a row limit instead of pages, so templates with a Max Rows setting return at most that many rows; raise it to get more rows, at a higher unit cost. Costs below are estimates for the default settings and a target other than the free test targets; Ahrefs reports the actual cost of each request in its x-api-units-cost-total-actual response header, and requests served from Ahrefs' cache cost nothing.
Returns the live and all-time backlink and referring domain counts of a domain or URL on a date, as one record.
API units: 50 per run.
Calls GET /v3/site-explorer/backlinks-stats?target={Target}&mode={Target Mode}&date={Report Date}.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Report Date (required; default {now-1}): The date to report on, in yyyy-MM-dd format. The default, {now-1}, is yesterday.
Returns the organic and paid keyword counts, traffic, and traffic value of a domain or URL on a date, across all countries, as one record. Traffic value is in US cents.
API units: 50 per run.
Calls GET /v3/site-explorer/metrics?target={Target}&mode={Target Mode}&date={Report Date}.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Report Date (required; default {now-1}): The date to report on, in yyyy-MM-dd format. The default, {now-1}, is yesterday.
Returns the organic traffic, organic traffic value, and paid traffic of a domain or URL over time, with one record per period. Traffic value is in US cents.
API units: 31 per row, 50 minimum. The monthly default over six months costs about 200; daily grouping over the same period costs over 5,000.
Calls GET /v3/site-explorer/metrics-history?target={Target}&mode={Target Mode}&date_from={Start Date}&history_grouping={Grouping}&select=date,org_traffic,org_cost,paid_traffic.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Start Date (required; default {now-180}): The first day of the history, in yyyy-MM-dd format. The default, {now-180}, is about six months ago.
Grouping (required; default monthly): The interval between rows. Each row is billed, so daily costs the most. Options: daily, weekly, monthly.
The returned fields are fixed: date, org_traffic, org_cost, and paid_traffic.
Lists live backlinks to a domain or URL, one per referring domain, strongest referring domains first, with the source and target URL, anchor text, Domain Rating of the source, dofollow flag, and first-seen date.
API units: 6 per row with the default fields, about 150 for the default 25 rows.
Calls GET /v3/site-explorer/all-backlinks?target={Target}&mode={Target Mode}&limit={Max Rows}&select={Fields}&history=live&aggregation=1_per_domain&order_by=domain_rating_source:desc.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default url_from,url_to,anchor,domain_rating_source,is_dofollow,first_seen_link): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below.
Lists the domains with live links to a domain or URL, highest Domain Rating first, with links to the target, dofollow links, and first- and last-seen dates.
API units: 6 per row with the default fields, about 150 for the default 25 rows.
Calls GET /v3/site-explorer/refdomains?target={Target}&mode={Target Mode}&limit={Max Rows}&select={Fields}&history=live&order_by=domain_rating:desc.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default domain,domain_rating,links_to_target,dofollow_links,first_seen,last_seen): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below.
Lists the anchor texts of live links to a domain or URL, most used first, with links to the target, dofollow links, referring pages, and first-seen date.
API units: 5 per row with the default fields, about 125 for the default 25 rows.
Calls GET /v3/site-explorer/anchors?target={Target}&mode={Target Mode}&limit={Max Rows}&select={Fields}&history=live&order_by=links_to_target:desc.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default anchor,links_to_target,dofollow_links,refpages,first_seen): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below.
Lists the keywords a domain or URL ranks for in one country, by traffic, with best position, ranking URL, search volume, traffic, and keyword difficulty.
API units: 33 per row with the default fields, about 825 for the default 25 rows.
Calls GET /v3/site-explorer/organic-keywords?target={Target}&mode={Target Mode}&country={Country}&date={Report Date}&limit={Max Rows}&select={Fields}&order_by=sum_traffic:desc.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Country (required; default us): Two-letter lowercase country code (ISO 3166-1 alpha-2), e.g. us, gb, de.
Report Date (required; default {now-1}): The date to report on, in yyyy-MM-dd format. The default, {now-1}, is yesterday.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default keyword,best_position,best_position_url,volume,sum_traffic,keyword_difficulty): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, volume, sum_traffic, and keyword_difficulty cost 10 units each.
Lists the pages of a domain that get the most organic traffic in one country, with traffic, keyword count, top keyword, and its position.
API units: 14 per row with the default fields, about 350 for the default 25 rows.
Calls GET /v3/site-explorer/top-pages?target={Target}&mode={Target Mode}&country={Country}&date={Report Date}&limit={Max Rows}&select={Fields}&order_by=sum_traffic:desc.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Country (required; default us): Two-letter lowercase country code (ISO 3166-1 alpha-2), e.g. us, gb, de.
Report Date (required; default {now-1}): The date to report on, in yyyy-MM-dd format. The default, {now-1}, is yesterday.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default url,sum_traffic,keywords,top_keyword,top_keyword_best_position): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, sum_traffic costs 10 units.
Lists the domains that compete with a domain or URL for organic keywords in one country, most common keywords first, with Domain Rating, common and competitor keyword counts, share, and traffic.
API units: 15 per row with the default fields, about 150 for the default 10 rows.
Calls GET /v3/site-explorer/organic-competitors?target={Target}&mode={Target Mode}&country={Country}&date={Report Date}&limit={Max Rows}&select={Fields}&order_by=keywords_common:desc.
Target (required; default ahrefs.com): The domain or URL to analyze, for example example.com. The default, ahrefs.com, is a free test target.
Target Mode (required; default subdomains): The scope of the target: exact covers one exact URL, prefix a URL path and everything under it, domain the domain without its subdomains, and subdomains the domain with all its subdomains. Options: exact, prefix, domain, subdomains.
Country (required; default us): Two-letter lowercase country code (ISO 3166-1 alpha-2), e.g. us, gb, de.
Report Date (required; default {now-1}): The date to report on, in yyyy-MM-dd format. The default, {now-1}, is yesterday.
Max Rows (required; default 10): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default competitor_domain,domain_rating,keywords_common,keywords_competitor,share,traffic): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, traffic costs 10 units.
These templates spend API units on every run, except for the free test keywords.
Get Keyword Metrics
Returns metrics for a list of keywords in one country, with one record per keyword: search volume, keyword difficulty, CPC (in US cents), traffic potential, and parent topic.
API units: 33 per keyword with the default fields, 50 minimum.
Calls GET /v3/keywords-explorer/overview?keywords={Keywords}&country={Country}&select={Fields}.
Keywords (required; default ahrefs): A comma-separated list of keywords, for example seo,backlinks. The default, ahrefs on its own, is a free test query; any other keyword in the list makes the request billable.
Country (required; default us): Two-letter lowercase country code, e.g. us, gb, de, or all for every location.
Fields (required; default keyword,volume,difficulty,cpc,traffic_potential,parent_topic): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, volume, difficulty, and traffic_potential cost 10 units each.
Lists keyword ideas that contain the seed keywords, highest search volume first, with search volume, keyword difficulty, CPC, and traffic potential.
API units: 32 per row with the default fields, about 800 for the default 25 rows.
Calls GET /v3/keywords-explorer/matching-terms?keywords={Keywords}&country={Country}&limit={Max Rows}&select={Fields}&order_by=volume:desc.
Keywords (required; default ahrefs): A comma-separated list of keywords, for example seo,backlinks. The default, ahrefs on its own, is a free test query; any other keyword in the list makes the request billable.
Country (required; default us): Two-letter lowercase country code, e.g. us, gb, de, or all for every location.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default keyword,volume,difficulty,cpc,traffic_potential): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, volume, difficulty, and traffic_potential cost 10 units each.
Lists keywords that the top-ranking pages for the seed keywords also rank for or mention, highest search volume first, with search volume, keyword difficulty, and CPC.
API units: 22 per row with the default fields, about 550 for the default 25 rows.
Calls GET /v3/keywords-explorer/related-terms?keywords={Keywords}&country={Country}&limit={Max Rows}&select={Fields}&order_by=volume:desc.
Keywords (required; default ahrefs): A comma-separated list of keywords, for example seo,backlinks. The default, ahrefs on its own, is a free test query; any other keyword in the list makes the request billable.
Country (required; default us): Two-letter lowercase country code (ISO 3166-1 alpha-2), e.g. us, gb, de.
Max Rows (required; default 25): The most rows to return in this run. Each row is billed for every selected field, so keep it small while testing.
Fields (required; default keyword,volume,difficulty,cpc): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, volume and difficulty cost 10 units each.
Returns the latest Google search results for one keyword in one country, with one record per result: position, URL, title, result type, Domain Rating, URL Rating, backlinks, and traffic.
API units: 17 per row with the default fields. The response can hold more rows than Top Positions, so expect about 170 to 300 for the default 10 positions.
Calls GET /v3/serp-overview/serp-overview?keyword={Keyword}&country={Country}&top_positions={Top Positions}&select={Fields}.
Keyword (required; default ahrefs): One keyword. The default, ahrefs, is a free test query.
Country (required; default us): Two-letter lowercase country code (ISO 3166-1 alpha-2), e.g. us, gb, de.
Top Positions (required; default 10): The number of top organic positions to return.
Fields (required; default position,url,title,type,domain_rating,url_rating,backlinks,traffic): A comma-separated list of the fields to return. Each field costs 1 API unit per row; some cost 5 or 10, as marked in the Ahrefs reference linked below. In the default list, traffic costs 10 units.
These templates read your Ahrefs projects. They are free, but need an Ahrefs plan with API access to projects.
List Projects
Lists the Ahrefs projects in your workspace, with each project's ID, name, target URL, mode, keyword count, owner, and access. Use it first to find the Project ID that the Rank Tracker templates need.
This endpoint reads your Ahrefs projects, which needs an Ahrefs plan with API access to projects. On lower plans Ahrefs returns HTTP 403 with the error Insufficient plan. See Ahrefs pricing for what each plan includes.
List Project Keywords
Lists the keywords tracked in one Rank Tracker project, with each keyword's location, language, and tags.
API units: free.
Calls GET /v3/management/project-keywords?project_id={Project ID}.
Project ID (required): The Ahrefs project ID. Use List Projects to find it, or take the number from the Rank Tracker URL in Ahrefs (app.ahrefs.com/rank-tracker/overview/<id>).
This endpoint reads your Ahrefs projects, which needs an Ahrefs plan with API access to projects. On lower plans Ahrefs returns HTTP 403 with the error Insufficient plan. See Ahrefs pricing for what each plan includes.
Get Rank Tracker Overview
Returns the tracked keyword rankings of a Rank Tracker project on a date, with one record per keyword: position, position change, ranking URL, search volume, traffic, location, and tags.
API units: free.
Calls GET /v3/rank-tracker/overview?project_id={Project ID}&device={Device}&date={Report Date}&limit={Max Rows}&select={Fields}.
Project ID (required): The Ahrefs project ID. Use List Projects to find it, or take the number from the Rank Tracker URL in Ahrefs (app.ahrefs.com/rank-tracker/overview/<id>).
Device (required; default desktop): Desktop or mobile rankings. Options: desktop, mobile.
Report Date (required; default {now-1}): The date to report on, in yyyy-MM-dd format. The default, {now-1}, is yesterday.
Max Rows (required; default 100): The most keywords to return in this run.
Fields (required; default keyword,position,position_diff,url,volume,traffic,location,tags): A comma-separated list of the fields to return. See the Ahrefs reference linked below for the full list.
This endpoint reads your Ahrefs projects, which needs an Ahrefs plan with API access to projects. On lower plans Ahrefs returns HTTP 403 with the error Insufficient plan. See Ahrefs pricing for what each plan includes.
These templates read your Site Audit projects and need an Ahrefs plan with API access to projects.
List Site Audit Projects
Lists your Site Audit projects with their latest crawl: project ID, name, target, health score, crawled URLs, and the number of URLs with errors, warnings, and notices. Use the project ID with List Site Audit Issues.
This endpoint reads your Ahrefs projects, which needs an Ahrefs plan with API access to projects. On lower plans Ahrefs returns HTTP 403 with the error Insufficient plan. See Ahrefs pricing for what each plan includes.
List Site Audit Issues
Lists the issues found in a Site Audit project's latest crawl, with each issue's ID, name, category, importance, number of affected URLs, and change since the previous crawl.
API units: a fixed 50 per run.
Calls GET /v3/site-audit/issues?project_id={Project ID}.
Project ID (required): The Site Audit project ID. Use List Site Audit Projects to find it, or take the number from the Site Audit URL in Ahrefs (app.ahrefs.com/site-audit/<id>).
This endpoint reads your Ahrefs projects, which needs an Ahrefs plan with API access to projects. On lower plans Ahrefs returns HTTP 403 with the error Insufficient plan. See Ahrefs pricing for what each plan includes.
Returns your subscription plan, the API key's expiration date, the units used and unit limits for the key and for the workspace, and the next reset date, as one record. Use it to keep track of your API unit balance.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Ahrefs data sources can also be manually configured to ingest data from any valid Ahrefs API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Ahrefs data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.