# Ahrefs Scraper - Backlink & Anchor Detail (`scrapier/ahrefs-scraper`) Actor

Ahrefs Scraper: Extract backlink and anchor text details, including referring domains, target URLs, link types, anchor text, domain metrics, and backlink data. Analyze link profiles, compare competitors, identify valuable links, and uncover SEO opportunities.

- **URL**: https://apify.com/scrapier/ahrefs-scraper.md
- **Developed by:** [Scrapier](https://apify.com/scrapier) (community)
- **Categories:** SEO tools, Automation, Developer tools
- **Stats:** 7 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Ahrefs Backlink Scraper — Anchor Text, Type & Domain Rating

Ahrefs Scraper - Backlink & Anchor Detail pulls the top backlinks Ahrefs' free Backlink Checker exposes for any domain — source page, target URL, anchor text, a derived anchor-type flag, and the linking page's Domain Rating — then rolls the sample into top-anchor and top-linking-page summaries. Every response is structured JSON, ready to drop into an LLM prompt, a vector store, or a monitoring pipeline. The same run can optionally add Domain Rating, traffic estimates, keyword ideas, SERP overviews, broken-link audits, AI-visibility citations and AhrefsTop trending websites — no Ahrefs account required.

### What is Ahrefs Scraper - Backlink & Anchor Detail?

Ahrefs Scraper - Backlink & Anchor Detail is an Apify Actor that queries Ahrefs' free Backlink Checker and classifies every backlink it returns by anchor type — `brand`, `exact`, `partial`, `generic`, `url` or `empty` — instead of handing back raw anchor strings the way most Ahrefs scrapers do. That classification, plus a `topAnchors` / `topLinkingPages` roll-up computed on every run, is the part of a link profile most backlink tools leave for you to build yourself.

No Ahrefs login, account or subscription is required — it reads the same free tools any visitor can open at ahrefs.com. What it does need is a captcha-solver API key, because Ahrefs gates every one of those tools behind a Cloudflare Turnstile challenge.

- 🔗 **Individual backlink rows** — source page, target URL, anchor text and a computed anchor-type flag for each link
- ⚓ **Anchor-type classification** — deterministic brand/exact/partial/generic/url/empty tagging, plus top-anchor and top-linking-page roll-ups
- 🏆 **Domain Rating & authority** — DR, total backlinks and referring-domain counts for the target
- 📈 **Traffic estimates** — monthly visits, traffic value, history, top pages/countries/keywords
- 🎯 **Query controls** — link scope (`mode`: whole site vs. exact URL), minimum linking Domain Rating filter, and a localisation country for keyword/traffic add-ons
- 🧩 **Optional add-ons** — broken-link audits, keyword ideas, keyword difficulty, keyword rank checking, SERP overviews, AI-visibility citations and AhrefsTop trending websites, all togglable in the same run

### What data can you get with Ahrefs Scraper - Backlink & Anchor Detail?

One run can return up to eleven result types, depending on which toggles you enable and whether you supply a domain, a keyword, or both.

| Result Type | Extracted Fields | Primary Use Case |
| --- | --- | --- |
| Backlink & Anchor Detail | `backlinks[].sourceUrl`, `sourceTitle`, `targetUrl`, `anchorType`, `linkingDomainRating`, `linkInRenderedPage`, `anchorText`; `topAnchors[]`; `topLinkingPages[]`; `backlinksReturned`; `backlinkSampleNote` | Link-building audits, anchor-spam checks, disavow-list prep |
| Backlink & Referring-Domain Overview | `data.domainRating`, `data.backlinks`, `data.refdomains`, `data.dofollowBacklinks`, `data.dofollowRefdomains` | Quick authority snapshot before a deep pull |
| Domain Rating & Authority | `website_authority.domainRating`, `backlinks`, `refdomains`, `dofollowBacklinks`, `dofollowRefdomains` | Comparing domain strength across a prospect list |
| Traffic Estimates | `website_traffic.trafficMonthlyAvg`, `costMontlyAvg`; `website_traffic_history[]`; `website_traffic_top_pages[]`; `website_traffic_top_countries[]`; `website_traffic_top_keywords[]` | Estimating a site's organic value |
| Broken-Link Audit | `data.inbound`, `data.outbound` (broken inbound/outbound links) | Reclaiming lost link equity |
| Keyword Ranking | `top_position`, `serp_results[]`, `serp_source`, `last_update` | Tracking where a domain ranks for a target keyword |
| Keyword Difficulty | `keyword_difficulty`, `keyword_difficulty_results[]`, `keyword_difficulty_source`, `keyword_difficulty_shortage` | Prioritising which keywords to target |
| Keyword Ideas | `data.allIdeas`, `data.questionIdeas` | Building a content/keyword backlog |
| SERP Overview | `serp_results[]`, `serp_source`, `last_update` | Auditing the current SERP landscape for a term |
| AI Visibility | `data.totalAiCitations`, `data.citationsByModel[]`, `data.topCitedDomains[]`, `data.topCitedPages[]`, `data.topTopics[]` | Measuring brand presence inside AI answers |
| AhrefsTop Trending Websites | `websites_rankings[]`, `website_rankings_trending_up[]`, `website_rankings_trending_down[]` | Spotting fast-growing sites in a niche |

#### ⚓ Backlink & Anchor Detail

This is the result type the Actor is named for. `fetchBacklinkList` wires Ahrefs' free Backlink Checker LIST surface into individual, shaped rows — one object per backlink, each carrying `sourceUrl`, `sourceTitle`, `targetUrl`, `linkingDomainRating` and, if `includeAnchorText` is on, the raw `anchorText`. Every row also gets a client-side `anchorType` classification (`brand`, `exact`, `partial`, `generic`, `url` or `empty`) computed from the anchor text against the target's brand token — a field none of the three closest-ranked competing Actors document. The Actor rolls the shaped rows into `topAnchors` (anchor text ranked by frequency) and `topLinkingPages` (source pages ranked by linking Domain Rating), and stamps every backlink record with an honest `backlinkSampleNote` explaining exactly what the free surface does and doesn't cover:

```json
{
  "sourceUrl": "https://zapier.com/blog/best-automation-tools/",
  "anchorText": "Make",
  "anchorType": "brand",
  "linkingDomainRating": 93,
  "linkInRenderedPage": true
}
```

#### 🏆 Domain Rating & Traffic Overview

`include_web_authority` and `include_traffic` merge into a single `traffic` record per target: Domain Rating, total backlinks and referring-domain counts (with dofollow variants of both) from Ahrefs' free Website Authority Checker, plus estimated monthly traffic, traffic value, a monthly history series, and top-pages/top-countries/top-keywords breakdowns from the free Traffic Checker. It's the fastest way to size a prospect or competitor before running a full backlink pull.

### How does Ahrefs Scraper - Backlink & Anchor Detail differ from the official Ahrefs API?

Ahrefs publishes its own API (documented at [docs.ahrefs.com](https://docs.ahrefs.com/), checked 2026-07-26), which gates most functionality behind an Enterprise-plan subscription and offers a limited set of free test queries without one. It returns Ahrefs' full paid index — keyword research, backlink analysis, rank tracking and AI-visibility monitoring — under Ahrefs' own documented rate limits. Ahrefs Scraper - Backlink & Anchor Detail instead reads Ahrefs' *free, public* web tools (Backlink Checker, Traffic Checker, Website Authority Checker, and friends), which need no Ahrefs account at all, and shapes the capped preview those tools expose.

| Feature | Official Ahrefs API | Ahrefs Scraper - Backlink & Anchor Detail |
| --- | --- | --- |
| Access requirement | Enterprise-plan API subscription (per docs.ahrefs.com) | Apify Actor run + a captcha-solver key — no Ahrefs account |
| Data source | Ahrefs' full paid index | Ahrefs' free public tools |
| Backlinks per domain | Not published on the docs homepage | Top sample, about 20 rows, ranked by linking-domain authority |
| Dofollow flag / first-seen / last-seen | Included (paid Site Explorer data) | Not on the free surface — omitted, not guessed |
| Anchor-type classification | Not documented | `anchorType` computed on every backlink row |
| Keyword / SERP / AI-visibility add-ons | Part of the broader API surface | Optional toggles in the same run |
| Output shape | Ahrefs' own API JSON schema | One normalised record per report `type`, e.g. `backlinks`, `traffic` |

Use the official API if you already hold an Enterprise Ahrefs subscription and need contractual guarantees or full-index depth. Use this Actor for ad-hoc audits, prospect research, or pulling anchor-level backlink data across many domains without that subscription.

### What is the difference between a backlink checker and anchor-text analysis?

A backlink checker answers "how many links, from how many domains, at what authority" — it's a count. Anchor-text analysis answers "what do those links say," which is the signal that actually distinguishes a natural link profile from a manipulated one. A domain can have thousands of high-DR backlinks and still carry an over-optimized anchor mix — too many exact-match or URL anchors relative to brand and generic ones — that a pure count never surfaces.

That distinction matters more since Google's anchor-text-based algorithm updates made anchor-mix a directly actionable signal rather than a cosmetic detail: SEOs now audit anchor distribution, not just backlink totals, before a disavow pass or a link-building push.

Ahrefs Scraper - Backlink & Anchor Detail returns both in the same run. The count-level view lives in the `traffic`/`backlinks` overview records (`website_authority.domainRating`, `data.backlinks`, `data.refdomains`); the anchor-level view lives in the `backlinks[]` array on the enriched `backlinks` record, where every row carries `anchorText` and a computed `anchorType`, rolled up into `topAnchors`.

### How to scrape Ahrefs backlinks with Ahrefs Scraper - Backlink & Anchor Detail?

1. Open Ahrefs Scraper - Backlink & Anchor Detail on the Apify Store and click **Try for free**
2. Enter the domain or URL you want backlinks for in **🔗 Target Domain or URL** (`url`) — e.g. `make.com`
3. Set the real query controls: **🎯 Link Scope** (`mode`: `subdomains` or `exact`), **🌍 Localisation Country** (`country`, only affects keyword/traffic/SERP add-ons — backlinks are global), and **📊 Minimum Linking Domain Rating** (`minLinkingDR`) to drop low-authority links
4. Paste a **🔐 Captcha Solver API Key** (`captchaApiKey`) — this is not schema-required but the run exits immediately without it — and click **Start**
5. Download the results as JSON, CSV or Excel, or stream them from the dataset through the Apify API while the run is still going

```json
{
  "url": "make.com",
  "mode": "subdomains",
  "fetchBacklinkList": true,
  "includeAnchorText": true,
  "minLinkingDR": 20,
  "captchaApiKey": "CAP-XXXXXXXXXXXX"
}
```

#### How to run multiple domains in one job

Use **🔗 Target Domains / URLs (Bulk)** (`urls`) instead of the single `url` field — it's a list, and the input description states plainly that when it's set it overrides the single target above entirely (they are not merged). Every domain-based report you've enabled — traffic/authority, backlinks, broken links, keyword ranking — runs once per entry in `urls`, so five domains with backlinks and authority both on produce ten backlink-family records in one run.

### ⬇️ Input

None of the 22 parameters are marked required in the schema (`"required": []`); the run still needs at least a `url`/`urls`, a `keyword`, or `include_top_websites` ticked to have anything to do, and it needs a captcha-solver key to fetch anything from `/v4`.

| Parameter | Required | Type | Default / Constraints | Description |
| --- | --- | --- | --- | --- |
| `url` | No | string | — (prefill `"make.com"`) | The domain or URL whose backlinks you want. For many targets at once, use `urls` below. |
| `urls` | No | array | — (prefill `["make.com"]`) | A list of domains or URLs to pull backlinks for. When set, this overrides the single `url` above. |
| `keyword` | No | string | — (prefill `"ai automation"`) | Optional keyword (or brand, for AI Visibility) — only used by the keyword/SERP/AI add-ons, not required for backlinks. |
| `country` | No | string | default `"us"`; one of 178 ISO alpha-2 codes (select) | Country used to localise keyword, SERP and traffic results. Backlinks are global and ignore this. |
| `mode` | No | string | default `"subdomains"`; enum `subdomains`, `exact` | Scope of the analysis: whole site including subdomains, or just the exact URL/host. |
| `include_backlinks` | No | boolean | default `true` | The core toggle. Returns the backlink & referring-domain overview plus, when `fetchBacklinkList` is on, the individual backlink rows. |
| `fetchBacklinkList` | No | boolean | default `true` | Wires in Ahrefs' free Backlink Checker LIST surface: each top backlink as its own row — source page, title, target URL, anchor text, anchor-type flag and linking Domain Rating. Rolls up `topAnchors` and `topLinkingPages`. The free surface returns a top sample (~20 rows). |
| `includeAnchorText` | No | boolean | default `true` | Include the raw `anchorText` on each backlink row and build the top-anchors roll-up. Turn off to keep only the derived `anchorType` flag. |
| `minLinkingDR` | No | integer | default `0`; min `0`; max `100` | Drop individual backlinks whose linking (referring) Domain Rating is below this value. `0` keeps every backlink. |
| `include_web_authority` | No | boolean | default `true` | Needs a domain/URL. Adds Domain Rating, backlinks and referring-domain counts. |
| `include_traffic` | No | boolean | default `true` | Needs a domain/URL. Adds estimated monthly visits, traffic value, history, top pages/countries/keywords. |
| `include_ai_visibility` | No | boolean | default `false` | Needs a brand/keyword. Adds AI citations across LLMs, top cited domains/pages and topics. |
| `include_keywords` | No | boolean | default `false` | Needs a keyword and country. Adds keyword ideas plus question ideas with volumes. |
| `include_keywords_difficulty` | No | boolean | default `false` | Needs a keyword and country. Adds the Keyword Difficulty score plus the ranking SERP. |
| `include_keywords_ranking` | No | boolean | default `false` | Needs a keyword, domain and country. Adds where the domain ranks for the keyword. |
| `include_serp` | No | boolean | default `false` | Needs a keyword and country. Adds the full SERP overview for the keyword. |
| `include_broken_links` | No | boolean | default `false` | Needs a domain/URL. Adds broken inbound and outbound links. |
| `include_top_websites` | No | boolean | default `false` | Adds the top trending websites from AhrefsTop.com — Top 1000 (worldwide + all categories) or Top 100 when filtered by category/country. Needs no keyword or domain. |
| `category_top_websites` | No | string | default `"all"`; one of 26 category slugs (select) | Category filter for the AhrefsTop trending-websites ranking. |
| `country_top_websites` | No | string | default `"worldwide"`; one of 179 values (select) | Country filter for the AhrefsTop trending-websites ranking. |
| `captchaApiKey` | No | string | secret (`isSecret: true`) | Your CapSolver (or 2Captcha) API key. Ahrefs gates every free tool behind Cloudflare Turnstile, so a solver key is required to collect any `/v4` data. Stored encrypted; never logged. |
| `proxyConfiguration` | No | object | default `{"useApifyProxy": true}` | The scraper starts on a direct connection and only escalates to a datacenter, then residential proxy, if Ahrefs blocks it. Pick a country here to localise the residential fallback. |

**Common pitfall:** the visible input form exposes only one captcha field — `captchaApiKey` — with no provider selector, and the Actor defaults that key to the CapSolver provider. The field's own description mentions 2Captcha as an alternative, but selecting it requires adding a raw `captchaProvider: "twocaptcha"` key to the input JSON (via the Console's "raw" input editor or the API) since it is not present in the visible form.

#### Example JSON input

```json
{
  "urls": ["make.com", "zapier.com"],
  "keyword": "workflow automation",
  "country": "us",
  "mode": "subdomains",
  "include_backlinks": true,
  "fetchBacklinkList": true,
  "includeAnchorText": true,
  "minLinkingDR": 20,
  "include_web_authority": true,
  "include_traffic": true,
  "include_broken_links": false,
  "include_keywords": false,
  "include_keywords_difficulty": false,
  "include_keywords_ranking": false,
  "include_serp": false,
  "include_ai_visibility": false,
  "include_top_websites": false,
  "category_top_websites": "all",
  "country_top_websites": "worldwide",
  "proxyConfiguration": { "useApifyProxy": true },
  "captchaApiKey": "CAP-XXXXXXXXXXXX"
}
```

### ⬆️ Output

Every record is typed, normalized JSON with a consistent shape per `type`, pushed to the dataset live as each report lands — the dataset fills while the run is still going. Export as JSON, CSV or Excel, or read the dataset through the Apify API. Every record carries `data_captured_at` (UTC ISO timestamp) and `type` (`traffic`, `backlinks`, `broken_links`, `keyword_ranking`, `keyword_difficulty`, `keywords`, `serp`, `ai_visibility` or `top_websites`).

Ahrefs encodes its raw responses in an OCaml/Melange style — options as `["Some", x]`, results as `["Ok", x]` / `["Error", e]`, enums as single-element arrays. All of it is decoded recursively before it reaches the dataset, so `null` replaces Ahrefs' `None` and error payloads surface as a plain `error` (or `*_error`) key on the record instead of a missing row.

The default **Overview** dataset view surfaces only 7 columns (`data_captured_at`, `type`, `domain`, `keyword`, `brand`, `country`, `mode`) for quick scanning — every record actually carries many more fields, listed per type below. Switch to the **Backlink & Anchor Detail**, **Traffic & Authority**, or other named views in the Console to see the rest, or just read the raw dataset.

#### Scraped results

A `backlinks` record (the primary result type this Actor is built around), with three backlink rows so you can see the array's real shape:

```json
[
  {
    "data_captured_at": "2026-07-26T10:14:02.331000+00:00",
    "type": "backlinks",
    "domain": "make.com",
    "data": {
      "domainRating": 91,
      "backlinks": 128340,
      "refdomains": 9120,
      "dofollowBacklinks": 88210,
      "dofollowRefdomains": 6640
    },
    "backlinksReturned": 3,
    "backlinks": [
      {
        "sourceUrl": "https://zapier.com/blog/best-automation-tools/",
        "sourceTitle": "12 Best Automation Tools for 2026",
        "targetUrl": "https://www.make.com/en",
        "anchorType": "brand",
        "linkingDomainRating": 93,
        "linkInRenderedPage": true,
        "anchorText": "Make"
      },
      {
        "sourceUrl": "https://www.g2.com/products/make/reviews",
        "sourceTitle": "Make Reviews 2026 | G2",
        "targetUrl": "https://www.make.com/en/pricing",
        "anchorType": "exact",
        "linkingDomainRating": 90,
        "linkInRenderedPage": true,
        "anchorText": "make.com"
      },
      {
        "sourceUrl": "https://community.make.com/t/getting-started/1023",
        "sourceTitle": "Getting Started — Make Community",
        "targetUrl": "https://www.make.com/en/templates",
        "anchorType": "generic",
        "linkingDomainRating": 71,
        "linkInRenderedPage": false,
        "anchorText": "read more here"
      }
    ],
    "topAnchors": [
      { "anchor": "Make", "count": 41 },
      { "anchor": "make.com", "count": 18 }
    ],
    "topLinkingPages": [
      { "url": "https://zapier.com/blog/best-automation-tools/", "linkingDomainRating": 93 }
    ],
    "backlinkSampleNote": "Ahrefs' free Backlink Checker returns a top sample of backlinks (about 20 rows) ranked by referring-domain authority — not the full profile. It carries no dofollow/nofollow flag and no referring-page traffic on the free surface, so those are not emitted. First/last-seen link dates are paid Site Explorer only. anchorType is a deterministic client-side classification (brand/exact/partial/generic/url/empty)."
  },
  {
    "data_captured_at": "2026-07-26T10:14:04.008000+00:00",
    "type": "traffic",
    "domain": "make.com",
    "mode": "subdomains",
    "website_authority": {
      "domainRating": 91,
      "backlinks": 128340,
      "refdomains": 9120,
      "dofollowBacklinks": 88210,
      "dofollowRefdomains": 6640
    },
    "website_traffic": {
      "trafficMonthlyAvg": 2841500,
      "costMontlyAvg": 1934200
    },
    "website_traffic_history": [
      { "date": "2026-06-01", "organic": 2788100 },
      { "date": "2026-07-01", "organic": 2841500 }
    ],
    "website_traffic_top_pages": [
      { "url": "https://www.make.com/en/templates", "traffic": 184300 }
    ],
    "website_traffic_top_countries": [
      { "country": "us", "traffic": 812400, "share": 0.286 }
    ],
    "website_traffic_top_keywords": [
      { "keyword": "make automation", "position": 1, "traffic": 31200 }
    ]
  },
  {
    "data_captured_at": "2026-07-26T10:14:06.552000+00:00",
    "type": "keyword_difficulty",
    "keyword": "workflow automation",
    "country": "us",
    "keyword_difficulty": 68,
    "keyword_difficulty_source": "serp",
    "keyword_difficulty_shortage": null,
    "keyword_difficulty_results": [
      {
        "content_type": "organic",
        "data": { "url": "https://zapier.com/workflow-automation", "title": "Workflow Automation" },
        "pos": 1,
        "pos_with_metrics": 1
      }
    ]
  },
  {
    "data_captured_at": "2026-07-26T10:14:09.117000+00:00",
    "type": "top_websites",
    "top_websites_category": "all",
    "top_websites_country": "worldwide",
    "websites_rankings": [
      { "rank": 1, "domain": "google.com", "search_traffic": "27.4B", "change": "+120.3M", "category": "Search Engines" }
    ],
    "website_rankings_trending_up": [
      { "rank": 4, "domain": "chatgpt.com", "search_traffic": "1.2B", "change": "+340.1M", "position_change": "↑" }
    ],
    "website_rankings_trending_down": []
  }
]
```

The remaining types follow the same pattern: `broken_links` and `keywords` and `ai_visibility` carry `data_captured_at`, `type`, an identity field (`domain`, `keyword`, or `brand`), and a fully-decoded `data` object; `keyword_ranking` and `serp` carry `serp_results[]`, `serp_source` and `last_update`; any record can instead carry `error` (or, on `traffic` records, `website_authority_error` / `website_traffic_error`, or on `backlinks` records, `backlink_list_error`) if the underlying Ahrefs call failed.

### How can I use the data extracted with Ahrefs Scraper - Backlink & Anchor Detail?

- 🔗 **Link-building and SEO teams:** pull `backlinks[]` for a target, filter by `anchorType` to spot an over-optimized mix (too many `exact`/`url` anchors relative to `brand`/`generic`), and use `linkingDomainRating` to prioritise which referring pages are worth a follow-up outreach.
- 🤖 **AI engineers and LLM developers:** an agent issues a domain query, receives typed JSON with `backlinks[]`, `website_authority` and `website_traffic` already decoded, and passes it straight into a model as grounding context — no HTML parsing or Melange decoding on your side.
- 📊 **Market researchers:** run the same `urls` list on a schedule and diff `website_authority.domainRating`, `backlinksReturned` and `topAnchors` across runs to track a competitor's link-building velocity and anchor strategy over time.
- 🏢 **Product and growth teams:** combine `include_broken_links` with `include_keywords_difficulty` to find both link-reclamation opportunities and winnable keyword gaps in the same run, without switching tools.

### 🔁 How do you monitor anchor-type distribution over time?

Anchor-profile monitoring is the discipline of watching how a domain's inbound anchor mix shifts between runs, because a sudden move toward `exact`/`url` anchors is one of the clearest signals of either an aggressive (and risky) link-building push or a negative-SEO attack, while a domain's own `topAnchors` staying stable and brand-heavy is a sign of an organic profile.

Run the same `url` (or `urls` list) on a schedule and diff four fields between runs: `backlinksReturned` (has the sample size moved), `topAnchors` (has the ranked anchor list reordered or gained new high-count entries), the `anchorType` distribution across `backlinks[]` (is `exact`/`url` share rising as a fraction of the total), and `topLinkingPages[].linkingDomainRating` (are new, lower-authority domains now dominating the top sample, which can indicate low-quality or spammy new links).

A practical loop: schedule a run across your prospect or competitor `urls` list, store each run's `backlinks` record keyed by domain and run date, and alert when `anchorType` counts for `exact` or `url` cross a threshold you set, or when `topLinkingPages` picks up several new low-DR domains between two consecutive runs. Ahrefs Scraper - Backlink & Anchor Detail itself doesn't schedule runs — set that up with Apify's own **Schedules** (Console → Schedules, or the `POST /v2/schedules` API) pointed at this Actor.

### ⚡ Integrate Ahrefs Scraper - Backlink & Anchor Detail and automate your workflow

Ahrefs Scraper - Backlink & Anchor Detail works with any language or tool that can send an HTTP request or use the Apify SDK — it is a standard Apify Actor, not a bespoke API.

#### REST API with Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("<YOUR_USERNAME>/ahrefs-scraper-backlink-anchor-detail").call(run_input={
    "url": "make.com",
    "fetchBacklinkList": True,
    "includeAnchorText": True,
    "minLinkingDR": 20,
    "captchaApiKey": "<YOUR_CAPSOLVER_KEY>",
})

