# Ahrefs Scraper DR, Backlinks, Keywords, Traffic & AI Visibility (`memo23/ahrefs-scraper`) Actor

Scrape Ahrefs free SEO data — no account. Domain Rating, backlinks & referring domains, broken links, organic traffic, keyword ideas & difficulty, SERP, AI-visibility citations, and the top-websites ranking. Bulk domains, keywords & brands, 188 countries. JSON/CSV/Excel

- **URL**: https://apify.com/memo23/ahrefs-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** SEO tools, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Scraper

Extract Ahrefs' free SEO data at scale — **Domain Rating, backlinks, referring domains, broken links, organic traffic, keyword ideas, keyword difficulty, SERP overviews, AI-visibility citations, and the top-websites ranking** — for any domain, keyword, or brand. No Ahrefs subscription, login, or cookies required. Bulk input, 188 countries, JSON/CSV/Excel out.

![How Ahrefs Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-ahrefs.png)

### Why use the Ahrefs Scraper?

- **No Ahrefs account or subscription.** Pulls straight from Ahrefs' public free tools — no seats, no API key, no login.
- **The whole free-tool suite in one actor.** Domain Rating, backlinks (overview + individual list), broken links, traffic, keyword ideas, keyword difficulty, SERP, keyword rank, and AI visibility — mix any of them in a single run.
- **Bulk by design.** Feed lists of domains, keywords, and brands together; every input fans out across parallel workers.
- **188 countries.** Localise keyword and traffic data to any market.
- **Clean, flat output.** One row per data point with a `rowType` discriminator — pipe straight into a sheet, database, or dashboard.
- **Captcha handled for you.** The actor solves Ahrefs' Cloudflare Turnstile automatically; you paste nothing.

### What does the Ahrefs Scraper do?

The Ahrefs Scraper turns Ahrefs' free SEO tools into a structured data feed. Give it three kinds of input — **domains/URLs**, **keywords**, and **brands** — and toggle which datasets you want for each:

| Input | Datasets you can pull |
|---|---|
| **Domain / URL** | Domain Rating & backlink counts, backlinks overview, individual backlinks list, broken inbound links, organic-traffic overview (12-month history, top pages/countries/keywords) |
| **Keyword** | Keyword ideas (+ question ideas), keyword difficulty, SERP overview, keyword rank (for a domain you choose) |
| **Brand** | AI-visibility citations across ChatGPT, Gemini, Perplexity, Copilot, Grok, and Google AI |

