# Ahrefs Scraper - Domain Rating, Backlinks & Keywords (`automly/ahrefs-seo-scraper`) Actor

Get Ahrefs SEO data without a subscription: Domain Rating, backlinks, broken links, organic traffic, keyword ideas, keyword difficulty, SERP, rank checks and AI citations for any domain or keyword. Export to CSV, JSON or Excel, schedule runs or use the API.

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

## Pricing

from $3.25 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Ahrefs Scraper - Domain Rating, Backlinks & Keywords

### What is Ahrefs Scraper?

**Ahrefs Scraper** is a tool that lets you **scrape Ahrefs SEO data for any website or keyword**: Domain Rating, backlinks, broken links, organic traffic, keyword ideas, keyword difficulty, full SERPs with page metrics, rank checks, AI search citations, sitemaps and the top 1,000 websites. Add your domains or keywords, pick a tool, click **Start**, and download the results as Excel, CSV or JSON.

- 🔎 **16 SEO tools in one place:** each one a dropdown choice
- ⚡ **Bulk checks:** hundreds of domains or keywords in one run
- 🔓 **No Ahrefs subscription and no login needed**
- 📦 **One clean row per domain or keyword:** ready for spreadsheets and dashboards
- 💸 **Free to try:** the $5 of free usage every Apify account gets each month covers about 330 results

### What can Ahrefs Scraper do?

- **Check Domain Rating (DR) in bulk** for a list of domains, with backlinks and referring domains
- **Export the top backlinks of any site** with anchor text, surrounding text, linking page title and DR
- **Find broken backlinks** pointing to 404 pages, with the redirect chain of each
- **Check a website's organic traffic**: monthly visits, traffic value in USD, top pages, top countries, top keywords and 6-month history
- **Find keyword ideas** with difficulty and search volume ranges, plus question keywords
- **Check keyword difficulty (KD)** and how many referring domains you need to reach the top 10
- **Get the full Google SERP for a keyword** in any country, with DR, UR, traffic and backlinks for every result, AI Overview text and sources, People Also Ask, videos, discussions and shopping blocks
- **Check where a domain ranks for a keyword**, for many domains and keywords at once
- **Track AI visibility**: how often ChatGPT, Gemini, Perplexity, Copilot, Grok, Google AI Mode and AI Overviews cite a brand, its top cited pages and topics
- **List a website's URLs** from its XML sitemap with last-modified dates
- **Get the top 1,000 websites** worldwide, by country or by category, with trending winners and losers, and optional full details per site

### What data can you extract with Ahrefs Scraper?

| 🌐 Websites | 🔑 Keywords | 🤖 AI search |
|---|---|---|
| Domain Rating | Keyword ideas | Total AI citations |
| Backlinks and referring domains | Question keywords | Citations per AI model |
| Dofollow share | Keyword difficulty (0-100) | Monthly citation history |
| Top backlinks with anchors | Search volume range | Top cited domains |
| Broken backlinks | Referring domains to rank | Top cited pages |
| Organic traffic and value | SERP top 10 with metrics | Top topics |
| Top pages, countries, keywords | AI Overview text and sources | AI Mode mentions |
| Traffic history | Rank position and URL | AI Overviews mentions |
| Sitemap URLs | People Also Ask | New mentions this cycle |
| Competitors | Shopping, videos, discussions | |

### How to scrape Ahrefs SEO data

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **Ahrefs Scraper** and pick a tool under **What to get**.
3. Enter your **URLs or domains** (for website tools) or your **Keywords** (for keyword tools). The rank checker uses both.
4. Set the **Country** for keyword and SERP data, and the **URL mode** for backlinks and traffic if you need a subdomain, a folder or an exact page, then click **Start**.
5. When the run finishes, download your data as Excel, CSV, JSON, HTML or XML, or connect it to Google Sheets, Make, Zapier or your own code.

### How much does it cost to scrape Ahrefs data?

You pay only for the results you get: one result per URL, keyword or brand checked, or per website in the top websites tool. The price per 1,000 results depends on your Apify plan:

| Apify plan | Results per 1,000 |
|---|---|
| Free | **$15.00** |
| Starter (Bronze) and higher | **$3.25** |

Each run also has a start fee of $0.75 per run at the default settings on the Free plan, and a tiny start fee on Starter (Bronze) and higher. Platform usage is included in these prices, so you pay nothing extra for it.

**From 16 October 2026:** the Free plan price drops to $10.00 per 1,000 results. Starter (Bronze) and higher stay at $3.25 per 1,000, and the start fees stay the same.

Example: checking the Domain Rating of 100 domains on the Free plan costs $1.50 for the results plus the $0.75 start fee, $2.25 in total. 1,000 results cost $15.00 on the Free plan (plus $0.75 per run) and $3.25 on Starter. From 16 October 2026, 1,000 results cost $10.00 on Free.

Every Apify account gets **$5 of free usage each month**, enough for about 330 results. Put many domains or keywords into one run to pay the start fee once. A URL, keyword or brand with no data costs nothing. See the **Pricing** tab for details.

### ⬇️ Input

