Connector guide5-minute read18 MCP tools7 languages

Ahrefs to MCP: Backlink and Keyword Data for any AI Agent

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

HCBy HelpCode teamUpdated 5 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Ahrefs

Ahrefs

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

tools

18

Region

INTL

Category

Analytics

Authentication

Bearer Token

Required env vars

AHREFS_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Ahrefs in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Try asking

Example prompts for Ahrefs

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Ahrefs · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Ahrefs, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Ahrefs

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Setup

  1. API access comes with eligible paid Ahrefs plans, each with a monthly API unit allowance (see https://ahrefs.com/pricing); other plans can only run the free test queries. Only workspace owners and admins can create keys.
  2. Open Account settings → API keys (https://app.ahrefs.com/account/api-keys), create a key and consider giving it a monthly unit limit.
  3. Paste it into AHREFS_API_KEY and install the connector. The key is stored encrypted and sent as a Bearer token only to api.ahrefs.com.
  4. Start with ahrefs_get_limits_and_usage: it is free and shows your plan, the API units used and allowed this month, and the reset date.

Paid from your own Ahrefs API units: every request spends API units from your Ahrefs workspace. A request costs at least 50 units; above that, it is the unit cost of every column it asks for (1 unit by default, 5 or 10 for metrics such as traffic, volume, difficulty and referring domains) times the rows returned. With their default columns, backlinks cost 8 units per row, referring domains 6, anchors 10, organic keywords 34, top pages 24, keyword metrics 33 per keyword and a SERP overview 25 per position. Requests start at 10 rows, and the AI asks only for the columns the answer needs. Requests Ahrefs serves from its cache are free.

Free test queries: Site Explorer requests on ahrefs.com, yep.com or firehose.com and Keywords Explorer or SERP Overview requests for the keywords ahrefs, yep or firehose alone cost nothing (up to 100 rows). Use them to try a tool before you spend units.

What it does: Site Explorer (Domain Rating and Ahrefs Rank, backlink totals, organic and paid search metrics, traffic and Domain Rating history, backlinks, referring domains, anchor texts, organic keywords, top pages and organic competitors), Keywords Explorer (volume, Keyword Difficulty, CPC, traffic potential and parent topic, matching terms and questions, related terms, monthly volume history), the SERP Overview Ahrefs recorded for a keyword, and Batch Analysis of up to 100 domains or URLs in one call. Every tool only reads; Batch Analysis uses POST but changes nothing.

Parameters: most Site Explorer tools need a date (today's date for current data). country is a lower-case two-letter code. mode sets the scope of the target: subdomains (the default), domain, prefix or exact. CPC and traffic value come in USD cents.

Common errors: 401: the API key is wrong, expired or was deleted; create a new one under Account settings → API keys. 403: the plan has no API access, the key or workspace has used its unit limit, or the request is outside the plan (for example more rows than the plan allows per request). 400: a parameter is invalid, and the reason names it. 429: more than 60 requests a minute; wait and retry.

The connector does not cover Rank Tracker, Site Audit, Brand Radar, Web Analytics, GSC Insights, Social Media, Content Helper or the management endpoints (projects, keyword lists).

Prerequisites: AHREFS_API_KEY

Install the connector locally

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Open http://localhost:3000/connectors/store, pick Ahrefs and paste in the env vars listed under Prerequisites.

Available tools

ToolWhat it does
ahrefs_get_limits_and_usageShow the Ahrefs plan, the API units used and allowed this month for the key and the workspace, the reset date and the key's expiry
ahrefs_domain_ratingDomain Rating (0 to 100, strength of the backlink profile) and Ahrefs Rank of a domain on a date
ahrefs_backlinks_statsBacklink totals of a domain or URL on a date: live and all-time backlinks and referring domains
ahrefs_site_metricsOrganic and paid search metrics of a domain or URL on a date: organic keywords (all and top 3), organic traffic and its value, paid…
ahrefs_metrics_historyHistory of a domain's organic (and optionally paid) traffic and traffic value, grouped by month, week or day
ahrefs_domain_rating_historyHistory of a domain's Domain Rating, grouped by month, week or day
ahrefs_backlinksBacklinks of a domain or URL: linking page, target, anchor, Domain Rating of the source, dofollow, first and last seen
ahrefs_referring_domainsDomains linking to a domain or URL: Domain Rating, links to the target, dofollow links, first and last seen
ahrefs_anchorsAnchor texts of the links to a domain or URL with referring domains and link counts
ahrefs_organic_keywordsKeywords a domain or URL ranks for in Google on a date: best position and ranking URL, volume, traffic, difficulty, CPC
ahrefs_top_pagesPages of a domain that bring the most organic traffic on a date, with traffic value, keyword count and top keyword
ahrefs_organic_competitorsDomains competing with a target in organic search in one country: common keywords, their keywords, share and traffic
ahrefs_keywords_overviewMetrics of one or more keywords in a country: search volume, Keyword Difficulty, CPC, traffic potential and parent topic
ahrefs_matching_termsKeyword ideas that contain the words of the seed keywords (or questions with terms=questions), with volume, difficulty, CPC and traffic…
ahrefs_related_termsRelated keywords: terms the top-ranking pages also rank for or also mention, with volume, difficulty, CPC and traffic potential
ahrefs_volume_historyMonthly search volume history of one keyword in a country
ahrefs_serp_overviewThe Google results page Ahrefs recorded for a keyword in a country: position, URL, title, type, Domain Rating, URL Rating, backlinks…
ahrefs_batch_analysisCompare up to 100 domains or URLs in one call: Domain Rating, backlinks, referring domains, organic keywords and traffic for each

Example prompts

  • "What are the Domain Rating, live referring domains and organic traffic of example.com today?"
  • "List the 20 dofollow referring domains of competitor.com with the highest Domain Rating, and the anchor texts its links use most."
  • "Find the organic competitors of example.com in Germany and the pages that bring them the most traffic."
  • "Give me keyword ideas for 'running shoes' in the US with a volume above 1,000 and a difficulty below 30, with their traffic potential."
  • "How many Ahrefs API units have we used this month, and when does the allowance reset?"

Next steps

Was this guide helpful?

Your Ahrefs agent is one click away.

Install the connector, paste the key, prompt your AI client. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Ahrefs to ChatGPT via MCP

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Connectors

How to Connect Ahrefs to Claude via MCP

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Connectors

How to Connect Ahrefs to Cursor via MCP

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Connectors

How to Connect Ahrefs to Gemini via MCP

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Connectors

How to Connect Ahrefs to Meta Muse via MCP

Give your AI Ahrefs SEO data: Domain Rating, backlinks, referring domains, organic keywords, top pages, competitors, keyword volume, difficulty and ideas, SERP overview and batch comparisons, with the API unit cost of each request.

Connectors

Avito to MCP: Manage Avito Ads, Prices and Statistics from any AI Agent

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.