# Ahrefs SEO Metrics Scraper (DR, Traffic, Keywords) (`steadfetch/ahrefs-scraper`) Actor

Extract public SEO metrics for any website from ahrefstop.com profiles: Domain Rating, referring domains, monthly organic traffic, traffic value, top keywords with volume and position, competitors, country breakdown and monthly history. Clean JSON, HTTP only, no browser.

- **URL**: https://apify.com/steadfetch/ahrefs-scraper.md
- **Developed by:** [Steadfetch](https://apify.com/steadfetch) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 domain profile delivereds

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/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 SEO Metrics Scraper (DR, Traffic, Keywords)

Pull the public SEO profile of any website into clean JSON: **Domain Rating (DR),
referring domains, monthly organic traffic, traffic value, top keywords with
volume and position, competitors, country breakdown and monthly history** -
from the public ahrefstop.com profile pages (no login, no account, no paywall).

### What it does

Give it one website URL (or a batch of domains) and it returns one dataset item
per domain with:

- **Web authority**: Domain Rating (DR 0-100), referring (linking) websites
  count with month-over-month delta, and the monthly referring-domains history.
- **Organic search traffic**: monthly visits, traffic value in USD, total
  keyword count, each with the source's month-over-month delta.
- **Top keywords**: the public top keywords the domain ranks for, with search
  volume, traffic and SERP position (plus the deltas the source shows).
- **Competitors**: top competing websites with their search traffic and page
  counts.
- **Traffic by country**: top public countries with traffic, delta and share.
- **History**: monthly traffic/value series and referring-domains series
  (capped by the `historyMonths` input, 12 by default).
- **Context**: display name, site description, worldwide rank by traffic and
  similarly ranked websites.

#### Input fields

| Field | Type | Default | Meaning |
|---|---|---|---|
| `url` | string | prefilled | Website URL or bare domain (e.g. `https://www.make.com/en/pricing` or `make.com`). `www.` is removed automatically. Provide `url`, `domains` or both; the run fails fast when both are empty. |
| `domains` | array | (optional) | Optional extra domains/URLs, one profile item each. |
| `keyword` | string | (optional) | Compatibility field (same name as the leading alternative). It is recorded in each result as `requestedKeyword`; the source serves the top keywords the domain ranks for, so it does not filter them. |
| `country` | string | (optional) | Compatibility field (same name as the leading alternative). Recorded as `requestedCountry`; the source serves one keyword country context per profile (usually the United States). |
| `include_web_authority` | boolean | `true` | DR, referring domains and their history. |
| `include_traffic` | boolean | `true` | Organic traffic, traffic value, keyword count. |
| `include_keywords` | boolean | `true` | Top keywords. |
| `include_competitors` | boolean | `true` | Competitors table. |
| `include_locations` | boolean | `true` | Traffic by country. |
| `include_history` | boolean | `true` | Monthly histories. |
| `historyMonths` | integer | `12` | Most recent months of history to return (1-240). |
| `maxItems` | integer | `100` | Maximum number of domain profiles per run. |
| `strictSchema` | boolean | `true` | Fail the run when an item violates the output schema. |
| `proxyConfiguration` | object | (optional) | Optional Apify proxy settings. |

Domains the source has no public profile for still return one item with
`dataAvailable: false` and a `note`, instead of failing the whole run.

### Example output

```json
{
  "url": "https://ahrefstop.com/websites/make.com",
  "title": "make.com's Search traffic, Ranking and Backlinks",
  "scrapedAt": "2026-11-24T12:00:00.000Z",
  "domain": "make.com",
  "dataAvailable": true,
  "displayName": "Make - The visual automation platform",
  "rankByTraffic": null,
  "domainRating": 90,
  "trafficMonth": "November 2026",
  "organicTraffic": 236000,
  "organicTrafficDelta": "-625.7K",
  "trafficValue": 199000,
  "trafficValueDelta": "\u2212$16.2K",
  "keywordsCount": 150400,
  "backlinksMonth": "November 2026",
  "linkingWebsites": 37300,
  "linkingWebsitesDelta": "+3.7K",
  "keywordCountry": "United States",
  "topKeywords": [
    {
      "keyword": "example keyword",
      "volume": 391000,
      "volumeDelta": "+12K",
      "traffic": 18800,
      "trafficDelta": "+13.2K",
      "position": 7,
      "positionDelta": "\u21916"
    }
  ],
  "competitors": [
    { "domain": "example-competitor.com", "traffic": 1400000, "trafficDelta": "-703.8K", "pages": 3000 }
  ],
  "locations": [
    { "country": "United States", "traffic": 78600, "trafficDelta": "-5.6K", "share": 33.3 }
  ],
  "similarRanked": [
    { "domain": "example-ranked.com", "traffic": 3600000000, "rank": 1 }
  ],
  "trafficHistory": [
    { "month": "2026-11-01", "traffic": 236000, "value": 199000 }
  ],
  "linkingWebsitesHistory": [
    { "month": "2026-11-01", "linkingWebsites": 37345 }
  ],
  "requestedKeyword": "ai automation",
  "requestedCountry": "us",
  "note": null
}
```

Compact source values are parsed into numbers (`236K` -> `236000`,
`$199K` -> `199000` (deltas keep the source's unicode minus), `37.3K` -> `37300`, `1.4M` -> `1400000`,
`3.6B` -> `3600000000`) while the raw delta strings are kept for reference.
Unknown values are `null`, never missing.

### Pricing

Pay per event (charged by the Apify platform, no subscription needed):

- `apify-actor-start`: $0.00005 per run (Apify-recommended default).
- `apify-default-dataset-item`: **$0.005 per domain profile** = **5 USD per 1,000 results**.

A single-domain run finishes in well under a minute at 256 MB, so the per-item
price keeps margin over platform compute. This Actor bills only the two
synthetic events above; it charges no `monitor-check` event. Compare: the
leading alternative charges $0.025 per result for comparable fields.

### FAQ

**Where does the data come from?** Public profile pages on ahrefstop.com
(https://ahrefstop.com/websites/<domain>), a public SEO metrics site built on
Ahrefs data. The Actor fetches the same pages a browser would; it never logs
in, never touches cookies and never bypasses a paywall.

**How fresh is the data?** The source publishes monthly snapshots; each item
carries the source's own month labels (`trafficMonth`, `backlinksMonth`) and
the scrape timestamp (`scrapedAt`).

**Why does `rankByTraffic` return null for good sites?** The source shows
">1000" when a domain ranks beyond its public top list; only numeric ranks are
returned.

**Why do keywords/competitors/locations show only a few rows?** The source
limits the public rows per profile (the rest sit behind a signup on their
side). The Actor returns exactly the public subset, and `keywordCountry`
tells you which country the keyword rows refer to.

**Does it support multiple domains?** Yes: pass `domains` (array) alone or
together with `url`. Each domain produces one item, capped by `maxItems`.

**What if a domain is not covered?** You get one item with
`dataAvailable: false` and a `note`: the run still finishes.

**Do I need an Ahrefs account or API key?** No. This Actor requires no login
and no API keys.

### Maintenance

Tested daily by the Steadfetch QA rotation (the Store example input runs every
day and must finish with at least one result). Parsing lives in
`src/extract.ts` and is covered by offline tests against saved HTML fixtures,
so the suite never touches the network. If the source layout changes, the
daily run fails and the fix ships as a PR within 24 hours.

# Actor input Schema

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

The website to analyze. Accepts a full URL (https://www.make.com/en/pricing) or a bare domain (make.com). The www. prefix is removed automatically. Provide url, domains or both.

## `domains` (type: `array`):

Optional list of additional websites (full URLs or bare domains), one profile each. Combined with the Website URL field.

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

Optional seed keyword, accepted for compatibility with the leading alternative. It is recorded in each result as requestedKeyword; ahrefstop.com serves the top keywords the domain ranks for, so this input does not filter them.

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

Optional country context, accepted for compatibility with the leading alternative. It is recorded in each result as requestedCountry; ahrefstop.com serves one keyword country context per profile (usually the United States).

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

Return Domain Rating, referring (linking) websites count and its monthly history.

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

Return monthly organic traffic, traffic value and keyword count with their month-over-month deltas.

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

Return the public top keywords with search volume, traffic and position.

## `include_competitors` (type: `boolean`):

Return the top competing websites with their traffic and page counts.

## `include_locations` (type: `boolean`):

Return the organic traffic breakdown by country (top public countries with traffic and share).

## `include_history` (type: `boolean`):

Return the monthly traffic/value history and the referring-domains history (capped by History months).

## `historyMonths` (type: `integer`):

How many most-recent months of history to return per profile (traffic/value and referring domains).

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

Maximum number of domain profiles to push to the dataset (one item per domain).

## `strictSchema` (type: `boolean`):

Fail the run when an item does not match the OUTPUT schema. Keep enabled: Steadfetch never publishes Actors without output-schema validation.

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

Optional proxy settings for the public ahrefstop.com pages.

## Actor input object example

```json
{
  "url": "https://www.make.com/en/pricing",
  "keyword": "ai automation",
  "country": "us",
  "include_web_authority": true,
  "include_traffic": true,
  "include_keywords": true,
  "include_competitors": true,
  "include_locations": true,
  "include_history": true,
  "historyMonths": 12,
  "maxItems": 10,
  "strictSchema": true
}
```

# Actor output Schema

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

Dataset items validated against the item schema in dataset_schema.json (fields).

# 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": "https://www.make.com/en/pricing",
    "keyword": "ai automation",
    "country": "us",
    "include_web_authority": true,
    "include_traffic": true,
    "include_keywords": true,
    "include_competitors": true,
    "include_locations": true,
    "include_history": true,
    "historyMonths": 12,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadfetch/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": "https://www.make.com/en/pricing",
    "keyword": "ai automation",
    "country": "us",
    "include_web_authority": True,
    "include_traffic": True,
    "include_keywords": True,
    "include_competitors": True,
    "include_locations": True,
    "include_history": True,
    "historyMonths": 12,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("steadfetch/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": "https://www.make.com/en/pricing",
  "keyword": "ai automation",
  "country": "us",
  "include_web_authority": true,
  "include_traffic": true,
  "include_keywords": true,
  "include_competitors": true,
  "include_locations": true,
  "include_history": true,
  "historyMonths": 12,
  "maxItems": 10
}' |
apify call steadfetch/ahrefs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadfetch/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/nxoOydGg0WxAZas4X/builds/KX6PreGalfKD7wuZg/openapi.json