It also scrapes the **Top Websites** ranking (Ahrefs' most-visited sites, filterable by 26 categories and by country) — a global dataset that runs once per run and needs no captcha at all.

Everything runs account-free and returns one flat row per data point.

### Supported inputs

- **Domains / URLs** — e.g. `apify.com`, `https://example.com/blog`. Scope each with the `mode` setting (exact URL, domain + subdomains, path prefix, or whole domain).
- **Keywords** — any seed phrase, localised by `country`.
- **Brands** — any brand or entity name for AI-visibility.

All three accept bulk lists and can be combined in one run.

### Use cases

- **Backlink research & outreach** — pull a competitor's referring domains and top backlinks to build a prospect list.
- **Broken-link building** — find broken inbound links pointing at any site and pitch your replacement.
- **Keyword research** — expand a seed keyword into hundreds of ideas with difficulty and volume bands, plus question keywords for content.
- **Rank tracking** — check where your domain ranks for a basket of keywords across markets.
- **Competitor traffic intelligence** — estimate a rival's organic traffic, value, trend, and top pages/countries.
- **AI-search visibility (GEO)** — measure how often a brand is cited by ChatGPT, Gemini, Perplexity, and Google AI Overviews.
- **Domain Rating enrichment** — score a list of domains by authority for lead-qualification or link-vetting.
- **Market mapping** — pull the top-visited websites in any category or country to size a niche or find leaders to benchmark.

### How it works

1. **Input** — provide domains/URLs, keywords, and/or brands, then pick the datasets and locale.
2. **Processing** — each worker solves Ahrefs' Cloudflare Turnstile automatically, queries the matching free-tool endpoint, and rotates residential proxies to scale.
3. **Output** — every data point is flattened to one row (tagged with `rowType`) and pushed to the dataset, ready to export.

### Input configuration

| Field | Type | Description |
|---|---|---|
| `urls` | array | Domains / URLs for the website datasets. |
| `keywords` | array | Seed keywords for the keyword datasets. |
| `brands` | array | Brand names for AI-visibility. |
| `country` | string | Two-letter country code for keyword & traffic data (default `us`). |
| `mode` | select | URL scope: `exact`, `subdomains`, `prefix`, `domain` (default `subdomains`). |
| `protocol` | select | Protocol for the traffic dataset: `both`, `https`, `http`. |
| `searchEngine` | select | Engine for keyword ideas (Google, Bing, YouTube, Amazon, ChatGPT, Gemini, Perplexity, …). |
| `rankDomain` | string | Optional — when set, each keyword also returns where this domain ranks. |
| `includeBacklinks` | boolean | Backlinks overview (DR, backlinks, referring domains, dofollow split). On by default. |
| `includeBacklinksList` | boolean | Individual top backlinks. Reuses the overview call — no extra cost. |
| `includeWebsiteAuthority` | boolean | Standalone Domain Rating row (redundant with the backlinks overview). |
| `includeBrokenLinks` | boolean | Broken inbound links pointing at the target. |
| `includeTraffic` | boolean | Organic-traffic overview with 12-month history and top pages/countries/keywords. |
| `includeKeywordIdeas` | boolean | Related keyword ideas. On by default. |
| `includeQuestionIdeas` | boolean | Also pull question-style keyword ideas. |
| `includeKeywordDifficulty` | boolean | SERP scored for keyword difficulty. |
| `includeSerpOverview` | boolean | Full organic SERP with per-result metrics. |
| `includeTopWebsites` | boolean | Ahrefs top-websites ranking (global, no captcha). Runs once per run. |
| `topWebsitesCategory` | string | Optional category slug filter, e.g. `finance`, `shopping`, `news`. |
| `topWebsitesCountry` | string | Optional country slug filter, e.g. `united-kingdom`, `india`. Combines with category. |
| `topWebsitesLimit` | integer | Cap on top-website rows (default 100). |
| `maxBacklinks` / `maxKeywordIdeas` / `maxSerpResults` | integer | Per-target row caps (default 100). |
| `maxItems` | integer | Hard cap on total output rows. |
| `maxConcurrency` | integer | Parallel workers (default 3). |
| `proxy` | object | Proxy configuration (default Apify Residential, US). |

#### Example input

```json
{
  "urls": ["apify.com"],
  "keywords": ["seo tools"],
  "brands": ["Apify"],
  "country": "us",
  "mode": "subdomains",
  "includeBacklinks": true,
  "includeBacklinksList": true,
  "includeTraffic": true,
  "includeKeywordIdeas": true,
  "includeKeywordDifficulty": true
}
````

### Output overview

Each data point is a single flat row tagged with a `rowType`, so one dataset cleanly holds every tool's output:

`website_authority` · `backlinks_overview` · `backlink` · `broken_link` · `traffic_overview` · `keyword_idea` · `serp_result` · `keyword_rank` · `ai_visibility` · `top_website`

### Output samples

**Backlinks overview** (`rowType: "backlinks_overview"`)

```json
{
  "rowType": "backlinks_overview",
  "url": "apify.com",
  "mode": "subdomains",
  "domainRating": 81,
  "backlinks": 3281785,
  "refDomains": 12319,
  "dofollowBacklinks": 94,
  "dofollowRefDomains": 71
}
```

**Individual backlink** (`rowType: "backlink"`)

```json
{
  "rowType": "backlink",
  "targetDomain": "apify.com",
  "sourceUrl": "https://github.com/docling-project/docling",
  "targetUrl": "https://apify.com/vancura/docling",
  "sourceTitle": "GitHub - docling-project/docling",
  "anchor": "Docling Actor",
  "domainRating": 97
}
```

**Traffic overview** (`rowType: "traffic_overview"`)

```json
{
  "rowType": "traffic_overview",
  "url": "apify.com",
  "monthlyOrganicTraffic": 477073,
  "monthlyTrafficValue": 16976950,
  "trafficHistory": [{ "date": "2026-07-01", "organic": 466379 }],
  "topPages": [{ "url": "https://apify.com/", "traffic": 31978, "share": 36.56 }],
  "topCountries": [{ "country": "in", "share": 22.9 }]
}
```

**Keyword idea** (`rowType: "keyword_idea"`)

```json
{
  "rowType": "keyword_idea",
  "seedKeyword": "seo tools",
  "keyword": "free seo tools",
  "country": "us",
  "difficultyLabel": "Hard",
  "volumeLabel": "MoreThanOneThousand",
  "isQuestion": false
}
```

**Top website** (`rowType: "top_website"`)

```json
{
  "rowType": "top_website",
  "rank": 1,
  "domain": "moneysavingexpert.com",
  "category": "Finance",
  "monthlyVisits": "5.4M",
  "monthlyVisitsChange": "-905.2K",
  "scope": "finance/united-kingdom"
}
```

**AI visibility** (`rowType: "ai_visibility"`)

```json
{
  "rowType": "ai_visibility",
  "brand": "Apify",
  "totalAiCitations": 16716,
  "citationsByModel": [
    { "model": "Chatgpt", "count": 270 },
    { "model": "Perplexity", "count": 207 }
  ],
  "topCitedDomains": [{ "domain": "apify.com", "mentions": 454 }]
}
```

### Key output fields

| Field | Appears in | Meaning |
|---|---|---|
| `domainRating` | authority, backlinks, backlink, broken\_link, serp\_result | Ahrefs Domain Rating (0–100). |
| `backlinks` / `refDomains` | authority, backlinks\_overview | Total backlinks and referring domains. |
| `sourceUrl` / `targetUrl` / `anchor` | backlink, broken\_link | Linking page, linked page, and anchor text. |
| `httpCode` | broken\_link | HTTP status of the broken target (e.g. 404). |
| `monthlyOrganicTraffic` / `monthlyTrafficValue` | traffic\_overview | Estimated monthly organic visits and traffic value. |
| `trafficHistory` | traffic\_overview | 12 months of organic-traffic points. |
| `difficultyLabel` / `volumeLabel` | keyword\_idea | Difficulty and search-volume bands. |
| `position` / `urlRating` | serp\_result | Organic position and URL Rating of the result. |
| `topPosition` | keyword\_rank | Best organic position your domain holds for the keyword. |
| `totalAiCitations` / `citationsByModel` | ai\_visibility | AI citations and their per-model breakdown. |
| `rank` / `monthlyVisits` / `monthlyVisitsChange` | top\_website | Ranking position, estimated monthly visits, and month-over-month change. |

### FAQ

**Do I need an Ahrefs account or subscription?** No. The actor uses Ahrefs' public free tools — no login, API key, or cookies.

**Are the numbers the same as paid Ahrefs?** They match Ahrefs' *free* tools, which show real Ahrefs metrics but at free-tier depth (e.g. keyword volume/difficulty as labelled bands, and top-N backlinks rather than the full index).

**Can I scrape many domains and keywords at once?** Yes. Provide bulk lists of `urls`, `keywords`, and `brands` together; they fan out across parallel workers.

**Which countries are supported?** Any two-letter country code (188 markets) for keyword and traffic data.

**Why do some fields come back `null`?** A dataset is only populated when its toggle is on and Ahrefs returns that field for the target. Non-organic SERP entries (AI overview, questions) have fewer metrics than organic ones.

**How is it billed?** Pay-per-result — you're charged per output row. See the Pricing tab on the actor's page.

### Support

Found a bug or need a field added? Open an issue on the actor's **Issues** tab in Apify Console and we'll take a look.

### Additional services

Need a tailored SEO or data-extraction pipeline — scheduled runs, enrichment, or delivery straight to your warehouse? Reach out through the developer profile on Apify.

### Explore more scrapers

- **Ubersuggest Scraper** — keyword volume, CPC, difficulty, domain backlinks & top pages.
- **SimilarWeb Scraper** — website traffic, engagement, and audience data.
- Browse the full store profile for more SEO and directory scrapers.

### ⚠️ Disclaimer

This actor extracts data made publicly available by Ahrefs' free online tools (ahrefs.com) and the public Ahrefs top-websites ranking (ahrefstop.com). It does not access any account-gated or paid Ahrefs data, and it is not affiliated with, endorsed by, or sponsored by Ahrefs. "Ahrefs" is a trademark of its respective owner and is used here only to describe the data source. Use the collected data in compliance with Ahrefs' terms, applicable laws (including copyright and data-protection rules such as GDPR/CCPA), and only for legitimate purposes. You are responsible for how you use the output.

### SEO keywords

Ahrefs scraper, Ahrefs API, Ahrefs free tools scraper, Domain Rating checker, backlink checker, backlinks scraper, referring domains, broken link checker, organic traffic checker, keyword research tool, keyword difficulty checker, keyword ideas, SERP checker, keyword rank checker, AI visibility checker, AI citations, SEO data extraction, bulk domain analysis, competitor backlink analysis, DR checker, SEO scraper, Apify SEO actor, top websites ranking, most visited websites, Ahrefs top websites, website ranking by category, top sites by country.

# Actor input Schema

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

Domains or URLs (e.g. `apify.com`) — each returns Domain Rating, backlinks, broken links, and organic-traffic data (per the Website datasets toggles).

## `keywords` (type: `array`):

Seed keywords — each returns keyword ideas, difficulty, SERP overview, and (with a rank domain) a rank check.

## `brands` (type: `array`):

Brand names — each returns AI-visibility citations across ChatGPT, Gemini, Perplexity, Copilot, Grok, and Google AI.

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

Two-letter country code for keyword & traffic datasets, e.g. `us`, `gb`, `de`, `in`.

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

How to scope backlinks / broken links / traffic for a URL. `subdomains` = the domain and its subdomains; `exact` = the single URL; `prefix` = all pages under the path; `domain` = the whole domain.

## `protocol` (type: `string`):

Protocol for the traffic dataset.

## `searchEngine` (type: `string`):

Search engine for keyword ideas. Includes AI engines.

## `rankDomain` (type: `string`):

When set, each keyword also returns where this domain ranks for it (best organic position). Leave empty to skip rank checks.

## `includeBacklinks` (type: `boolean`):

Domain Rating, total backlinks, referring domains, and dofollow split.

## `includeBacklinksList` (type: `boolean`):

The individual top backlinks — source page URL, target URL, anchor text, source Domain Rating, and HTTP status. Reuses the backlinks-overview solve (no extra cost).

## `includeWebsiteAuthority` (type: `boolean`):

A standalone Domain Rating + backlink-count row. Redundant if the backlinks overview is on (which already includes DR).

## `includeBrokenLinks` (type: `boolean`):

Broken inbound links pointing at the target — source page, anchor, HTTP status, and source Domain Rating.

## `includeTraffic` (type: `boolean`):

Estimated monthly organic traffic & value, 12-month traffic history, and top pages / countries / keywords.

## `includeKeywordIdeas` (type: `boolean`):

Related keyword ideas — each with a difficulty label and search-volume band.

## `includeQuestionIdeas` (type: `boolean`):

Also include question-style keyword ideas (what / how / why …) alongside the keyword ideas.

## `includeKeywordDifficulty` (type: `boolean`):

The live SERP scored for keyword difficulty — organic results with Domain Rating, URL Rating, traffic, and referring-domain metrics.

## `includeSerpOverview` (type: `boolean`):

The full SERP for a keyword — every organic result with its position, Domain Rating, URL Rating, estimated traffic, and top keyword.

## `includeTopWebsites` (type: `boolean`):

Scrape the Ahrefs top-websites list (rank, domain, category, estimated monthly visits, and change).

## `topWebsitesCategory` (type: `string`):

Filter the ranking by category slug, e.g. `finance`, `shopping`, `news`, `health`, `arts-and-entertainment`. Leave empty for all categories.

## `topWebsitesCountry` (type: `string`):

Filter the ranking by country slug, e.g. `united-kingdom`, `india`, `canada`. Combines with the category filter. Leave empty for worldwide.

## `topWebsitesLimit` (type: `integer`):

Cap on top-website rows. The worldwide list paginates (100/page); category/country-filtered lists are roughly a single page.

## `maxBacklinks` (type: `integer`):

Cap on individual backlink and broken-link rows collected per URL.

## `maxKeywordIdeas` (type: `integer`):

Cap on keyword-idea rows collected per seed keyword.

## `maxSerpResults` (type: `integer`):

Cap on SERP-result rows collected per keyword (difficulty + SERP overview).

## `maxItems` (type: `integer`):

Hard cap on the total number of rows across all inputs.

## `maxConcurrency` (type: `integer`):

How many workers run in parallel. Each solves its own Turnstile tokens and uses its own residential exit IP.

## `proxy` (type: `object`):

Residential proxies distribute the free-tool calls across exit IPs (the endpoints rate-limit per IP). Defaults to Apify Residential, US.

## Actor input object example

```json
{
  "urls": [
    "apify.com"
  ],
  "keywords": [
    "seo tools"
  ],
  "country": "us",
  "mode": "subdomains",
  "protocol": "both",
  "searchEngine": "Google",
  "includeBacklinks": true,
  "includeBacklinksList": false,
  "includeWebsiteAuthority": false,
  "includeBrokenLinks": false,
  "includeTraffic": false,
  "includeKeywordIdeas": true,
  "includeQuestionIdeas": false,
  "includeKeywordDifficulty": false,
  "includeSerpOverview": false,
  "includeTopWebsites": false,
  "topWebsitesLimit": 100,
  "maxBacklinks": 100,
  "maxKeywordIdeas": 100,
  "maxSerpResults": 100,
  "maxItems": 10000,
  "maxConcurrency": 3,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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 = {
    "urls": [
        "apify.com"
    ],
    "keywords": [
        "seo tools"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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 = {
    "urls": ["apify.com"],
    "keywords": ["seo tools"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "apify.com"
  ],
  "keywords": [
    "seo tools"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call memo23/ahrefs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=memo23/ahrefs-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Ahrefs Scraper DR, Backlinks, Keywords, Traffic & AI Visibility",
        "description": "Scrape Ahrefs free SEO data — no account. Domain Rating, backlinks & referring domains, broken links, organic traffic, keyword ideas & difficulty, SERP, AI-visibility citations, and the top-websites ranking. Bulk domains, keywords & brands, 188 countries. JSON/CSV/Excel",
        "version": "0.0",
        "x-build-id": "VaPhQhQ0q8estiZ9S"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/memo23~ahrefs-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-memo23-ahrefs-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/memo23~ahrefs-scraper/runs": {
            "post": {
                "operationId": "runs-sync-memo23-ahrefs-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/memo23~ahrefs-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-memo23-ahrefs-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "Domains / URLs",
                        "type": "array",
                        "description": "Domains or URLs (e.g. `apify.com`) — each returns Domain Rating, backlinks, broken links, and organic-traffic data (per the Website datasets toggles).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Seed keywords — each returns keyword ideas, difficulty, SERP overview, and (with a rank domain) a rank check.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "brands": {
                        "title": "Brands (AI visibility)",
                        "type": "array",
                        "description": "Brand names — each returns AI-visibility citations across ChatGPT, Gemini, Perplexity, Copilot, Grok, and Google AI.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "country": {
                        "title": "Country",
                        "type": "string",
                        "description": "Two-letter country code for keyword & traffic datasets, e.g. `us`, `gb`, `de`, `in`.",
                        "default": "us"
                    },
                    "mode": {
                        "title": "URL scope",
                        "enum": [
                            "exact",
                            "subdomains",
                            "prefix",
                            "domain"
                        ],
                        "type": "string",
                        "description": "How to scope backlinks / broken links / traffic for a URL. `subdomains` = the domain and its subdomains; `exact` = the single URL; `prefix` = all pages under the path; `domain` = the whole domain.",
                        "default": "subdomains"
                    },
                    "protocol": {
                        "title": "Traffic protocol",
                        "enum": [
                            "both",
                            "https",
                            "http"
                        ],
                        "type": "string",
                        "description": "Protocol for the traffic dataset.",
                        "default": "both"
                    },
                    "searchEngine": {
                        "title": "Keyword search engine",
                        "enum": [
                            "Google",
                            "Bing",
                            "YouTube",
                            "Amazon",
                            "Yahoo",
                            "Yandex",
                            "Baidu",
                            "Naver",
                            "Seznam",
                            "GoogleImages",
                            "GoogleNews",
                            "GoogleAIMode",
                            "ChatGPT",
                            "Gemini",
                            "Perplexity",
                            "Copilot",
                            "Grok"
                        ],
                        "type": "string",
                        "description": "Search engine for keyword ideas. Includes AI engines.",
                        "default": "Google"
                    },
                    "rankDomain": {
                        "title": "Rank-check domain (optional)",
                        "type": "string",
                        "description": "When set, each keyword also returns where this domain ranks for it (best organic position). Leave empty to skip rank checks."
                    },
                    "includeBacklinks": {
                        "title": "Backlinks overview",
                        "type": "boolean",
                        "description": "Domain Rating, total backlinks, referring domains, and dofollow split.",
                        "default": true
                    },
                    "includeBacklinksList": {
                        "title": "Backlinks list (individual)",
                        "type": "boolean",
                        "description": "The individual top backlinks — source page URL, target URL, anchor text, source Domain Rating, and HTTP status. Reuses the backlinks-overview solve (no extra cost).",
                        "default": false
                    },
                    "includeWebsiteAuthority": {
                        "title": "Website authority (Domain Rating only)",
                        "type": "boolean",
                        "description": "A standalone Domain Rating + backlink-count row. Redundant if the backlinks overview is on (which already includes DR).",
                        "default": false
                    },
                    "includeBrokenLinks": {
                        "title": "Broken links",
                        "type": "boolean",
                        "description": "Broken inbound links pointing at the target — source page, anchor, HTTP status, and source Domain Rating.",
                        "default": false
                    },
                    "includeTraffic": {
                        "title": "Traffic overview",
                        "type": "boolean",
                        "description": "Estimated monthly organic traffic & value, 12-month traffic history, and top pages / countries / keywords.",
                        "default": false
                    },
                    "includeKeywordIdeas": {
                        "title": "Keyword ideas",
                        "type": "boolean",
                        "description": "Related keyword ideas — each with a difficulty label and search-volume band.",
                        "default": true
                    },
                    "includeQuestionIdeas": {
                        "title": "Question ideas",
                        "type": "boolean",
                        "description": "Also include question-style keyword ideas (what / how / why …) alongside the keyword ideas.",
                        "default": false
                    },
                    "includeKeywordDifficulty": {
                        "title": "Keyword difficulty (SERP)",
                        "type": "boolean",
                        "description": "The live SERP scored for keyword difficulty — organic results with Domain Rating, URL Rating, traffic, and referring-domain metrics.",
                        "default": false
                    },
                    "includeSerpOverview": {
                        "title": "SERP overview",
                        "type": "boolean",
                        "description": "The full SERP for a keyword — every organic result with its position, Domain Rating, URL Rating, estimated traffic, and top keyword.",
                        "default": false
                    },
                    "includeTopWebsites": {
                        "title": "Top websites ranking",
                        "type": "boolean",
                        "description": "Scrape the Ahrefs top-websites list (rank, domain, category, estimated monthly visits, and change).",
                        "default": false
                    },
                    "topWebsitesCategory": {
                        "title": "Top-websites category (optional)",
                        "type": "string",
                        "description": "Filter the ranking by category slug, e.g. `finance`, `shopping`, `news`, `health`, `arts-and-entertainment`. Leave empty for all categories."
                    },
                    "topWebsitesCountry": {
                        "title": "Top-websites country (optional)",
                        "type": "string",
                        "description": "Filter the ranking by country slug, e.g. `united-kingdom`, `india`, `canada`. Combines with the category filter. Leave empty for worldwide."
                    },
                    "topWebsitesLimit": {
                        "title": "Max top-website rows",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on top-website rows. The worldwide list paginates (100/page); category/country-filtered lists are roughly a single page.",
                        "default": 100
                    },
                    "maxBacklinks": {
                        "title": "Max backlinks / broken links per URL",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on individual backlink and broken-link rows collected per URL.",
                        "default": 100
                    },
                    "maxKeywordIdeas": {
                        "title": "Max keyword ideas per keyword",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on keyword-idea rows collected per seed keyword.",
                        "default": 100
                    },
                    "maxSerpResults": {
                        "title": "Max SERP results per keyword",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on SERP-result rows collected per keyword (difficulty + SERP overview).",
                        "default": 100
                    },
                    "maxItems": {
                        "title": "Maximum output rows",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on the total number of rows across all inputs.",
                        "default": 10000
                    },
                    "maxConcurrency": {
                        "title": "Parallel workers",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many workers run in parallel. Each solves its own Turnstile tokens and uses its own residential exit IP.",
                        "default": 3
                    },
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Residential proxies distribute the free-tool calls across exit IPs (the endpoints rate-limit per IP). Defaults to Apify Residential, US.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
