Marketing

Ahrefs MCP Server

Connect your account, then chat with AI to run tools.

Ahrefs SEO over REST v3: 75 typed tools covering the official ahrefs-python v3 surface (Site Explorer, Keywords Explorer, Rank Tracker, Brand Radar, Site Audit, SERP overview, batch analysis, management, public metadata) plus four enum-driven Web Analytics tools (tabular, summary chart, breakdown charts, UTM) and raw GET/mutate helpers. Dashboard API key (Bearer) against api.ahrefs.com/v3.

Managed
77 tools
Agent guide included

Opens MCPBundles Studio with this server selected. After sign-in, chat and run tools from the same thread.

Browse all tools

AI Skill
SKILL.md

Domain knowledge for Ahrefs — workflow patterns, data models, and gotchas for your AI agent.

Ahrefs SEO data

Operating notes that the typed schemas alone won't tell the agent. Tool descriptions cover routes and parameter types; this skill covers the cross-tool semantics, the ID namespaces, and the column-name traps.

Site Explorer vs. Rank Tracker vs. Web Analytics — pick the right surface

  • Site Explorer answers "what do you know about this domain or URL on the public web". It needs no setup — pass any target and Ahrefs returns its indexed view (organic keywords, backlinks, top pages, traffic estimate). Use for competitor research, link audits, or one-off site lookups.
  • Rank Tracker answers "where does my tracked project rank for my chosen keywords today vs. yesterday". It requires a Rank Tracker project that the user has set up in the Ahrefs dashboard with their own keyword list, and reads return per-keyword positions for the project's tracked set only. Use for ongoing keyword monitoring, not for ad-hoc keyword research.
  • Web Analytics answers "what is happening on my own site's traffic right now" — first-party visit data the user has piped into Ahrefs's analytics product. Different namespace from Site Explorer's third-party traffic estimate.
  • Brand Radar is the AI-search lens (ChatGPT, Perplexity, Google AI Overview, Gemini): mentions, citations, share-of-voice, cited-domain discovery for tracked prompts. Standalone from the three above.
  • Site Audit is the technical-SEO crawl product. Separate project namespace, separate access (domain ownership verification), separate slug prefix in the tool list.

Three different "project" namespaces

  • Rank Tracker / Web Analytics projects share a single numeric project_id. Discover the right one by listing projects and matching the project's tracked URL to the site you care about — never guess the integer.
  • Site Audit projects live in a separate numeric namespace; a Rank Tracker project_id will not work against Site Audit endpoints and vice versa. Most Site Audit reads also require that the project's domain ownership has been verified by the account owner.
  • Brand Radar reports use a third identifier called report_id (numeric, comes from the Brand Radar report URL). Brand Radar tools never accept a Rank Tracker project_id.

Resource ids on writes go in the query string, not the body

The Rank Tracker and Brand Radar write endpoints (add/delete competitors, add/delete tracked keywords, add/delete brand radar prompts, add/delete keyword-list keywords) place project_id / report_id / keyword_list_id in the query string. The body carries only the payload (the competitors, the keywords, the prompts). The lone exception is the project access PATCH, which keeps project_id in the body. The typed tools handle this routing automatically — agents only need to pass the id as a normal argument.

Item shapes for Rank Tracker writes

Competitors and tracked keywords are object arrays, not string arrays.

  • competitors items: { "url": "<domain or url>", "mode": "domain" | "subdomains" | "exact" | "prefix" }. subdomains is the right choice for whole-brand tracking (matches www, app, m, etc.); domain excludes subdomains.
  • Tracked-keyword writes take locations as [{ "country": "us", "language": "en" }, ...] and keywords as [{ "keyword": "...", "tags": ["..."] }, ...]. tags is optional. Bare strings are rejected.

Keyword-list writes (the standalone keyword_list_id surface, distinct from project tracked keywords) take a flat keywords: ["..."] string array.

select column names per report

Each Ahrefs report has its own column identifiers and the wrong name yields HTTP 400 with the full allowed list in the response body. Three traps that bite repeatedly:

  • Site Explorer organic-keywords uses best_position and best_position_url. position and a bare url are not valid columns there.
  • Rank Tracker overview uses position and url for the tracked keyword's current rank.
  • Organic-competitors uses keywords_common, not common_keywords.