| Setting | What it does |
|---|---|
| **What to get** | The tool to run: website authority, backlinks, broken links, traffic, keyword ideas, keyword difficulty, keyword metrics, SERP, rank checker, AI visibility, AI Mode, AI Overviews, sitemap, website details or top websites |
| **URLs or domains** | Domains or page URLs to check. AI tools also accept brand names |
| **Keywords** | Keywords to research. The rank checker checks every domain against every keyword |
| **URL mode** | Domain with subdomains, domain only, a folder, or one exact URL |
| **Country** | Two-letter country code for keyword and SERP data (us, gb, de, ...) |
| **Search engine (keyword ideas)** | Source of keyword ideas |
| **Number of websites**, **List**, **Country**, **Category**, **Include website details** | For top websites: how many (up to 1,000), ranking or trending, country, category, and whether to add each site's details |

Example: check the Domain Rating of three sites.

```json
{
  "searchType": "website_authority",
  "urls": ["ahrefs.com", "moz.com", "semrush.com"]
}
```

Example: check where two sites rank for two keywords in the UK.

```json
{
  "searchType": "keyword_rank",
  "urls": ["wikipedia.org", "apify.com"],
  "keywords": ["web scraping", "data extraction"],
  "country": "gb"
}
```

### ⬆️ Output

Every row has the tool name, the URL, keyword or brand it was checked for, the data, and the time it was collected.

Website authority:

```json
{
  "searchType": "website_authority",
  "url": "apify.com",
  "domainRating": 81.0,
  "backlinks": 4013023,
  "referringDomains": 16656,
  "dofollowBacklinksPercent": 90,
  "dofollowReferringDomainsPercent": 70,
  "scrapedAt": "2026-09-30T14:53:48Z"
}
```

Organic traffic (lists shortened):

```json
{
  "searchType": "traffic_overview",
  "url": "apify.com",
  "mode": "subdomains",
  "organicTraffic": 1002359,
  "trafficValueUsd": 362905.0,
  "trafficHistory": [{ "date": "2026-04-01", "organicTraffic": 399536 }],
  "topPages": [{ "url": "https://apify.com/nexgendata/kospi-stock-screener", "traffic": 40067, "sharePercent": 10.11 }],
  "topCountries": [{ "country": "in", "sharePercent": 31.91 }, { "country": "us", "sharePercent": 14.68 }],
  "topKeywords": [{ "keyword": "facebook reels download", "position": 1, "traffic": 339000 }],
  "scrapedAt": "2026-09-30T14:54:51Z"
}
```

Keyword difficulty (SERP shortened to one result):

```json
{
  "searchType": "keyword_difficulty",
  "keyword": "web scraping",
  "country": "us",
  "difficulty": 48,
  "referringDomainsToRankTop10": 77,
  "serpUpdatedAt": "2026-09-24T01:00:30Z",
  "serp": [
    {
      "position": 2,
      "type": "organic",
      "title": "Web scraping",
      "url": "https://en.wikipedia.org/wiki/Web_scraping",
      "domainRating": 97,
      "urlRating": 19,
      "referringDomains": 2137,
      "traffic": 6363,
      "trafficValueUsd": 14296.2,
      "keywords": 316,
      "topKeyword": "web scraping",
      "topKeywordVolume": 9900
    }
  ],
  "scrapedAt": "2026-09-30T14:55:20Z"
}
```

The Output tab has ready-made tables for each kind of data: authority and backlinks, traffic, keywords, SERP and rank, AI visibility, and top websites.

### How can I use Ahrefs SEO data?

- **Link building:** vet link prospects by Domain Rating before outreach, and find broken backlinks to reclaim
- **Competitor research:** compare traffic, top pages and top keywords of your competitors
- **Content planning:** find keyword ideas and questions, then pick the ones with low difficulty
- **Rank tracking:** schedule a daily run to see where your domains rank for your main keywords
- **AI search monitoring:** follow how often AI assistants cite your brand and which pages they pick
- **Lead lists and market maps:** pull the top websites of a country or industry with their traffic
- **SEO reporting:** feed Domain Rating, traffic and rankings into Google Sheets or Looker Studio

### Scheduling and integrations

