Want a free personalized recommendation for your software stack?Get yours
That Marketing Buddy
Home/API/Ahrefs
Ahrefs

Ahrefs API

Yes. Ahrefs publishes a public REST API with both auth. See docs.ahrefs.com for pricing details.

Auth: bothMCP also availableLLMs: ChatGPT, Claude, Gemini, Perplexity, Copilot
Public REST API documentedAgent-readiness 7/10
Data from Buddy's database, auto-rechecked weekly

What is the Ahrefs API?

Ahrefs has a credit-based REST API ('API Units') covering 11 endpoint categories: Site Explorer, Keywords Explorer, Site Audit, SERP Overview, Rank Tracker, Batch Analysis (up to 100 targets/request), Brand Radar, Social Media Management, plus account management and subscription endpoints.

Each request costs a minimum of 50 units, varying by rows returned and fields requested. Monthly unit budgets are tier-gated (100K Lite / 400K Standard / 1M Advanced / 2M Enterprise) and shared with the MCP server and Ahrefs Connect on the same plan.

Access requires Lite ($129/mo monthly, $108/mo annual) or higher; Starter and Ahrefs Free are excluded. API-key authentication via header, OpenAPI-compatible spec available, 60 req/min default rate limit with dynamic throttling at peak load. First-party SDKs and webhooks are not surfaced on the API intro docs I checked; consult the latest developer reference if you need them.

For the broader picture: Ahrefs review, full pricing breakdown, .

HOOK IT TO YOUR STACK

Real Ahrefs API calls you'll write

ahrefs-apirest
#Get the top organic keywords for a domain
GET/v3/site-explorer/organic-keywords?target=mysite.com&limit=10
200 OK · 10 results
marketing automationpos 4 · vol 12.4k
email marketing softwarepos 6 · vol 8.9k
seo tools 2026pos 8 · vol 6.3k
best crm small businesspos 12 · vol 4.6k
Cron daily to track ranking shifts.
ahrefs-apirest
#Pull a competitor's backlink profile
GET/v3/site-explorer/backlinks?target=rival.com&limit=100
200 OK · 100 backlinks
Referring domains1,847
Domain Rating78
New backlinks (30d)+142
Lost backlinks (30d)-38
Pipe into a weekly Slack report.
ahrefs-apirest
#Trigger a fresh site audit
POST/v3/site-audit/scan
202 Accepted · scan_id: 7f2a
Statusqueued
Estimated finish~4 min
Webhook callbackconfigured
Last scan issues47 (12 critical)
TMB SCORE FOR AhrefsAuth: bothAgent fit: 7/10
Read review →

Endpoints illustrative. Confirm exact paths against the live API docs before integrating.

What Ahrefs exposes

Ahrefs exposes its data through five developer surfaces that all share the same monthly API Units budget. The REST API covers 11 endpoint categories: Site Explorer (backlinks, organic and paid traffic), Keywords Explorer, Site Audit, SERP Overview, Rank Tracker, Batch Analysis (up to 100 targets per request), Brand Radar, Social Media Management, plus account management and subscription endpoints. The MCP server exposes the same surface to AI clients via natural language. Data Studio (Looker) connectors ship for Site Explorer, Rank Tracker, Site Audit, and Brand Radar, no code required for dashboards. Bot Analytics tracks bot crawls (including GPTBot and ClaudeBot) via Cloudflare Logpush or a Worker integration. Ahrefs Connect is the white-label data layer for third-party apps embedding Ahrefs, included on every paid plan.

Pricing, limits, and integration

Ahrefs uses an API Units model: each request costs a minimum of 50 units, scaling with rows returned and fields requested. Monthly unit budgets are tier-gated, Lite 100K, Standard 400K, Advanced 1M, Enterprise 2M, and the same budget covers the REST API, MCP server, and Ahrefs Connect, so heavy usage on one surface reduces what's available for the others. Additional units are available on pay-as-you-go for supporting tiers. Rate limit is 60 requests/minute by default with dynamic throttling under load (HTTP 429 on exceedance). API access requires Lite or higher; Starter and Ahrefs Free are excluded. Authentication is API-key only, generated by workspace owners or admins in Account settings. Ahrefs publishes an OpenAPI-compatible spec, so typed clients can be auto-generated, but no first-party language SDKs and no webhook support are documented. Use the API for scheduled jobs and dashboards; reach for the MCP when an LLM is in the loop.

How much does the Ahrefs API actually cost?

Separate product

Ahrefs API is a separate product with its own tier ladder, billed on top of your Ahrefs subscription.

  • API access is NOT included in standard Lite, Standard, Advanced, or Enterprise subscriptions. It's sold as a distinct product called Ahrefs API.
  • Pricing scales by API units consumed per month, starting at a defined entry tier and going up to Enterprise volume.
  • If you're already paying for Lite at €119/mo to use the dashboard, expect API access to add a separate four-figure-plus monthly line item on top.
  • For light scripting needs, the MCP server (where supported) is much cheaper since it piggybacks on your existing subscription.