Web Analytics from_ quirk

Web Analytics tabular and chart tools accept to and from_ (trailing underscore). The trailing underscore is a Python keyword workaround; the request that goes to Ahrefs uses the documented from name. Use from_ in the tool argument; the request sent to Ahrefs uses the plain from name.

Date formats

  • Site Explorer, Rank Tracker, Keywords Explorer, Brand Radar, Web Analytics: YYYY-MM-DD and YYYY-MM-DD ranges.
  • Site Audit crawl slices: YYYY-MM-DDThh:mm:ss timestamps. Omit the date entirely to read against the latest stored crawl.

API units and free reads

Most analytics calls consume API units against the workspace's monthly limit. The subscription limits and usage tool reports the current consumption. Management reads (list projects, list competitors, list keywords, locations and languages, keyword lists) are free; project/competitor/keyword writes are also free per Ahrefs documentation. Site Explorer, Keywords Explorer, Brand Radar, and Web Analytics reads cost units per row returned — apply limit aggressively when scanning.

Discovery ordering

When asked about "ranking for a site" without an id, list projects first, match the URL, then read tracked keywords or call Site Explorer with the domain directly (Site Explorer does not require a project_id — it takes a target domain or URL plus a mode/protocol scope).

Tools in this Server (77)

Ahrefs Ba Batch Analysis Post

