All docs
Connect

Ahrefs: connect your Ahrefs account for backlink, keyword and rank research

TL;DR

Ahrefs asks for one permission, apiv3-integration-apps, through Ahrefs Connect (OAuth with PKCE). The agent has 30 tools (28 reads, 2 changes). Ahrefs is in a pilot: it is open to selected workspaces while Ahrefs reviews Agent Planners for Ahrefs Connect, and until Ahrefs activates the app only Ahrefs' free test queries run (ahrefs.com, yep.com and firehose.com as targets; ahrefs, yep and firehose as keywords).

What you need

  • A paid Ahrefs plan (Lite, Standard, Advanced or Enterprise) — every call uses its monthly API units.
  • Agent Planners activated by Ahrefs — while Ahrefs reviews the app, Ahrefs is a pilot for selected workspaces and only free test queries run.

Connect step by step

  1. 1Open Integrations → Ahrefs and press Connect Ahrefs.
  2. 2Sign in with your Ahrefs account and approve access on Ahrefs' consent screen.
  3. 3The card shows your plan and this month's API units. A teammate who connects adds their own connection; connecting again updates yours in place.
An Ahrefs sign-in lasts one year and cannot be renewed automatically — the card says when to Re-authorize. To end the app's access in Ahrefs, remove it under Ahrefs → Account settings → Applications.

For the operator: Ahrefs Connect setup

  1. 1Apply to Ahrefs Connect (docs.ahrefs.com → Ahrefs Connect → How to apply); Ahrefs then shows the staging and production client ids and secrets under Account settings → Ahrefs Connect.
  2. 2Register the redirect URI https://www.agentplanners.com/api/oauth/ahref/callback for both the staging and the production app.
  3. 3Set AHREFS_STAGING_CLIENT_ID / AHREFS_STAGING_CLIENT_SECRET and AHREFS_CLIENT_ID / AHREFS_CLIENT_SECRET on the deployment; AHREFS_OAUTH_ENV picks staging (default) or production.
  4. 4Submit the app for Ahrefs' review (connection flow screenshots, an unedited recording of the sign-in, the endpoints used and how units are saved); once Ahrefs activates it, switch AHREFS_OAUTH_ENV to production.

Tools

