# Backlink Checker: Ahrefs & Semrush Alternative, Bulk Domains (`alexmorain/seo-backlinks-scraper`) Actor

Check up to 10,000 domains in one run: domain rank 0-100, backlinks, referring domains, spam score, estimated traffic and ranked keywords from DataForSEO. Bulk price from $1.70 per 1,000 domains. Optional backlink and keyword lists, gained and lost backlinks watch, webhook.

- **URL**: https://apify.com/alexmorain/seo-backlinks-scraper.md
- **Developed by:** [Alexis Morain](https://apify.com/alexmorain) (community)
- **Categories:** SEO tools, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 domains

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

### What does SEO Backlinks Scraper do?

**SEO Backlinks Scraper** checks up to **10,000 domains in one run** and returns one row per domain: **domain rank (0-100), backlinks, referring domains, spam score, estimated organic traffic and ranked keywords**. On demand it adds the **list of backlinks**, the **list of ranked keywords** and a **gained and lost backlinks watch**. The data comes from the [DataForSEO](https://dataforseo.com) Backlinks and Labs APIs. No browser, no scraping of Google, no login, no API key to buy.

> **Read this first.** The figures come from **DataForSEO's own web index**. They are **not** Ahrefs' Domain Rating (DR) and **not** Semrush's Authority Score, and they will not match those tools number for number. The domain rank is a 0-100 score computed by DataForSEO. Use this Actor when you need cheap, bulk, programmable SEO metrics; use the original tools when you need their exact numbers. This Actor is an independent project and is **not affiliated with, endorsed by or sponsored by Ahrefs or Semrush**. Both names are used only to say what kind of tool this is an alternative to.

### Why use SEO Backlinks Scraper?

- **Cheap in bulk.** 1,000 complete domains (rank, backlinks, referring domains, spam score, traffic, keyword count) cost **$3.20, or $1.70 on the Gold plan**. Per-domain pricing on the Store typically starts at $0.015 per domain, which is $15 for 1,000 domains. This Actor sends domains to the data provider in blocks of 1,000.
- **The right target, even when you paste the wrong one.** The data provider counts exactly what it is sent. We measured on 7 November 2026: `apify.com` has **2,317,545 backlinks**, `www.apify.com` only **31,198 (1.3%)** and `https://apify.com/store` 10,119 (0.4%). A list pasted from a spreadsheet, with `www.` and full URLs, gives figures that are wrong by 13% to 99% without any warning. By default the Actor reduces every line to its **registered domain** (`https://www.apify.com/store` becomes `apify.com`, `blog.example.co.uk` becomes `example.co.uk`, using the public suffix list), and writes both what you pasted (`input`) and what was sent (`target`) in every row. Need a subdomain or one page? Switch to **Exact** mode.
- **Rank on a 0-100 scale.** The provider's default is 0-1,000 (apify.com: 574). The Actor asks for the 0-100 scale (apify.com: 78), the one people compare.
- **Traffic worldwide or per country.** Estimated organic traffic and keyword count for the whole world or for one of 20 countries, written in every row (apify.com: 36,652 keywords in the US, 88,364 worldwide).
- **Gained and lost backlinks.** Schedule a watch and get the number of new and lost backlinks and referring domains since the last check, plus the new and lost links themselves, **never delivered twice**.
- **Honest rows.** A line that is not a valid domain comes back as an `invalid_input` row and is **not charged**. It never makes the other 9,999 fail.
- **On the Apify platform:** schedule it, call it by API, send the result to Google Sheets, Make, Zapier, n8n or a **webhook** when the run ends.

Use it to qualify a list of prospects by authority and traffic, audit the link profile of your competitors, clean a list of link-building targets, build a recurring SEO dashboard, or alert a client when a backlink is lost.

### What data can SEO Backlinks Scraper extract?

Three row types, in the same dataset, told apart by `rowType`. Every field is always present, `null` when it does not apply.

#### Domain rows (`rowType: domain`)

| Field | Example | Description |
|---|---|---|
| `input`, `target` | `www.apify.com`, `apify.com` | What you pasted, and what was sent to the provider |
| `targetMode` | `domain` | `domain` or `exact` |
| `status`, `error` | `ok` | `ok`, `invalid_input` or `error`. Only `ok` rows are charged |
| `domainRank` | `78` | Provider domain rank, 0-100 |
| `backlinks` | `2317545` | Total backlinks |
| `referringDomains`, `referringDomainsNofollow`, `referringMainDomains` | `13061`, `5698`, `10477` | Referring domains, those linking only with nofollow, and main domains (subdomains merged) |
| `spamScore` | `16` | Provider spam score of the target, 0-100 |
| `organicTraffic`, `organicKeywords` | `211364`, `36652` | Estimated monthly organic traffic and number of ranked keywords |
| `trafficCountry`, `trafficNote` | `us` | Country of the estimate (empty = worldwide), and why traffic is missing when it is |
| `newBacklinks`, `lostBacklinks`, `newReferringDomains`, `lostReferringDomains`, `monitorSince` | `130433`, `14903` | Watch mode only: changes since `monitorSince` |
| `profileSource` | `summary` | `summary` when the profile fields below are filled, `bulk` when they stay `null` (see below) |
| `firstSeen`, `crawledPages` | `2019-01-16 11:42:42 +00:00`, `920533` | When the provider first saw the domain, and how many of its pages it crawled |
| `dofollowBacklinksPercent` | `57.8` | Share of backlinks without a nofollow attribute, in percent with one decimal. `null` when the domain has no backlinks |
| `referringPages`, `referringPagesNofollow`, `referringMainDomainsNofollow`, `referringIps`, `referringSubnets` | `2057052`, `976004`, `3621`, `7820`, `3583` | Referring pages, those linking with nofollow, main domains linking only with nofollow, distinct IPs and subnets |
| `brokenBacklinks`, `brokenPages` | `20243`, `35640` | Backlinks pointing to broken pages, and the broken pages |
| `siteCountry`, `siteCms`, `sitePlatformTypes` | `US`, `ghost`, `["organization"]` | Server country, detected CMS and platform type of the target |
| `topReferringTlds`, `topReferringCountries`, `linkTypes`, `linkAttributes`, `referringPlatformTypes`, `linkPlacements` | `{"com": 588558, ...}` | Number of links per TLD, country, link type, attribute (nofollow, sponsored, ugc...), referring platform type and place on the page (footer, main, nav...). At most the 10 first entries each, an empty key is renamed `unknown` |
| `trendNewLost`, `trendHistory`, `referringDomainsGained`, `referringDomainsLost`, `trendsStatus` | see below | Only with the trends option |
| `checkedAt`, `dataSource` | `2026-11-08T12:00:00Z`, `DataForSEO` | When, and from where |

**Profile fields.** They come with the detailed route the Actor uses for 1 to 3 domains, at no extra charge. In a run of 4 or more domains the Actor uses the cheaper bulk route, which does not return them: those fields stay `null` and `profileSource` is `bulk`. The `fullProfile` option below forces the detailed route for every domain.

#### Backlink rows (`rowType: backlink`, option)

`target`, `urlFrom`, `domainFrom`, `urlTo`, `anchor`, `dofollow`, `pageFromRank`, `domainFromRank`, `backlinkSpamScore`, `firstSeen`, `lastSeen`, `isNew`, `isLost`, `semanticLocation`, `pageFromTitle`, `domainFromCountry`, `itemType`, and in watch mode `changeType` (`new` or `lost`). For a lost link, the date of the loss is in `lastSeen`.

#### Ranked keyword rows (`rowType: ranked_keyword`, option)

`target`, `keyword`, `country`, `position`, `url`, `searchVolume`, `cpc`, `competition`, `keywordDifficulty`, `estimatedTraffic`, `intent`, `monthlySearches` (last 12 months). Best search volume first.

### How to check backlinks in bulk

1. Click **Try for free**.
2. Paste your domains or URLs into **Domains or URLs**, one per line.
3. Choose **Registered domain** (default) or **Exact**, and whether you want traffic.
4. Optionally tick **Backlink list** or **Ranked keywords list**, and set the maximum per domain: it is also your cost cap.
5. Press **Start**, then download the dataset as JSON, CSV or Excel.

### How much does it cost to check backlinks?

You pay per result, plus a small start fee: **$0.002** per GB of memory, minimum one event, so $0.002 with the default 256 MB. Prices fall with your Apify plan. **Free and Bronze** pay the first price, **Silver** the middle one, **Gold** and above the last one.

| Event | Free / Bronze | Silver | Gold+ | When |
|---|---|---|---|---|
| Domain, 1 to 3 domains | $0.05 per domain | same | same | Fixed fee per domain for a chunk of 1 to 3 domains: a run of 1 to 3 domains, or the last 1 to 3 domains of a larger run |
| Batch of up to 1,000 domains | $0.20 per batch | same | same | Runs are split in chunks of 1,000 domains; one fee per chunk of 4 to 1,000 domains started. A last chunk of 1 to 3 domains is charged per domain instead |
| **Domain row** | **$0.003** | $0.00225 | **$0.0015** | One row per valid domain |
| Backlink list | $0.08 per list | same | same | Per domain with a list. In watch mode, per page of up to 1,000 rows read |
| **Backlink row** | **$0.001** | $0.00075 | **$0.0005** | One row per delivered backlink |
| Ranked keywords list | $0.02 per domain | same | same | Per domain with keywords |
| **Ranked keyword row** | **$0.001** | $0.00075 | **$0.0005** | One row per delivered keyword |
| Monitoring batch | $0.07 per batch | same | same | Per block of 1,000 domains when the watch is on |

Invalid lines, errors and rows you already received in a watch are **never charged**. A domain the data provider rejects comes back as a row with `status: error` and is not charged; the other domains of the same run get their rows.

**Examples** (Free or Bronze plan, then Gold in brackets):

- **1 domain**: $0.05 + $0.003 = **$0.053**.
- **1,000 domains** with traffic: $0.20 + 1,000 × $0.003 = **$3.20** (Gold: $0.20 + 1,000 × $0.0015 = **$1.70**).
- **1 domain with its 1,000 best backlinks**: $0.053 + $0.08 + 1,000 × $0.001 = **$1.133** (Gold: $0.0515 + $0.08 + 1,000 × $0.0005 = **$0.6315**).

The spending limit you set on a run stops it at the amount you choose, and **Max backlinks per domain** and **Max keywords per domain** bound each list. The Actor never calls the data provider for something your limit cannot cover.

Free Apify plan: up to 0.15 USD of DataForSEO data per day; paid plans unlimited.

### Full profile and trends (options)

Two options are paid per domain. They are **not active yet**: they switch on when the Actor's price list includes the trends event, which happens after the 14-day notice Apify requires for a price change. Until then, a run that asks for them continues without them, logs a warning, writes it in the run summary (`warnings`) and charges nothing for them.

- `fullProfile` (default `false`): every domain goes through the detailed route, so all profile fields above are filled whatever the size of the list. Charged as *Domain (1 to 3 domains)* per domain instead of the batch fee. The list is processed in chunks of 50 domains.
- `includeTrends` (default `false`): two series for each domain, charged once per domain whose two series were read, never on an error (`trendsStatus: error`, the row is still returned). A page URL in `exact` mode is skipped (`trendsStatus: skipped`).
  - `trendNewLost`: a list of `{date, newBacklinks, lostBacklinks, newReferringDomains, lostReferringDomains}`.
  - `trendHistory`: a list of `{date, rank, backlinks, referringDomains}`, rank on the 0-100 scale.
  - `referringDomainsGained`, `referringDomainsLost`: sums over the whole period.
- `trendsGroupRange` (`day`, `week` or `month`, default `month`) and `trendsDateFrom` (`YYYY-MM-DD`, optional, not before 2019-01-30). Without a date, `month` returns the full history since 2019, `week` the last 2 years and `day` the last 90 days. With `day` the start cannot be more than 366 days back, with `week` more than 5 years. A month or week point is dated at the end of its period, even if the period is not over.

The spending limit, the per-run cost guard and the provider balance guard apply to both options like to the rest of the run.

### Input

See the **Input** tab for every option. The main ones:

| Field | What it does |
|---|---|
| `domains` | Domains or URLs, one per line, up to 10,000 distinct targets. Duplicates are removed |
| `targetMode` | `domain` (default): the whole site, subdomains included. `exact`: the host or URL as written, for one subdomain or one page |
| `includeTraffic`, `trafficCountry` | Estimated traffic and keyword count, worldwide (empty) or one of 20 countries |
| `includeBacklinks`, `maxBacklinksPerDomain` | One row per backlink, up to 100,000 per domain. Default 100 |
| `backlinksMode` | `one_per_domain` (the best link of each referring site, default) or `as_is` (all links) |
| `dofollowOnly` | Leave nofollow links out of the list |
| `includeRankedKeywords`, `maxKeywordsPerDomain`, `keywordsCountry` | Ranked keyword rows, up to 10,000 per domain. Default 100, country `us` |
| `monitor`, `monitorName`, `monitorLookbackDays` | Gained and lost backlinks watch, name of its memory, and how far back the first check looks (default 30 days) |
| `fullProfile` | Detailed route for every domain, to fill the profile fields (paid per domain, see above) |
| `includeTrends`, `trendsGroupRange`, `trendsDateFrom` | Gained and lost over time and history, per day, week or month (paid per domain, see above) |
| `webhookUrl` | Receives a JSON summary when the run ends |
| `cacheMaxAgeHours` | Reuse identical requests for this many hours (default 72, `0` = always fresh). See the tip on the cache below |

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. A domain row:

```json
{
  "rowType": "domain",
  "input": "https://www.apify.com/store",
  "target": "apify.com",
  "targetMode": "domain",
  "domainRank": 78,
  "backlinks": 2317545,
  "referringDomains": 13064,
  "referringDomainsNofollow": 5698,
  "referringMainDomains": 10477,
  "spamScore": 16,
  "organicTraffic": 211364,
  "organicKeywords": 36652,
  "trafficCountry": "us",
  "trafficNote": null,
  "newBacklinks": null,
  "checkedAt": "2026-11-08T12:00:00Z",
  "status": "ok",
  "error": null,
  "dataSource": "DataForSEO"
}
```

A line that is not a domain:

```json
{"rowType": "domain", "input": "not a domain", "target": null, "status": "invalid_input", "error": "Not a valid domain name.", "domainRank": null}
```

A SUMMARY record in the key-value store gives the number of rows by type, the events charged, the lists that failed and, in watch mode, the counters announced against the links retrieved.

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("alexmorain/seo-backlinks-scraper").call(run_input={
    "domains": ["apify.com", "https://www.example.co.uk/blog", "münchen.de"],
    "trafficCountry": "us",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["target"], row["domainRank"], row["backlinks"], row["organicTraffic"])
```

JavaScript:

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('alexmorain/seo-backlinks-scraper').call({
    domains: ['apify.com'],
    includeBacklinks: true,
    maxBacklinksPerDomain: 200,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.rowType === 'backlink').map((r) => r.urlFrom));
```

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/alexmorain~seo-backlinks-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"domains": ["apify.com", "crawlee.dev"], "includeTraffic": false}'
```

### Watch gained and lost backlinks

Set **Watch gained and lost backlinks** and schedule the run. The first run looks back `monitorLookbackDays` days; later runs start one day before the previous check, to allow for index delay. Each domain row carries the new and lost counters, and with **Backlink list** on you also get the new links (`changeType: new`) and the lost ones (`changeType: lost`). A link already delivered is **never delivered or charged again**. The memory is a named key-value store, `seo-backlinks-monitor`, in your account.

We compared the counters with the lists on apify.com over a 3-day window (all links): **130,433 new links announced, 130,454 listed; 14,903 lost announced, 14,903 listed**. With the default list mode (`one_per_domain`) the list counts referring domains, not links, so it is shorter than the counter by design: choose **All links** if you want as many rows as the counters announce.

In watch mode a page of up to 1,000 backlink rows is read for each list, and one backlink list fee is charged per page read, because pages made of links you already received are read but not delivered. The reading stops at the first page made only of known links.

### Tips

- **Start small.** Run 5 domains first and read the rows, then paste the 5,000.
- **Pick the country that matches your market.** Worldwide traffic counts every country (apify.com: 88,364 keywords worldwide against 36,652 in the US).
- **Keep `input` for your join.** `input` is your original line, `target` the normalised one: join your spreadsheet on `input`.
- **Rerun without waiting.** A request identical to one already made from your account in the last 3 days is answered from a cache kept in your account (named key-value store `seo-backlinks-cache`), instantly and with the same figures. The cache is yours: nothing is shared between accounts. Set `cacheMaxAgeHours` to `0` for fresh data; it is also off when the gained / lost backlinks watch is on.
- **Set a spending limit.** The Actor stops cleanly when the next step does not fit under it, and says so in the run status.

### FAQ

#### Is this the same as Ahrefs' Domain Rating or Semrush's Authority Score?

No. The figures come from DataForSEO's own index and its own scoring. Rank, backlink counts and traffic estimates will differ from Ahrefs and Semrush, sometimes a lot, because each provider crawls the web differently. They are consistent across your own domains and over time, which is what you need to compare, sort and monitor. If you need the exact figures of a given tool, use that tool. This Actor is not affiliated with Ahrefs or Semrush.

#### Why does `www.example.com` give fewer backlinks than `example.com`?

Because the provider counts exactly what it is sent. That is why the Actor normalises to the registered domain by default. Use **Exact** mode when you want a subdomain or a page on purpose; traffic and ranked keywords are not available for a page URL, and the row says so in `trafficNote`.

#### Why is the traffic empty on a row?

Either **Estimated organic traffic** is off, or the target is a page URL in Exact mode. A domain the provider does not know returns zeros, and is charged like any other valid domain.

#### How fresh is the data?

It is the provider's index at the time of the run, so recent links can take a few days to appear. Each row has a `checkedAt` date.

#### How many domains can I send?

Up to 10,000 distinct domains per run, in blocks of 1,000.

#### Is it legal?

The data comes from a licensed commercial API, not from scraping websites or search engines. It covers public links between websites and estimates about domains, not personal data.

#### Something is missing or broken

Open an issue on the **Issues** tab with the run link. Fixes usually ship within a day.

### Guide and use cases

Use cases for outbound and automation, the output fields, pricing and common questions are on the [SEO Backlinks Scraper page](https://alexis.morain.fr/en/scrapers/seo-backlinks-scraper/) of my site. The [SEO and search engines family page](https://alexis.morain.fr/en/scrapers/families/seo/) puts it side by side with the other scrapers of the same family.

# Actor input Schema

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

One domain or URL per line, up to 10,000 distinct targets. <code>www.apify.com</code> and <code>https://apify.com/store</code> are both read as <code>apify.com</code> in the default target mode, so every row counts the whole site. Duplicates are removed. A line that is not a valid domain comes back as an <code>invalid_input</code> row and is not charged.

## `targetMode` (type: `string`):

<b>Registered domain</b> (default): the whole site, subdomains included, whatever form you paste. <b>Exact</b>: the host or URL exactly as written, for one subdomain or one page (<code>https://example.com/blog/</code>). Traffic and ranked keywords are not available for a page URL, its row says so.

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

Adds the estimated monthly organic traffic and the number of keywords the domain ranks for. One extra DataForSEO call per 1,000 domains.

## `trafficCountry` (type: `string`):

Country for the traffic estimate and keyword count. <b>Worldwide</b> counts every country (about 2.4 times more keywords than the US alone for apify.com). The choice is written in every row.

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

One extra row per backlink (source page, anchor text, follow flag, ranks, first and last seen). Charged per backlink, plus a small fee per domain.

## `maxBacklinksPerDomain` (type: `integer`):

Upper limit of backlink rows for each domain.

## `backlinksMode` (type: `string`):

<b>One per referring domain</b> (default): the best link of each site that links to you. <b>All links</b>: every link, several per site.

## `dofollowOnly` (type: `boolean`):

Leaves out nofollow links in the backlink list.

## `includeRankedKeywords` (type: `boolean`):

One extra row per keyword the domain ranks for in Google, best search volume first: position, ranked URL, search volume, CPC, competition, difficulty, estimated traffic. Not available for page URLs.

## `maxKeywordsPerDomain` (type: `integer`):

Upper limit of keyword rows for each domain.

## `keywordsCountry` (type: `string`):

Country of the keyword rankings. Default United States.

## `monitor` (type: `boolean`):

Adds the number of new and lost backlinks and referring domains since the last check. With the backlink list on, delivers the new and the lost links too, and <b>never delivers the same link twice</b>: schedule the Actor and only pay for what changed. The memory is kept in a named store, <code>seo-backlinks-monitor</code>, in your account. Counters count links; with the default backlink list mode (one per referring domain) the lists count domains, so they are shorter: choose <i>All links</i> to get as many rows as the counters announce (measured on apify.com: 130,433 announced, 130,454 listed). <b>Billing:</b> in a watch each page of up to 1,000 backlink rows <i>read</i> bills one backlink list fee, because pages made of links you already received are read but not delivered. The reading stops at the first page made only of known links.

## `monitorName` (type: `string`):

Name of the memory. Leave empty to derive it from the list of domains and the options: same list and options, same memory. Use a name to keep one watch when the list changes.

## `monitorLookbackDays` (type: `integer`):

How far back the very first check of a watch looks. Later checks start from the previous check.

## `fullProfile` (type: `boolean`):

Reads every domain through the detailed route, even in a large list, to fill the full-profile fields: first seen, dofollow share, referring pages, IPs and subnets, broken links, server country and CMS, and the breakdowns by TLD, country, link type, attribute, platform and placement. Charged as <b>Domain (1 to 3 domains)</b> for each domain instead of a batch fee. Runs in chunks of 50 domains. Needs the current price list to include the trends event, otherwise it is ignored with a warning and nothing extra is charged.

## `includeTrends` (type: `boolean`):

Adds two series for each domain: backlinks and referring domains gained and lost per period, and rank, backlinks and referring domains over time (<code>trendNewLost</code>, <code>trendHistory</code>), plus the referring domains gained and lost over the period. Charged once per domain whose two series were read, never on an error. Needs the current price list to include the trends event, otherwise it is ignored with a warning and nothing is charged.

## `trendsGroupRange` (type: `string`):

One point per <b>day</b> (default window 90 days, at most 366), <b>week</b> (default 2 years, at most 5 years) or <b>month</b> (default: full history since 2019). The last point of a month is dated at the end of the month, even if it is not over.

## `trendsDateFrom` (type: `string`):

Optional, <code>YYYY-MM-DD</code>, not before 2019-01-30. Leave empty for the default window of the chosen period. With day or week points the date cannot go further back than 366 days or 5 years.

## `webhookUrl` (type: `string`):

Optional. The run summary is sent there by POST when the run ends (Slack, Discord, Zapier...). The URL is never written to a log.

## `cacheMaxAgeHours` (type: `integer`):

A request identical to one already made <b>from your account</b> within this many hours is answered from a cache stored in your account (named key-value store <code>seo-backlinks-cache</code>), with the same data. The backlink index moves daily, so the default is 3 days. Set to <code>0</code> to always fetch fresh data. The cache is off when <b>Monitor</b> is on.

## Actor input object example

```json
{
  "domains": [
    "apify.com"
  ],
  "targetMode": "domain",
  "includeTraffic": false,
  "trafficCountry": "",
  "includeBacklinks": false,
  "maxBacklinksPerDomain": 100,
  "backlinksMode": "one_per_domain",
  "dofollowOnly": false,
  "includeRankedKeywords": false,
  "maxKeywordsPerDomain": 100,
  "keywordsCountry": "us",
  "monitor": false,
  "monitorName": "",
  "monitorLookbackDays": 30,
  "fullProfile": false,
  "includeTrends": false,
  "trendsGroupRange": "month",
  "trendsDateFrom": "",
  "cacheMaxAgeHours": 72
}
```

# Actor output Schema

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

All rows in the default dataset.

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

Targets received, valid, invalid; rows by type; events charged; watch counters announced versus retrieved.

# 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 = {
    "domains": [
        "apify.com"
    ],
    "includeTraffic": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("alexmorain/seo-backlinks-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 = {
    "domains": ["apify.com"],
    "includeTraffic": False,
}

# Run the Actor and wait for it to finish
run = client.actor("alexmorain/seo-backlinks-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 '{
  "domains": [
    "apify.com"
  ],
  "includeTraffic": false
}' |
apify call alexmorain/seo-backlinks-scraper --silent --output-dataset

```

## MCP server setup

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