for rec in client.dataset(run["defaultDatasetId"]).iterate_items():
    if rec["type"] == "backlinks" and not rec.get("backlink_list_error"):
        for bl in rec.get("backlinks", []):
            print(bl["sourceUrl"], bl["anchorType"], bl["linkingDomainRating"])
```

#### Scheduled monitoring and delivery

The Actor has no built-in scheduler or webhook input — use Apify's platform-level **Schedules** to trigger recurring runs against a saved `urls` list, and Apify's **run-finished webhooks** to push a notification (or trigger a downstream job) the moment each run's dataset is ready, without polling.

### Is it legal to scrape Ahrefs backlink data?

Yes, with conditions. Scraping publicly accessible web output that requires no login is broadly treated as permissible in U.S. law — *hiQ Labs, Inc. v. LinkedIn Corp.*, 9th Cir., 2019, held that accessing publicly available web data does not violate the Computer Fraud and Abuse Act — and Ahrefs Scraper - Backlink & Anchor Detail returns only what Ahrefs' free tools show any visitor: no login, cookie or paid Ahrefs session is used.

What this Actor returns — domain metrics, backlink URLs, anchor text — is business and technical data about websites, not personal data, so GDPR/CCPA-style personal-data regimes don't attach the way they would to a scraper of individuals' profiles. What does apply is Ahrefs' own terms of service and, in the EU, database-rights protection over a compiled dataset (Directive 96/9/EC). Scraping for a one-off competitor audit and scraping to republish or resell a compiled Ahrefs-derived dataset carry different risk profiles. Consult your legal team for commercial use cases involving bulk data storage.

### ❓ Frequently asked questions

#### Does the `country` parameter change which backlinks I get?

No. `country` only localises keyword, SERP and traffic results — backlinks are global by design, so the same `url` returns the same backlink sample regardless of the `country` value you set.

#### What's the difference between `mode: subdomains` and `mode: exact`?

`subdomains` scopes the analysis to the whole site including subdomains; `exact` restricts it to just the exact URL or host you supplied. It's the same `mode` value used for the backlink, authority, traffic and broken-link reports on that target.

#### How does Ahrefs Scraper - Backlink & Anchor Detail handle Ahrefs' anti-bot measures?

Two defences, run independently. Every `/v4` call is TLS-fingerprinted with `curl_cffi`'s Chrome impersonation and gated by a fresh Cloudflare Turnstile solve (CapSolver, 2Captcha, Playwright or a static token, depending on configuration) before it's sent. Separately, requests start on a direct connection with no proxy at all; only if Ahrefs returns a block signal (HTTP 403/429/503, a connection error, or a non-JSON response typical of a Cloudflare challenge page) does the Actor escalate — direct → Apify datacenter proxy → Apify residential proxy, retrying up to three times on the residential rung before giving up on that request. The tier the run finished on is logged at the end.

#### Does Ahrefs Scraper - Backlink & Anchor Detail extract anchor text and anchor type?

Yes — `anchorText` (raw, when `includeAnchorText` is on) and a computed `anchorType` (`brand`/`exact`/`partial`/`generic`/`url`/`empty`) sit on every object in the `backlinks[]` array of the `backlinks` record, alongside a `topAnchors` roll-up. `anchorType` is absent only when `includeAnchorText` is off and the underlying anchor was empty — in which case the row still gets `"empty"`.

#### How many backlinks does Ahrefs Scraper - Backlink & Anchor Detail return per domain?

Ahrefs' free Backlink Checker returns a top sample of about 20 backlinks per domain, ranked by linking-domain authority — this is stated directly in `backlinkSampleNote` on every `backlinks` record, and it is a limit of Ahrefs' free tool, not a cap this Actor imposes. `topAnchors` and `topLinkingPages` are each capped at 20 entries. AhrefsTop trending websites return up to 1,000 sites worldwide/unfiltered, or up to 100 when filtered by category or country.

#### Does a failed lookup still get charged?

Yes. Every record the Actor pushes — including ones that carry an `error`, `website_authority_error`, `website_traffic_error` or `backlink_list_error` key because the underlying Ahrefs call failed — consumes one `row_result` event; there is no separate free error row. Filter clean records client-side by checking that none of those error keys are present on the item.

#### How do I use Ahrefs Scraper - Backlink & Anchor Detail to monitor a link profile over time?

Schedule a recurring run across the same `urls` list with Apify Schedules, store each run's `backlinks` record, and diff `backlinksReturned`, `topAnchors`, the `anchorType` mix and `topLinkingPages[].linkingDomainRating` against the previous run — see "How do you monitor anchor-type distribution over time?" above for the full loop.

#### Does Ahrefs Scraper - Backlink & Anchor Detail work with Claude, ChatGPT and AI agent frameworks?

Yes, as a standard HTTP-callable Apify Actor rather than through a dedicated MCP server — an agent framework (LangChain, CrewAI, n8n, or a hand-written tool definition) calls it through the Apify API and gets back typed JSON with no parsing step, which lets an agent retrieve a live backlink profile before answering.

#### How does Ahrefs Scraper - Backlink & Anchor Detail compare to other Ahrefs scrapers?

Checked on the Apify Store, 2026-07-26: `pro100chok/ahrefs-seo-tools` documents 13 tools and describes itself as extracting Ahrefs data "without limits," but its Backlinks List output example shows only `urlFrom`, `urlTo`, `anchor`, `domainRating` and `title` — no per-row anchor-type classification. `santhej/backlink-checker` advertises a `dofollow` flag, a spam score, and `first_seen`/`last_seen` dates in its example output; this Actor's source documents that Ahrefs' free Backlink Checker surface carries none of those three fields, and says so in `backlinkSampleNote` rather than asserting them. `lizaraco/domain-authority-backlinks` requires you to bring your own DataForSEO API key and pay DataForSEO directly per call. None of the three document a computed anchor-type field or top-anchor/top-linking-page roll-ups the way this Actor does.

#### Can I use Ahrefs Scraper - Backlink & Anchor Detail without managing proxies or an Ahrefs account?

Yes for proxies — the escalation ladder (direct → datacenter → residential) is automatic and you never rotate an IP yourself; set a country in `proxyConfiguration` only if you want the residential fallback localised. No Ahrefs account, login or subscription is needed either, since every source endpoint is one of Ahrefs' free public tools. The one thing you must supply yourself is a CapSolver or 2Captcha account and API key, because Ahrefs puts a Cloudflare Turnstile challenge in front of all of them.

### 💬 Your feedback

Found a bug, or missing a field you need from Ahrefs' free tools? Open an issue on this Actor's Issues tab on Apify. Reports that include the exact input JSON and the target domain are the fastest to reproduce and fix.

# Actor input Schema

## `url` (type: `string`):

The domain or URL whose backlinks you want (e.g. make.com). For many targets at once, use the bulk field below.

## `urls` (type: `array`):

A list of domains or URLs to pull backlinks for. Add one by one or paste in bulk. When set, this overrides the single target above.

## `keyword` (type: `string`):

Optional keyword (or brand, for AI Visibility) — only used by the keyword/SERP/AI add-ons below, not required for backlinks.

## `country` (type: `string`):

Country used to localise keyword, SERP and traffic results (backlinks are global).

## `mode` (type: `string`):

Scope of the analysis: 'subdomains' (whole site incl. subdomains) or 'exact' (just the exact URL/host).

## `include_backlinks` (type: `boolean`):

The core of this actor. If checked, returns the backlink & referring-domain overview PLUS (below) the individual top backlink rows with anchor detail.

## `fetchBacklinkList` (type: `boolean`):

Wire in Ahrefs' free Backlink Checker LIST surface: each top backlink as its own row — source page URL & title, target URL, anchor text, anchor-type flag and linking Domain Rating. Rolls up top anchors & top linking pages. The free surface returns a top sample (~20 rows).

## `includeAnchorText` (type: `boolean`):

Include the raw anchor text of each backlink and build the top-anchors roll-up. Turn off to keep only the derived anchor-type flag (brand/exact/partial/generic/url/empty).

## `minLinkingDR` (type: `integer`):

Drop individual backlinks whose linking (referring) Domain Rating is below this value. 0 keeps every backlink.

## `include_web_authority` (type: `boolean`):

Needs a Domain/URL. If checked, includes Domain Rating, backlinks & referring-domain counts.

## `include_traffic` (type: `boolean`):

Needs a Domain/URL. If checked, includes estimated monthly visits, traffic value, history, top pages/countries/keywords.

## `include_ai_visibility` (type: `boolean`):

Needs a Brand/Keyword. If checked, includes AI citations across LLMs, top cited domains/pages & topics.

## `include_keywords` (type: `boolean`):

Needs a Keyword and Country. If checked, includes keyword ideas + question ideas with volumes.

## `include_keywords_difficulty` (type: `boolean`):

Needs a Keyword and Country. If checked, includes the Keyword Difficulty score + ranking SERP.

## `include_keywords_ranking` (type: `boolean`):

Needs a Keyword, Domain and Country. If checked, includes where the domain ranks for the keyword.

## `include_serp` (type: `boolean`):

Needs a Keyword and Country. If checked, includes the full SERP overview for the keyword.

## `include_broken_links` (type: `boolean`):

Needs a Domain/URL. If checked, includes broken inbound & outbound links.

## `include_top_websites` (type: `boolean`):

If checked, includes the top trending websites from AhrefsTop.com — the Top 1000 (worldwide + all categories) or Top 100 when filtered by category/country. Does not need a Keyword or Domain.

## `category_top_websites` (type: `string`):

Category to filter the AhrefsTop trending websites ranking.

## `country_top_websites` (type: `string`):

Country to filter the AhrefsTop trending websites ranking.

## `captchaApiKey` (type: `string`):

Your CapSolver (or 2Captcha) API key. Ahrefs gates every free tool behind Cloudflare Turnstile, so a solver key is required to collect data. Stored encrypted; never logged.

## `proxyConfiguration` (type: `object`):

The scraper starts on a DIRECT connection and only escalates to a datacenter, then residential proxy if Ahrefs blocks it. Pick a country here to localise residential fallback.

## Actor input object example

```json
{
  "url": "make.com",
  "urls": [
    "make.com"
  ],
  "keyword": "ai automation",
  "country": "us",
  "mode": "subdomains",
  "include_backlinks": true,
  "fetchBacklinkList": true,
  "includeAnchorText": true,
  "minLinkingDR": 0,
  "include_web_authority": true,
  "include_traffic": true,
  "include_ai_visibility": false,
  "include_keywords": false,
  "include_keywords_difficulty": false,
  "include_keywords_ranking": false,
  "include_serp": false,
  "include_broken_links": false,
  "include_top_websites": false,
  "category_top_websites": "all",
  "country_top_websites": "worldwide",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in the Actor's default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "url": "make.com",
    "urls": [
        "make.com"
    ],
    "keyword": "ai automation",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapier/ahrefs-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "url": "make.com",
    "urls": ["make.com"],
    "keyword": "ai automation",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapier/ahrefs-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "make.com",
  "urls": [
    "make.com"
  ],
  "keyword": "ai automation",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapier/ahrefs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapier/ahrefs-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dza2pcweny2zhROlD/builds/XTJqyrqR3haS5PRwI/openapi.json