Save your input as a task and [schedule it](https://docs.apify.com/platform/schedules) daily or weekly to track changes over time. Results can go straight to Google Sheets, Slack, Airtable, a webhook or any tool through Make, Zapier or n8n.

### Scrape more SEO and marketing data

| Actor | What it gets |
|---|---|
| [Google Ads Transparency Scraper - Competitor Ad Creatives](https://apify.com/automly/google-ads-transparency-scraper) | Competitor ad creatives from the Google Ads Transparency Center: advertiser, regions, preview links and first and last shown dates |
| [Facebook Ads Scraper - Meta Ad Library Scraper & API](https://apify.com/automly/facebook-ad-library-scraper) | Facebook and Instagram ads by keyword or Page, with ad text, images and videos |
| [Website Email Scraper - Find Email Addresses in Bulk](https://apify.com/automly/website-email-scraper) | Email addresses, phone numbers and social profiles from any list of websites, for link-building outreach |
| [AI Web Scraper - Structured Data from Any Website](https://apify.com/automly/ai-web-scraper) | Any fields you name, from any website, without selectors or code |
| [Google Maps Scraper](https://apify.com/automly/google-maps-scraper) | Local businesses: name, address, phone, website, rating, reviews and opening hours |

### ❓FAQ

#### How much does it cost?

$15.00 per 1,000 results plus $0.75 per run on the Free plan ($10.00 per 1,000 from 16 October 2026), $3.25 per 1,000 on Starter and higher; see the cost section above.

#### How many results do I get per check?

One row per URL, keyword or brand. Lists inside a row hold up to 20 top backlinks, 10 broken backlinks, the SERP top 10, 20 keyword ideas and 20 questions (with the total number of ideas), 5 top pages, countries and keywords, and up to 1,000 sitemap URLs. The top websites tool returns one row per website, up to 1,000.

#### Do I need an Ahrefs account?

No. You don't need an Ahrefs account, subscription or API key.

#### Which search engines work for keyword ideas?

Google, in any country. Ahrefs currently has keyword ideas for Google only; you are not charged when a search returns nothing.

#### Can I check many domains or keywords at once?

Yes. Add as many as you like to one run.

#### What does URL mode mean?

"Domain with all its subdomains" covers blog.example.com and shop.example.com too. "Domain only" leaves subdomains out, "All pages under this path" covers a folder like example.com/blog/, and "This exact URL" looks at one page.

#### Can I connect Ahrefs Scraper to other tools or AI agents?

Yes. Start runs and download results with the Apify API or the Python and JavaScript clients, send results to Make, Zapier, n8n, Google Sheets or Slack with Apify integrations and webhooks, or let AI assistants and agents run it through the Apify MCP server at [mcp.apify.com](https://mcp.apify.com).

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

The tool collects publicly available SEO data without logging in to any account. SEO data is mostly about websites, but some of it, such as page titles or brand names, can relate to people and may be protected by laws such as the GDPR, so only collect it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

Ahrefs Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by Ahrefs.

#### Something isn't working?

Open the **Issues** tab with the input you used and what you expected. We read every one and usually reply within a day.

### ⭐ Your feedback

Have an idea or found a problem? Open the **Issues** tab and tell us. If Ahrefs Scraper saved you time, a short review on the **Reviews** tab helps other people find it.

# Actor input Schema

## `searchType` (type: `string`):

Pick the data you want. URL tools use the URLs or domains below; keyword tools use the keywords; the rank checker uses both.

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

Enter one or more domains or page URLs (apify.com, https://example.com/blog). Used by the website, backlink, traffic, sitemap, AI and rank tools. For the AI tools, a brand name works too.

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

Enter one or more keywords for keyword ideas, difficulty, metrics, SERP and the rank checker. The rank checker checks every URL above against every keyword.

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

One keyword; the same as adding it to Keywords. Kept so inputs from other Ahrefs actors work unchanged.

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

What part of the website the backlink, broken link and traffic tools look at.

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

Two-letter country code for keyword and SERP data: us, gb, de, fr, in, ...

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

Where keyword ideas come from. Ahrefs currently has keyword ideas for Google only; other engines return none, and nothing is charged for them.

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

How many websites to return from the worldwide ranking (up to 1,000). A country or category list has up to 100.

## `topWebsitesMode` (type: `string`):

The ranking itself, or the websites that moved the most this month.

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

Country name in lowercase with dashes: worldwide, united-states, germany, united-kingdom, india, ...

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

Limit the list to one category.

## `includeDetails` (type: `boolean`):

Add each website's details: exact monthly traffic history, traffic by country, top keywords, competitors, Domain Rating and referring domains history.

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

The default works for every tool.

## Actor input object example

```json
{
  "searchType": "website_authority",
  "urls": [
    "ahrefs.com"
  ],
  "keywords": [
    "seo tools"
  ],
  "mode": "subdomains",
  "country": "us",
  "searchEngine": "Google",
  "topWebsitesLimit": 100,
  "topWebsitesMode": "ranking",
  "topWebsitesCountry": "worldwide",
  "topWebsitesCategory": "all",
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `authority` (type: `string`):

No description

## `traffic` (type: `string`):

No description

## `keywords` (type: `string`):

No description

## `serp` (type: `string`):

No description

## `ai` (type: `string`):

No description

## `topWebsites` (type: `string`):

No description

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

No description

## `report` (type: `string`):

No description

# 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": [
        "ahrefs.com"
    ],
    "keywords": [
        "seo tools"
    ],
    "country": "us",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/ahrefs-seo-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": ["ahrefs.com"],
    "keywords": ["seo tools"],
    "country": "us",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/ahrefs-seo-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 '{
  "urls": [
    "ahrefs.com"
  ],
  "keywords": [
    "seo tools"
  ],
  "country": "us",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/ahrefs-seo-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/ahrefs-seo-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/zQ6HoIJt2CQc7XqFO/builds/30B1Ecw9FSiXz7fGo/openapi.json