ToolKindWhat it does
ahrefs.limits_and_usageReadThe connected Ahrefs plan and its API units: the workspace's monthly limit and usage, this app's cap and usage, the reset date and when the connection expires. Free.
ahrefs.domain_ratingReadDomain Rating and Ahrefs Rank of a site on a date.
ahrefs.site_metricsReadOrganic and paid search metrics of a site (keywords, traffic, traffic value — USD cents).
ahrefs.backlinks_statsReadBacklink and referring-domain counts (live and all time).
ahrefs.backlinksReadBacklinks of a site or page (default fields url_from, url_to, anchor, domain_rating_source, traffic, is_dofollow, first_seen, last_seen).
ahrefs.refdomainsReadReferring domains (default fields domain, domain_rating, dofollow_links, links_to_target, first_seen, last_seen).
ahrefs.anchorsReadAnchor texts pointing at a site.
ahrefs.organic_keywordsReadKeywords a site ranks for in Google (default fields keyword, best_position, best_position_url, volume, sum_traffic, keyword_difficulty, cpc).
ahrefs.top_pagesReadA site's pages by organic traffic (default fields url, sum_traffic, keywords, top_keyword, top_keyword_best_position, value).
ahrefs.organic_competitorsReadSites competing for the same organic keywords (default fields competitor_domain, keywords_common, keywords_competitor, share, traffic, domain_rating).
ahrefs.metrics_historyReadOrganic / paid traffic and cost over time.
ahrefs.domain_rating_historyReadDomain Rating over time.
ahrefs.keywords_overviewReadSearch volume, difficulty, CPC (USD cents), clicks and traffic potential of keywords (default fields keyword, volume, difficulty, cpc, traffic_potential, global_volume, intents, parent_topic).
ahrefs.matching_termsReadKeyword ideas containing the seed terms.
ahrefs.related_termsReadRelated keyword ideas (also rank for / also talk about).
ahrefs.search_suggestionsReadSearch-box suggestions for the seed keywords.
ahrefs.keyword_volume_historyReadMonthly search volume of ONE keyword over time.
ahrefs.serp_overviewReadThe Google results page for ONE keyword with each result's metrics (default fields position, url, title, domain_rating, url_rating, backlinks, refdomains, traffic, keywords, type).
ahrefs.list_projectsReadThe connected account's Rank Tracker projects (project_id, name, target url, keyword count). Free.
ahrefs.list_project_keywordsReadThe keywords tracked in one Rank Tracker project (with location and tags). Free.
ahrefs.list_project_competitorsReadThe competitors of one Rank Tracker project. Free.
ahrefs.rank_tracker_overviewReadTracked keyword positions of a Rank Tracker project on a date, with the change since date_compared (default fields keyword, position, position_prev, position_diff, url, volume, traffic, location). Free.
ahrefs.rank_tracker_competitorsReadCompetitors' positions on the tracked keywords of a Rank Tracker project. Free.
ahrefs.site_audit_projectsReadSite Audit projects with their health score and URLs with errors / warnings / notices.
ahrefs.site_audit_issuesReadThe issues a Site Audit project found (name, importance, pages affected, new / removed since date_compared).
ahrefs.site_audit_pagesReadPages of a Site Audit crawl, optionally only those with one issue (Page explorer).
ahrefs.batch_analysisReadDomain Rating, backlinks, referring domains and organic metrics for up to 100 sites or pages in ONE request (cheaper than one call each).
ahrefs.getReadAny documented GET of Ahrefs API v3 by path on the connection (e.g. site-explorer/pages-history, keywords-explorer/volume-by-country, management/locations) — site-explorer, keywords-explorer, serp-overview, rank-tracker, site-audit, subscription-info and management only (never the Traffic Analytics add-on).
ahrefs.add_project_keywordsChange (approval)Add keywords to a Rank Tracker project (they count against the Ahrefs plan's tracked keywords).
ahrefs.remove_project_keywordsChange (approval)Remove tracked keywords from a Rank Tracker project — their ranking history in that project goes with them, so a PERSON decides on every lane.

What waits for a person

  • Under your approval setting: adding keywords to a Rank Tracker project (they count against the plan's tracked keywords).
  • Always a person's decision: Removing tracked keywords from an Ahrefs Rank Tracker project deletes their ranking history in that project — a PERSON approves it on every lane, even with auto-approve on.
  • Never changed: projects, keyword lists, competitors, Brand Radar and account settings.

Limits

  • Units: Every call uses the connected Ahrefs account's monthly API units (at least 50 a request; Rank Tracker, project lists and the usage read are free), and each answer says how many it used. The agent asks only the fields and rows a step needs (50 rows by default) and uses batch analysis for many sites.
  • Estimates: Ahrefs' traffic and keyword numbers are its own estimates — use Google Analytics and Search Console for your site's real numbers.
  • Money: CPC and traffic value come back in US cents.
  • Not covered: the Traffic Analytics add-on, Brand Radar, Web Analytics, GSC Insights, Content Helper and Ahrefs' social tools.
Ahrefs is in a pilot: it is open to selected workspaces while Ahrefs reviews Agent Planners for Ahrefs Connect, and until Ahrefs activates the app only Ahrefs' free test queries run (ahrefs.com, yep.com and firehose.com as targets; ahrefs, yep and firehose as keywords).

Frequently asked questions

Which redirect URI does Ahrefs need?
Exactly https://www.agentplanners.com/api/oauth/ahref/callback, for both the staging and the production Ahrefs Connect app.
Why does a report answer 403 while other reads work?
While Ahrefs has the app in review, only free test queries run (targets ahrefs.com, yep.com or firehose.com; keywords ahrefs, yep or firehose). Otherwise the plan may not include that report, its units may be spent, or a workspace admin capped the app.
How long does a connection last?
One year. Ahrefs issues no refresh token, so the card asks you to Re-authorize when it expires.

About this platform

Related