Pull selected SEO metrics for a batch of up to 200 targets (domains or URLs) in one call. ``targets`` is a list of objects, each with ``target`` (doma...

Ahrefs Br Ai Responses

Return raw AI-search engine responses (ChatGPT, Perplexity, Gemini, Google AI Overview, etc.) captured for the prompts tracked in a Brand Radar report...

Ahrefs Br Cited Domains

Return the external domains that AI search engines are citing alongside (or instead of) the tracked brand for the report's prompts, with citation coun...

Ahrefs Br Cited Pages

Return the individual pages (URLs) that AI search engines cite in answers to the report's prompts, with citation counts. One step deeper than the cite...

Ahrefs Br Impressions History

Time-series of AI-search impressions (the brand was mentioned or cited in an answer) for the report's tracked prompts, bucketed by day. Use this to ch...

Ahrefs Br Impressions Overview

Aggregated total of AI-search impressions for the report's tracked prompts over the given window — one number you can put on a dashboard. Use the impr...

Ahrefs Br Mentions History

Time-series of brand *mentions* (the brand name appeared in the answer text) for the report's prompts, bucketed by day. ``Mention`` differs from ``cit...

Ahrefs Br Mentions Overview

Aggregated total of AI-search mentions of the brand for the report's prompts over the given window. Use the mentions-history sibling for the daily ser...

Ahrefs Br Sov History

Time-series of share-of-voice across AI search engines: the percentage of answers to the report's tracked prompts that mention or cite the brand vs. c...

Ahrefs Br Sov Overview

Aggregated share-of-voice for the brand across AI search engines over the given window — one number per engine/country, plus the competing brands' sha...

Ahrefs Get V3

Escape-hatch GET against any documented Ahrefs v3 endpoint when no typed tool covers it (or when a new endpoint hasn't been wired up yet). ``resource_...

Ahrefs Ke Matching Terms

Return keywords that contain the seed term as a substring or phrase match — Ahrefs's Keywords Explorer 'Matching terms' report. Use this to expand a s...

Ahrefs Ke Overview

Return Keywords Explorer overview metrics for one or many keywords: monthly search volume, Keyword Difficulty (KD), CPC, traffic potential of the top-...

Ahrefs Ke Related Terms

Return keywords *semantically* related to the seed term — Ahrefs's 'Related terms' report. Casts a wider net than matching-terms (which is a substring...

Ahrefs Ke Search Suggestions

Return Google-autocomplete-style suggestions that *start with* the seed phrase — the phrases users actually type when their query begins with this wor...

Ahrefs Ke Volume By Country

Return per-country search volume for a single keyword — every country Ahrefs has data for, with each country's monthly volume. Use this to decide whic...

Ahrefs Ke Volume History

Return monthly search-volume time series for a single keyword over the requested history window. Use this to detect seasonality (e.g. ``halloween cost...

Ahrefs Mg Brand Radar Prompts

List the AI-search prompts currently tracked in a Brand Radar report, with each prompt's text, country scope, and id. ``report_id`` (numeric, from the...

Ahrefs Mg Brand Radar Prompts Delete Put

Remove tracked AI-search prompts from a Brand Radar report. ``report_id`` (numeric) selects the report; ``prompts`` is the list of prompt strings to d...

Ahrefs Mg Brand Radar Prompts Post

Add custom AI-search prompts to an existing Brand Radar report so Ahrefs starts tracking the report's brand presence in answers to those prompts acros...

Ahrefs Mg Keyword List Keywords

Return the keywords stored in a saved Keywords Explorer keyword list, with the list's metadata. ``keyword_list_id`` (numeric) selects the list. Use th...

Ahrefs Mg Keyword List Keywords Delete Put

Remove keywords from a saved Keywords Explorer keyword list. ``keyword_list_id`` (numeric) selects the list and ``keywords`` is the flat array of keyw...

Ahrefs Mg Keyword List Keywords Put

Append keywords to a saved Keywords Explorer keyword list. ``keyword_list_id`` (numeric) selects the list — discover it via the matching read tool. ``...

Ahrefs Mg Locations

Return the list of locations Ahrefs supports for a given country: country/region/city labels with their numeric ``location_id`` and ``language_code``....

Ahrefs Mg Project Competitors

List the competitors currently tracked for a Rank Tracker project: each row has ``url`` and ``mode`` (``domain`` / ``subdomains`` / ``exact`` / ``pref...

Ahrefs Mg Project Competitors Delete Post

Remove tracked competitors from a Rank Tracker project. ``project_id`` is the numeric Rank Tracker project id; ``competitors`` is an object array of i...

Ahrefs Mg Project Competitors Post

Add competitors to a Rank Tracker project so Ahrefs starts collecting their tracked-keyword rankings alongside the project's own. ``project_id`` is th...

Ahrefs Mg Project Keywords

List the keywords currently tracked in a Rank Tracker project. Each row has the keyword text, location id, language, country, and tags. One keyword tr...

Ahrefs Mg Project Keywords Delete Put

Remove tracked keywords from a Rank Tracker project. ``project_id`` is the numeric Rank Tracker project id; ``keywords`` is an object array of ``{keyw...

Ahrefs Mg Project Keywords Put

Add tracked keywords to a Rank Tracker project. ``project_id`` is the numeric Rank Tracker project id; ``locations`` is an object array of ``{country,...

Ahrefs Mg Projects

List the workspace's Rank Tracker / Web Analytics projects with their numeric ``project_id``, tracked URL, mode, access, ownership, and whether they h...

Ahrefs Mg Projects Post

Create a new Rank Tracker / Web Analytics project. ``url`` is the target site, ``protocol`` is ``http`` or ``https``, ``mode`` is the target scope (``...

Ahrefs Mg Update Project Patch

Change the ``access`` setting of a Rank Tracker / Web Analytics project to ``private`` or ``public``. ``project_id`` (numeric) selects the project. No...

Ahrefs Mutate V3

Escape-hatch write (POST / PUT / PATCH / DELETE) against any documented Ahrefs v3 endpoint when no typed write tool covers it. ``resource_path`` is th...

Ahrefs Pub Crawler Ip Ranges

Return the published CIDR ranges that AhrefsBot crawls from. Use this when configuring firewall, WAF, or robots.txt allow-rules so Ahrefs's crawler is...

Ahrefs Pub Crawler Ips

Return the explicit individual IP addresses currently in use by AhrefsBot. Prefer the sibling crawler-ip-ranges tool for CIDR-based allowlisting; use ...

Ahrefs Rt Competitors Overview

Return aggregated rank-tracker stats for the project's tracked competitors and the project itself: average position, share-of-voice, visibility %, tra...

Ahrefs Rt Competitors Pages

Return per-page rankings for the project's tracked competitors — which exact URLs rank for which tracked keywords, with positions and traffic estimate...

Ahrefs Rt Competitors Stats

Side-by-side rank-bucket summary for the project's tracked competitors: keyword counts in positions 1-3, 4-10, 11-20, 21-50, 51-100, plus average posi...

Ahrefs Rt Overview

Return per-keyword rankings for the project itself (not competitors). One row per tracked keyword × location: ``position`` (current rank), ``url`` (th...

Ahrefs Rt Serp Overview

For each keyword tracked in the project, return the SERP top-10 organic results plus the SERP features rendered (AI Overview, Featured Snippet, People...

Ahrefs Sa Issues

Aggregate technical-SEO issue summary for a Site Audit crawl: counts of broken links, 4xx/5xx pages, redirect chains, missing titles/descriptions, slo...

Ahrefs Sa Page Content

Return the captured rendered content of one URL from a Site Audit crawl: title, meta description, H1/H2 structure, canonical, OpenGraph/Twitter tags, ...

Ahrefs Sa Page Explorer

Filterable list of every page in a Site Audit crawl with its full set of crawl metrics (status code, content type, HTTP/HTTPS, canonical, indexability...

Ahrefs Sa Projects

List the workspace's Site Audit projects with their numeric ``project_id``, target URL, last crawl timestamp, and ownership-verification status. Site ...

Ahrefs Se All Backlinks

Return individual backlinks pointing to the target — one row per link with source URL, anchor text, target URL, dofollow/nofollow, link type (text / i...

Ahrefs Se Anchors

Return the anchor-text distribution of incoming backlinks to the target: each distinct anchor phrase with its referring-page count, referring-domain c...

Ahrefs Se Backlinks Stats

Aggregate backlink counters for the target: total backlinks, dofollow backlinks, referring domains, referring IPs, referring subnets, plus new vs lost...

Ahrefs Se Broken Backlinks

Return backlinks pointing to pages on the target that currently 4xx or 5xx — a list of broken-link reclamation opportunities. Each row has the source ...

Ahrefs Se Domain Rating

Return the target's current Domain Rating (DR) — Ahrefs's 0-100 estimate of domain-level backlink authority — plus the inputs used to compute it (dofo...

Ahrefs Se Domain Rating History

Return Domain Rating (DR) over time for the target — a daily/weekly time series. Use to chart whether the target's overall backlink authority is trend...

Ahrefs Se Keywords History

Time series of the target's organic-keyword count: how many keywords the target ranked for in each historical period. Use to chart organic visibility ...

Ahrefs Se Linked Anchors External

Return the anchor texts the target uses on its **outbound** external links (links *from* the target *to* other sites). Each row is one anchor phrase w...

Ahrefs Se Linked Anchors Internal

Return the anchor texts the target uses on its **internal** links (target → target navigation). Each row is one anchor phrase with the count of intern...

Ahrefs Se Linkeddomains

Return the external domains the target links *to* (outbound link partners), with the number of pages on the target that link to each one and total dof...

Ahrefs Se Metrics

Ahrefs Site Explorer snapshot metrics for a domain or URL on a given day (organic/paid counts, traffic estimates, etc.). No select argument—Ahrefs ret...

Ahrefs Se Metrics By Country

Return the headline SEO metrics (organic traffic, organic keywords, traffic value) broken down by country — one row per country Ahrefs has data for. U...

Ahrefs Se Metrics History

Time series of the target's headline SEO metrics: organic traffic, organic keywords, and traffic value over the requested history window. Use to chart...

Ahrefs Se Organic Competitors

Return the domains that rank for the same organic keywords as the target — Ahrefs's organic-competitors discovery report. Each row has the competitor ...

Ahrefs Se Organic Keywords

Site Explorer: organic search terms a domain or URL ranks for on a given day. Use best_position and best_position_url in select for ranking URL—not th...

Ahrefs Se Outlinks Stats

Aggregate counters for the target's outbound links: total external links, dofollow external links, unique linked-to domains, and internal-vs-external ...

Ahrefs Se Pages By Backlinks

Return the target's pages ranked by inbound-backlink count — which URLs on the target attract the most links. Each row has the page URL, total backlin...

Ahrefs Se Pages By Internal Links

Return the target's pages ranked by **internal**-link count — which URLs on the target receive the most internal links from other pages on the same si...

Ahrefs Se Pages By Traffic

Return the target's pages ranked by estimated organic search traffic. Each row has the page URL, traffic, top organic keyword, position for that keywo...

Ahrefs Se Pages History

Time series of the target's indexed-page count over the requested history window. Use to chart whether the site is growing or pruning content; pair wi...

Ahrefs Se Paid Pages

Return the target's pages running paid search ads (Google Ads / Bing Ads), with estimated paid traffic, paid keywords driving the page, and paid traff...

Ahrefs Se Refdomains

Return the **inbound** referring domains that link to the target — one row per linking domain (deduped, unlike all-backlinks which is one row per link...

Ahrefs Se Refdomains History

Time series of referring-domain count for the target over the history window. Use to chart whether the target's link-acquisition rate is steady, accel...

Ahrefs Se Top Pages

Return the target's top organic-traffic pages — the canonical 'best pages on this site' report. Each row has the page URL, estimated organic traffic, ...

Ahrefs Se Total Search Volume History

Time series of the *total* monthly search volume across every keyword the target ranks for, over the history window. Use this to detect demand-side sh...

Ahrefs Se Url Rating History

Time series of URL Rating (URL-level authority, 0-100) for a specific URL over the history window — the page-level companion to domain-rating-history....

Ahrefs Sov Serp Overview

Standalone SERP overview for any keyword (not tied to a Rank Tracker project): the live top-10 organic results, the SERP features rendered (AI Overvie...

Ahrefs Sub Limits And Usage

Return the workspace's Ahrefs subscription tier, monthly API unit limit, current consumption (workspace-wide and per API key), units-reset date, and A...

Ahrefs Wa Breakdown Chart

Ahrefs Web Analytics: dimensional breakdown chart. Picks one of 15 GET *-chart endpoints; optional values_to_chart is sent under the Ahrefs parameter ...

Ahrefs Wa Summary Chart

Ahrefs Web Analytics: site-wide time-series chart (GET web-analytics/chart).

Ahrefs Wa Table Report

Ahrefs Web Analytics: tabular breakdown report. Chooses one of 16 GET endpoints under web-analytics/ (browsers, cities, sources, top pages, etc.) via ...

Ahrefs Wa Utm Report

Ahrefs Web Analytics: UTM dimension table or chart (GET utm-params / utm-params-chart). Use report_format=chart with granularity; optional values_to_c...

Frequently Asked Questions

What is the Ahrefs MCP server?

Ahrefs SEO over REST v3: 75 typed tools covering the official ahrefs-python v3 surface (Site Explorer, Keywords Explorer, Rank Tracker, Brand Radar, Site Audit, SERP overview, batch analysis, management, public metadata) plus four enum-driven Web Analytics tools (tabular, summary chart, breakdown charts, UTM) and raw GET/mutate helpers. Dashboard API key (Bearer) against api.ahrefs.com/v3. It provides 77 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect Ahrefs to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/ahrefs. Authentication is handled automatically.

How many tools does Ahrefs provide?

Ahrefs provides 77 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does Ahrefs require?

Ahrefs uses API Key. Ahrefs requires credentials. Connect via MCPBundles and authentication is handled automatically.

Setup Instructions

Connect Ahrefs to any MCP client in minutes

https://mcp.mcpbundles.com/bundle/ahrefs

One-click install:

The link prefills the Add custom connector dialog — you still review the values and click Add, then Connect to complete OAuth.

Or add manually

  1. Open claude.ai → Settings → Connectors.
  2. Click the + button and choose Add custom connector.
  3. Set Name to Ahrefs and paste the MCP URL into Remote MCP server URL.
  4. Click Add. Ahrefs will appear under Not connected — select it and click Connect to complete OAuth.
Name: Ahrefs
Remote MCP server URL: https://mcp.mcpbundles.com/bundle/ahrefs
Authentication: OAuth

Custom connectors at claude.ai require a paid Claude plan (Pro, Max, Team, or Enterprise).

Ready to use Ahrefs?

Sign in to connect your credentials and start running tools from the chat.

Ahrefs MCP Server & Skill — 77 Tools