Billing model
Separate add-on
Entry threshold
Higher than Lite €119
Best for
Agencies, in-house BI teams

Ahrefs subscription pricing

PlanMonthlyAnnual / mo
Lite$129$108
Standard$249$208
Advanced$449$374
Enterprise$1,499
Starter$29
Ahrefs Free

⚠ Per-tier API gating not yet structured for Ahrefs. Confirm which plans unlock API access on the live docs.

Source: ahrefs.com/pricing. Verified 2026-06-07.

API at a glance

Auth method
both
SDK languages
OpenAPI spec
Webhooks
Structured outputs

Which AI clients can read Ahrefs data?

Not every AI assistant supports MCP natively. Here's the per-client picture for Ahrefs specifically.

ClientSupportNotes
Claude (Desktop/Web)Native MCPConnect via the api.ahrefs.com/mcp/mcp URL in Claude Desktop.
Claude CodeNative MCP
ChatGPTNative MCPAhrefs publishes a ChatGPT Web setup guide as one of 11 supported clients.
CursorNative MCP
CodexNative MCP
WindsurfNative MCP
ClineNative MCP
GeminiAPI-only (custom code)
n8nNative MCPAhrefs ships an n8n setup guide; MCP HTTP Streamable node consumes API Units from the shared budget.

Ahrefs also has an MCP server

If you're wiring Ahrefs into Claude / Cursor / Codex, the MCP server is usually less code than the REST API.

See Ahrefs MCP page

What you can build with the Ahrefs API

Three personas, three different shapes of build. Pick the row that matches how you actually ship.

SOLO DEV / FOUNDER

Glue Ahrefs into your daily workflow

  • Pull a digest of ranking changes into your morning Slack
  • Trigger a one-off backfill when something looks off
  • Pipe data into your own SQLite for ad-hoc queries
Effort: A weekend, one Node or Python script
AGENCY / CONSULTANT

Sell Ahrefs reporting at scale

  • White-label Ahrefs data into client-branded dashboards
  • Run scheduled multi-account reports without logging into the Ahrefs UI
  • Cross-reference with the rest of the client's stack (CRM, analytics, ad spend)
Effort: 1-2 weeks, hits multi-tenant auth quickly
IN-HOUSE ENGINEER

Production pipelines for Ahrefs

  • Real-time sync into your warehouse on a cron
  • Custom alerts the dashboard's built-in alerting can't express
  • Backfill + idempotency handling for Ahrefs data older than the dashboard exposes
Effort: Multi-week project, expect rate-limit tuning

Quickstart template

# Starter template — endpoint paths and SDK package names come from
# the Ahrefs API docs: https://docs.ahrefs.com/

curl -X GET "https://api.ahrefs.com/<your-endpoint>" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" | jq .

Template only. Endpoint paths, exact base URL, and auth header format come from docs.ahrefs.com.

Limits and gotchas

  • No OpenAPI spec — you write typed clients by hand or use a third-party generator on the docs HTML.
  • No official SDK detected. Plan on hitting the API directly with your HTTP client of choice.
  • Rate limits: always read the docs page before scaling — the published limit is usually lower than the practical one and overages can be expensive.
7/10

Agent-readiness verdict

Solid REST API with a credit-based model and OpenAPI spec for typed-client generation. First-party SDKs and webhooks were not advertised on the API intro page at the time of this review; confirm against the latest developer reference before depending on them. Best for scheduled jobs and dashboards; reach for the MCP when an LLM is in the loop.

Solid agent integration with official MCP support and well-documented API across Claude, ChatGPT, and Gemini. The official MCP server and public API docs make it straightforward to embed Ahrefs queries into agent workflows. Main limitation is the lack of webhooks and structured outputs, which restricts real-time automation and reduces output consistency for downstream processing.

MCP server availableOfficial MCP (on tool's own domain)Public API with docsNative Claude integrationNative ChatGPT integration

Ahrefs API FAQ

Does Ahrefs have a public API?+
Yes — REST API at docs.ahrefs.com, auth via both.
What auth does the Ahrefs API use?+
Both API key (server-side) and OAuth (delegated/user-auth).
Should I use the API or the MCP server for Claude / Cursor / Codex?+
Prefer the MCP server for agent workflows — it's less code and pre-handles auth flows. Use the REST API for scheduled jobs, dashboards, and anything outside an LLM-driven flow.

Sources

Joonas Rotko
Joonas RotkoAuthor & Founder of That Marketing Buddy

10+ years in digital marketing. I review marketing software for AI-stack fit: real pricing, MCP and API support, and how cleanly each tool drops into an AI agent workflow, cross-checked against verified data and real user feedback.

Ahrefs

Try Ahrefs
WEEKLY NEWSLETTER

The marketing tools worth your money, scored for AI agent readiness

Every week I score the tools for MCP, API, and agent-readiness, then email you the ones that actually deliver, what plugs into Claude and Cursor, the pricing changes, and what to skip. No fluff, no daily spam.

Join for free. One email a week, unsubscribe anytime.