# Ahrefs Alternative — Site Explorer, Keywords & Backlinks (`khadinakbar/ahrefs-alternative`) Actor

Return Ahrefs-style SEO reports: Site Explorer domain overview, organic keywords, competing domains, keyword ideas, and backlinks. Competitor research without an Ahrefs login. Not live Google SERP HTML. Charged $0.01/row plus $0.04/API request.

- **URL**: https://apify.com/khadinakbar/ahrefs-alternative.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** SEO tools, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 seo records

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 Alternative — Site Explorer, Keywords & Backlinks

SEO agencies and AI agents get one Ahrefs-style Site Explorer dataset row from a domain or seed keyword: domain overview (`organicTraffic`, `organicKeywordCount`, `backlinks`, `referringDomains`, `rankScore`), plus organic keywords, competing domains, keyword overview, keyword ideas, and backlinks — ready for Apify API, schedules, and MCP.

### Best fit for this Actor

- Score a competitor domain's organic traffic estimate, keyword count, and backlink summary in one Site Explorer-style row.
- Export the organic keywords a domain ranks for, with volume, CPC, difficulty, and rank.
- Expand a seed phrase into keyword ideas, then keep the ones with workable volume.

When you already have a finished keyword list and only need volume plus CPC, start with [Keyword Search Volume API](https://apify.com/khadinakbar/keyword-search-volume-api). After you pick phrases to watch, continue with [Keyword Rank Tracker](https://apify.com/khadinakbar/keyword-rank-tracker). For Semrush-shaped naming of the same report family, see [SEMRush Alternative](https://apify.com/khadinakbar/semrush-alternative).

### Practical scenario

An SEO lead pastes `semrush.com`, keeps `mode` on `domain_overview`, and runs the Actor. The dataset returns one row with `organicTraffic`, `organicKeywordCount`, `backlinks`, `referringDomains`, and `rankScore`. They then switch `mode` to `organic_keywords` with `maxResults` 5 to inspect the highest-volume ranking phrases before briefing content. Unknown or empty matches finish `SUCCEEDED` with `VALID_EMPTY` and no `seo-record` charge.

### Quick start input

```json
{
  "mode": "domain_overview",
  "target": "semrush.com",
  "locationName": "United States",
  "languageCode": "en",
  "maxResults": 5
}
```

`target` accepts a bare domain or a full URL. Keyword modes use `keywords` instead of `target`.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `mode` | enum | `domain_overview`, `organic_keywords`, `competitors`, `keyword_overview`, `keyword_ideas`, or `backlinks`. Default `domain_overview`. |
| `target` | string | Domain or URL for domain and backlink modes. Example: `semrush.com`. |
| `keywords` | array | Seed phrases for `keyword_overview` and `keyword_ideas`. Example: `["seo tools"]`. |
| `locationName` | string | Country name. Default United States. |
| `languageCode` | string | Language code such as `en`. Default `en`. |
| `maxResults` | integer | Row cap 1–100. Default 5. Domain overview still writes at most one row. |

Owner API credentials are already configured for Store runs. Bring a domain or keyword list; no buyer API key field is required.

### What data you receive

One dataset item is one domain, keyword, competing-domain, or backlink row.

```json
{
  "mode": "domain_overview",
  "target": "semrush.com",
  "domain": "semrush.com",
  "locationName": "United States",
  "languageCode": "en",
  "organicKeywordCount": 1200,
  "organicTraffic": 45000,
  "backlinks": 9000,
  "referringDomains": 1200,
  "rankScore": 450,
  "source": "ahrefs_alternative/domain_overview",
  "status": "OK",
  "fetchedAt": "2026-08-22T00:00:00.000Z"
}
```

| Field | Meaning |
|---|---|
| `organicTraffic` / `organicKeywordCount` | Organic traffic estimate and ranking-keyword count |
| `backlinks` / `referringDomains` | Live backlink summary for the same domain |
| `rankScore` | Upstream SEO rank score, not Ahrefs Domain Rating (DR) |
| `source` | Mode provenance label for the row |

`OUTPUT` and `RUN_SUMMARY` in the default key-value store hold `outcome`, `itemsPushed`, `chargedEventCounts`, and `providerCostUsd`. Download the dataset as JSON, CSV, Excel, or HTML.

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~ahrefs-alternative/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"domain_overview","target":"semrush.com","maxResults":5}'
```

### Use with AI agents through Apify MCP

> Run an Ahrefs-style Site Explorer domain overview for semrush.com in the United States. Return organicTraffic, organicKeywordCount, backlinks, referringDomains, rankScore, source, and fetchedAt. Read OUTPUT.outcome and itemsPushed. Read OUTPUT.outcome and itemsPushed. Treat rankScore as an upstream SEO score (distinct from Ahrefs Domain Rating).

Connect via <https://mcp.apify.com>. Cost signal: about `$0.05` per successful SEO API request plus `$0.01` per saved row.

### Connect the workflow

- When you already have phrases and only need volume plus CPC, then use [Keyword Search Volume API](https://apify.com/khadinakbar/keyword-search-volume-api).
- After you choose phrases to monitor, continue with [Keyword Rank Tracker](https://apify.com/khadinakbar/keyword-rank-tracker).
- For Semrush-named reports from the same backend family, continue with [SEMRush Alternative](https://apify.com/khadinakbar/semrush-alternative).
- For broader SERP capture after keyword selection, continue with [Google SERP All-in-One Scraper](https://apify.com/khadinakbar/google-serp-all-in-one-scraper).

### Pricing

This Actor uses Pay per event plus Apify platform usage. The live Pricing tab is the current source of truth for billing details.

- `apify-actor-start`: $0.00005 per run
- `seo-api-request`: **$0.05** per successful upstream SEO API task
- `seo-record`: **$0.012** per persisted row

A domain-overview prefill is two API tasks plus one row. Empty matches have no `seo-record` charge. Provider cost is recorded in `RUN_SUMMARY.providerCostUsd`.

### How it works

1. Normalize the domain or keyword list for the selected mode.
2. Call the matching upstream SEO API endpoint for that mode.
3. Charge `seo-api-request` after each successful task.
4. Charge `seo-record`, then write each validated dataset row.

### Best results

- Use a real hostname such as `semrush.com` for Site Explorer and organic-keyword modes.
- Keep `maxResults` at 5 while you confirm the output shape, then raise it for exports.
- Treat traffic, volume, and rank as model estimates for public keywords and domains you are authorized to research.
- A valid query with no match finishes `SUCCEEDED` with `VALID_EMPTY`.

### Builder's note

I found that mirroring the SEMRush Alternative owner SEO API stack for an Ahrefs-named Store SKU keeps Site Explorer overview, organic keywords, competing domains, ideas, and backlinks available with credentials already wired. Domain overview merges two provider tasks into one billed row so a first run stays forecastable. Treat `rankScore` as an upstream SEO score, distinct from Ahrefs Domain Rating (DR).

### Legal and responsible use

Use this Actor with public SEO research you are authorized to run. Metrics are independent of Ahrefs Pte. Ltd. Follow applicable law and the upstream data provider terms, and keep the output in your own compliance workflow.

Issues and feature requests: use the Actor Issues tab on Apify.

# Actor input Schema

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

Which Ahrefs-style report to run. domain\_overview returns one Site Explorer-style domain row (organic traffic estimate plus backlink summary). organic\_keywords lists keywords a domain ranks for. competitors lists overlapping domains. keyword\_overview scores seed phrases. keyword\_ideas expands seeds. backlinks lists referring URLs. Default domain\_overview. This is NOT an Ahrefs login or API key field.

## `target` (type: `string`):

Website to analyze for domain\_overview, organic keywords, competing domains, or backlinks. Accepts semrush.com or https://www.semrush.com. Protocol and www are stripped to the hostname except for page-level backlinks. Prefill semrush.com. Not a keyword and not an Ahrefs project URL.

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

Seed phrases for keyword\_overview or keyword\_ideas. Example: \["seo tools"]. Duplicates collapse. Capped by maxResults. Ignored in domain modes. This is NOT a domain list.

## `locationName` (type: `string`):

Country name for keyword and domain Labs reports, such as United States or United Kingdom. Defaults to United States. Use the full country name, not a city. Ignored for backlinks mode.

## `languageCode` (type: `string`):

Language code matching the country, such as en, de, or es. Defaults to en. This is a short code, not a language name like English.

## `maxResults` (type: `integer`):

Maximum dataset rows to write (1-100). Defaults to 5 so quality tests and agent calls stay cheap. domain\_overview always writes at most one row. Caps keyword lists in keyword\_overview.

## `includeSubdomains` (type: `boolean`):

When true, organic keywords and backlink summary include subdomain data. Defaults to true. Does not crawl the live website.

## `excludeTopDomains` (type: `boolean`):

When true, competing-domains mode drops giant generic sites so the list stays closer to real market rivals. Defaults to true. Ignored in other modes.

## Actor input object example

```json
{
  "mode": "domain_overview",
  "target": "semrush.com",
  "keywords": [
    "seo tools"
  ],
  "locationName": "United States",
  "languageCode": "en",
  "maxResults": 5,
  "includeSubdomains": true,
  "excludeTopDomains": true
}
```

# Actor output Schema

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

Domain, keyword, competing-domain, or backlink rows.

## `summary` (type: `string`):

Compact OUTPUT record with outcome, itemsPushed, charges, and warnings.

## `runSummary` (type: `string`):

Detailed RUN\_SUMMARY including providerCostUsd and request counts.

# 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 = {
    "mode": "domain_overview",
    "target": "semrush.com",
    "keywords": [
        "seo tools"
    ],
    "locationName": "United States",
    "languageCode": "en",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/ahrefs-alternative").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 = {
    "mode": "domain_overview",
    "target": "semrush.com",
    "keywords": ["seo tools"],
    "locationName": "United States",
    "languageCode": "en",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/ahrefs-alternative").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 '{
  "mode": "domain_overview",
  "target": "semrush.com",
  "keywords": [
    "seo tools"
  ],
  "locationName": "United States",
  "languageCode": "en",
  "maxResults": 5
}' |
apify call khadinakbar/ahrefs-alternative --silent --output-dataset

```

## MCP server setup

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

```

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/O74WOHAXf6JYTeQIq/builds/MIEG97YzywNlbqGwb/openapi.json
