# Backlink API: Referring Domains & Backlinks Data (`plainrows/backlink-api`) Actor

Backlink API and MCP tool for AI agents: backlinks, referring domains or anchor texts of any domain or URL as JSON (anchor, dofollow, domain rank, spam score, dates). Referring domains checker for link audits. From $1.20 per 1,000 backlinks (Business; $2 on Starter) + $0.035/target.

- **URL**: https://apify.com/plainrows/backlink-api.md
- **Developed by:** [PlainRows](https://apify.com/plainrows) (community)
- **Categories:** SEO tools, Marketing, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 backlink or referring 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

## Backlink API: Referring Domains & Backlinks Data

A **backlink API** you call with one HTTP request, from your code or from an AI agent: send domains or URLs, get back their **backlinks**, **referring domains** or **anchor texts** as clean JSON (linking URL, anchor, dofollow/nofollow, domain rank, page rank, spam score, first and last seen dates). Also a **referring domains checker** for link audits, and an **MCP tool** for Claude, Cursor or any MCP client. Pay per use, no subscription.

It reads a live backlink index through a commercial data API instead of scraping an SEO tool's website: **results in seconds, no login, no blocked runs**, up to 1,000 targets per run and 10,000 rows per target. **You pay per row returned** plus a small fee per target looked up (see Pricing).

Same engine, same data and same prices as our [Backlink Checker](https://apify.com/plainrows/backlink-checker): this page is written for developers and AI agents who call it as an API.

### Call it as an API

**One call, results returned directly** (synchronous: for runs that finish within a few minutes):

```bash
curl -X POST "https://api.apify.com/v2/acts/plainrows~backlink-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"targets": ["backlinko.com"], "mode": "referringDomains", "maxResultsPerTarget": 50}'
```

The response is the JSON array of rows described below.

**Longer runs (many targets or rows):** start the run with `POST https://api.apify.com/v2/acts/plainrows~backlink-api/runs?token=YOUR_APIFY_TOKEN` (same JSON body), then read the rows from the run's default dataset (`GET https://api.apify.com/v2/datasets/{defaultDatasetId}/items`) once it has finished, or use the Apify client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("plainrows/backlink-api").call(run_input={
    "targets": ["backlinko.com", "https://ahrefs.com/blog/"],
    "mode": "backlinks",
    "maxResultsPerTarget": 100,
    "dofollowOnly": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["target"], row.get("sourceUrl"), row.get("anchor"))
```

The run summary (targets checked, lookups charged, rows billed, totals per target, warnings) is the `OUTPUT` record of the run's key-value store.

### Use it from AI agents (MCP)

Add `https://mcp.apify.com?tools=plainrows/backlink-api` to Claude, Cursor or any MCP client. The agent gets a typed tool with the input below (targets, mode, row limit, sort, filters) and gets the rows back as JSON. It pays per lookup and per row, like any other caller, and never more than the maximum cost set for the run.

Typical agent tasks: "list the referring domains of competitor.com sorted by rank", "find the dofollow backlinks of this page", "compare the anchor texts of these three sites".

**n8n, Make, Zapier:** use the Apify integration, pick `plainrows/backlink-api`, and send the rows to Google Sheets, Airtable, your CRM or a database.

### Typical uses

- **Competitor backlink research**: see which sites link to a competitor, with which anchor, and which links pass authority (dofollow).
- **Referring domains check**: list the domains that link to a site, with their backlink counts and the rank they pass, strongest first.
- **Link building prospecting and backlink gap**: list the referring domains of competing sites, then keep the ones that link to competitors but not to you ([free n8n template](https://nadaho.github.io/plainrows/templates/backlink-gap-sheets.json)).
- **Backlink audits**: spot spammy, broken, lost or nofollow links pointing to your site.
- **New link monitoring**: sort by newest to see links found recently; schedule the run weekly.

### What you get

**Backlinks mode** (one row per link):

| Field | Description |
|---|---|
| `sourceUrl`, `sourceDomain`, `sourceTitle` | The page that links to your target, its domain and title |
| `targetUrl` | The page of your target that is linked |
| `anchor`, `linkType` | Anchor text; link type (`anchor`, `image`, `redirect`, `canonical`...) |
| `dofollow`, `relAttributes` | Whether the link passes authority; its rel attributes (`nofollow`, `ugc`, `sponsored`...) |
| `sourceDomainRank`, `sourcePageRank` | Rank of the linking domain and page, 0 to 100 |
| `spamScore` | Spam score of the backlink, 0 to 100 |
| `firstSeen`, `lastSeen` | When the link was first and last found (ISO 8601, UTC) |
| `isNew`, `isLost`, `isBroken`, `isIndirect` | New in the latest crawl update; gone; pointing to a broken page; reaching the target through a redirect |
| `targetStatusCode`, `sourceLanguage`, `sourceServerCountry`, `sourcePlatformTypes`, `sourcePageExternalLinks`, `imageUrl` | Extra context on both pages |

**Referring domains mode** (one row per linking domain):

| Field | Description |
|---|---|
| `referringDomain` | The linking domain |
| `rankPassed` | Rank (0 to 100) this domain passes to your target through its links: high means strong links, not necessarily a big site |
| `backlinks`, `dofollowBacklinks`, `nofollowBacklinks`, `referringPages` | How many links (and pages) from that domain point to your target |
| `spamScore`, `brokenBacklinks` | Spam score of its links; links to broken pages |
| `firstSeen`, `lostDate`, `isLost` | When the domain first linked, and when it stopped |

**Anchor texts mode** (one row per anchor text):

| Field | Description |
|---|---|
| `anchor` | The anchor text used in links to your target (`null` groups the links without text: images, redirects) |
| `backlinks`, `referringPages` | How many links (and pages) use this anchor |
| `referringDomains`, `dofollowReferringDomains` | How many domains link with this anchor, and how many of them without nofollow |
| `rankPassed`, `spamScore`, `brokenBacklinks` | Rank passed through these links; their spam score; links to broken pages |
| `firstSeen`, `lostDate`, `isLost` | When the anchor first appeared, and when it disappeared |

Use it to audit an anchor profile (branded vs exact-match vs generic anchors), spot over-optimization or spammy anchors pointing to you, and see which anchors competitors earn.

**Summary mode** (one row per target: the totals of its backlink profile):

| Field | Description |
|---|---|
| `domainRank` | Rank of the target in the backlink index, 0 to 100 |
| `backlinks`, `dofollowBacklinks` | Total backlinks, and those without nofollow |
| `referringDomains`, `dofollowReferringDomains`, `referringMainDomains` | Linking domains, those with dofollow links, root domains |
| `referringPages`, `referringIps`, `referringSubnets` | Linking pages, IP addresses and subnets (link diversity) |
| `spamScore`, `targetSpamScore` | Spam score of the backlinks, and of the target itself |
| `brokenBacklinks`, `brokenPages` | Links to pages that answer with an error, and those pages |
| `topLinkTlds`, `topLinkCountries`, `linkTypes`, `linkPlatformTypes` | Backlinks by TLD, country, link type and platform of the linking site (top 10 each) |
| `crawledPages`, `externalLinks`, `internalLinks`, `serverCountry`, `cms`, `firstSeen` | Context on the target |

Use it to compare the backlink profiles of many domains in one run (your site against competitors, a list of link prospects or of domains to buy).

Every row also has `target` (what you checked), `targetType` (`domain` or `url`), `totalAvailable` (how many backlinks or referring domains exist for the target with your filters, before your row limit), `found`, `observedAt` and `schemaVersion`. Missing values are always `null`, never guessed.

### Input

```json
{
  "targets": ["backlinko.com", "https://ahrefs.com/blog/"],
  "mode": "backlinks",
  "maxResultsPerTarget": 100,
  "sortBy": "rank",
  "dofollowOnly": false,
  "onePerDomain": false,
  "includeLostLinks": false,
  "includeSubdomains": true
}
```

- **targets**: up to 1,000 per run. A domain (`example.com`) or subdomain covers the whole site; a URL with a path (`https://example.com/blog/post`) covers that page only. `www.` and `https://` are handled for you.
- **mode**: `backlinks` (one row per link), `referringDomains` (one row per linking domain), `anchors` (one row per anchor text, same price per row) or `summary` (one row per target with the totals of its profile; **maxResultsPerTarget** and **sortBy** are ignored).
- **maxResultsPerTarget**: 1 to 10,000 (default 100). Big sites have millions of links: you get the first rows in your sort order.
- **sortBy**: `rank` (strongest first, default: linking domain rank in backlinks mode, rank passed in referring domains and anchors modes), `newest` (most recently found first), or `backlinks` (referring domains or anchors with the most links first).
- **dofollowOnly**: skip nofollow links. **onePerDomain**: keep one link per linking domain. **includeLostLinks**: also return links that disappeared. **includeSubdomains**: count links to the target's subdomains too.

### Output example

Real row from a run on 2026-10-07 of the same code (Backlink Checker; target `backlinko.com`, backlinks mode, default sort by domain rank):

```json
{
  "target": "backlinko.com",
  "targetType": "domain",
  "found": true,
  "sourceUrl": "https://apps.apple.com/us/app/seoquake-go/id1184890971",
  "sourceDomain": "apps.apple.com",
  "sourceTitle": "‎SEOquake Go on the App Store",
  "targetUrl": "https://backlinko.com/tools/seo-checker",
  "anchor": "App Support",
  "linkType": "anchor",
  "dofollow": true,
  "relAttributes": [],
  "sourceDomainRank": 100,
  "sourcePageRank": 7,
  "spamScore": 20,
  "firstSeen": "2019-06-17T23:37:10.000Z",
  "lastSeen": "2025-10-06T10:16:44.000Z",
  "isNew": false,
  "isLost": false,
  "isBroken": false,
  "isIndirect": true,
  "targetStatusCode": 200,
  "sourceLanguage": "en",
  "sourceServerCountry": "US",
  "sourcePlatformTypes": [
    "ecommerce"
  ],
  "sourcePageExternalLinks": 30,
  "imageUrl": null,
  "totalAvailable": 885847,
  "observedAt": "2026-10-07T13:15:07.795Z",
  "schemaVersion": "1.0"
}
```

A target with no backlink returns one free row: `{"target": "...", "targetType": "domain", "found": false, "totalAvailable": 0, ...}`.

### Pricing

Pay per use, no subscription. See the **Pricing** tab for current prices. Two events:

- **Backlink or referring domain returned**: one per row in your dataset, cheaper on higher Apify plans.
- **Target looked up**: a flat fee per domain or URL checked, because each lookup in the backlink index has a fixed cost. When you ask for more than 1,000 rows for one target, each extra block of 1,000 rows is one more lookup.

**Example: 1 target, 1,000 backlinks** = 1 lookup ($0.035) + 1,000 rows: **$2.04 on the Starter plan, $1.64 on Scale, $1.24 on Business** (prices of the Pricing tab on October 15, 2026: $0.002, $0.0016 and $0.0012 per row).

**Summary mode: 1 target** = 1 lookup + 1 row: **$0.037 on the Starter plan** ($0.035 + $0.002), so 100 domains compared = $3.70.

A target with no backlink found is charged its lookup fee only (its `found: false` row is free). Invalid targets, duplicates and lookups that fail are never charged. The run never spends more than the maximum cost you set: it stops before a lookup it could not pay for.

**Free Apify plan:** each run checks up to 2 targets with up to 20 rows each, so you can check the output. A paid Apify plan removes these limits.

### What this is not

- **Not Ahrefs, Semrush or Moz data.** Ranks and spam scores come from an independent backlink index (DataForSEO), on their own 0 to 100 scale; they do not match Ahrefs DR or Moz DA exactly, and link counts differ between tools.
- No traffic or keyword rankings: rows are backlinks, referring domains, anchor texts or backlink profile totals.
- Not affiliated with Ahrefs, Semrush, Moz or Google.

### Run summary

Each run stores a summary in the key-value store (`OUTPUT`): targets checked, lookups charged, rows billed, targets with no backlinks, total backlinks available per target, duplicates and invalid targets, and anything skipped because of the free-plan or budget limit.

### FAQ

**Is this the same as Backlink Checker?**
Yes: [Backlink Checker](https://apify.com/plainrows/backlink-checker) runs exactly the same code, with the same data and prices. Use either one; this page documents the API and MCP use.

**How do I check the anchor text profile of a website?**
Run in `anchors` mode with **sortBy** `backlinks`: one row per anchor text pointing to the site, with how many backlinks and referring domains use it, most used first. Same price per row as backlinks.

**How do I see who links to a website?**
Enter the domain in **targets** and run in `backlinks` mode: one row per linking page with anchor text, dofollow flag, ranks and dates. Use `referringDomains` mode for one row per linking website.

**Can I check the backlinks of a single page?**
Yes: give the full URL with its path (`https://example.com/blog/post`); a bare domain covers the whole site.

**How do I find new or lost backlinks?**
Sort by `newest` to see the most recently found links first, and turn on **includeLostLinks** to also get links that disappeared (`isLost: true`).

**Is this Ahrefs or Moz data?**
No. Ranks and spam scores come from an independent backlink index (DataForSEO) on their own 0-100 scale, so they do not match Ahrefs DR or Moz DA.

**How many backlinks can I get?**
1 to 10,000 per target and run (**maxResultsPerTarget**), strongest first by default.

**Can I check backlinks in bulk, for many domains at once?**
Yes: this is a bulk backlink checker. Put up to 1,000 domains or URLs in **targets** (one per line) and they are checked in one run, each row tagged with its target. Each target costs one index lookup plus the rows you get (see Pricing), so for a quick overview of many sites use `referringDomains` mode or **onePerDomain** with a small **maxResultsPerTarget** (e.g. 20). To get only the totals of thousands of sites (domain rank, spam score, number of backlinks and referring domains, one row per site, about $0.002 per site on the Starter plan for 1,000 sites instead of one $0.035 lookup per site; prices of its Pricing tab on October 19, 2026), use our [Domain Authority Checker](https://apify.com/plainrows/domain-authority-checker). The free Apify plan is limited to 2 targets per run.

### More PlainRows tools

Same pay-per-result pricing, same clean JSON, built to chain together in n8n, Make, Zapier or AI agents.

- **SEO and keywords:** [Keyword Search Volume, CPC & Difficulty](https://apify.com/plainrows/keyword-search-volume) · [Keyword Planner Alternative (Bulk Search Volume & CPC)](https://apify.com/plainrows/keyword-planner-alternative) · [Bing Keyword Search Volume & CPC](https://apify.com/plainrows/bing-keyword-search-volume) · [Keyword Ideas Generator](https://apify.com/plainrows/keyword-ideas-generator) · [Google Autocomplete & People Also Ask](https://apify.com/plainrows/google-autocomplete-questions) · [Google Trends Explorer](https://apify.com/plainrows/google-trends-explorer) · [Website Organic Traffic & Top Keywords](https://apify.com/plainrows/domain-seo-overview) · [SEO Competitors & Keyword Gap Finder](https://apify.com/plainrows/seo-competitors-keyword-gap) · [Bulk Domain Authority Checker](https://apify.com/plainrows/domain-authority-checker) · [Backlink Checker](https://apify.com/plainrows/backlink-checker) · [Broken Link Checker](https://apify.com/plainrows/broken-link-checker) · [AI Search Visibility Tracker (ChatGPT, Gemini, AI Mode)](https://apify.com/plainrows/ai-search-brand-visibility) · [Google Maps Rank Tracker (Geo-Grid Local SEO)](https://apify.com/plainrows/google-maps-rank-tracker)
- **Leads and companies:** [Google Maps Scraper](https://apify.com/plainrows/google-maps-businesses) · [Google Maps Email Extractor](https://apify.com/plainrows/google-maps-email-extractor) · [Google Maps Businesses Without Website](https://apify.com/plainrows/google-maps-no-website-leads) · [Yellow Pages Australia Scraper](https://apify.com/plainrows/yellowpages-au-scraper) · [Website Technology Checker](https://apify.com/plainrows/website-tech-stack) · [Website Email Extractor](https://apify.com/plainrows/website-email-extractor) · [Contact Details Scraper (Emails, Phones, Socials)](https://apify.com/plainrows/contact-details-scraper) · [ATS Jobs Scraper (Workday, Greenhouse, Lever, Ashby)](https://apify.com/plainrows/ats-job-postings) · [Workday Jobs Scraper](https://apify.com/plainrows/workday-jobs-scraper) · [Greenhouse Jobs Scraper](https://apify.com/plainrows/greenhouse-jobs-scraper) · [Lever Jobs Scraper](https://apify.com/plainrows/lever-jobs-scraper) · [Ashby Jobs Scraper](https://apify.com/plainrows/ashby-jobs-scraper) · [Google Jobs Scraper](https://apify.com/plainrows/google-jobs-scraper) · [Reed.co.uk Jobs Scraper (UK)](https://apify.com/plainrows/reed-jobs-scraper) · [jobs.ch & jobup.ch Jobs Scraper (Switzerland)](https://apify.com/plainrows/jobs-ch-scraper) · [Arbeitsagentur Jobs Scraper (Germany)](https://apify.com/plainrows/arbeitsagentur-jobs-scraper) · [Gupy Jobs Scraper (Brazil)](https://apify.com/plainrows/gupy-jobs-scraper) · [Catho Jobs Scraper (Brazil)](https://apify.com/plainrows/catho-jobs-scraper) · [Vagas.com.br Jobs Scraper (Brazil)](https://apify.com/plainrows/vagas-jobs-scraper) · [Jobs.cz Scraper (Czech Republic)](https://apify.com/plainrows/jobs-cz-scraper) · [Google Ads Scraper (Transparency Center)](https://apify.com/plainrows/google-ads-transparency) · [Company Registry Lookup (SIRENE, LEI, Brreg)](https://apify.com/plainrows/company-registry-lookup) · [Public Tenders Search (EU TED & UK)](https://apify.com/plainrows/public-tenders-search)
- **E-commerce and travel:** [Amazon Product Search Scraper](https://apify.com/plainrows/amazon-product-search) · [Google Shopping Prices Scraper](https://apify.com/plainrows/google-shopping-prices) · [Google Hotels Prices Scraper](https://apify.com/plainrows/google-hotels-prices) · [Google Hotels Scraper](https://apify.com/plainrows/google-hotels-scraper) · [Tripadvisor Reviews Scraper](https://apify.com/plainrows/tripadvisor-reviews) · [Trustpilot Reviews Scraper](https://apify.com/plainrows/trustpilot-reviews)
- **Marketplaces and classifieds:** [AliExpress Scraper](https://apify.com/plainrows/aliexpress-scraper) · [Kleinanzeigen Scraper (Germany)](https://apify.com/plainrows/kleinanzeigen-scraper) · [AutoScout24 Scraper (Cars, Europe)](https://apify.com/plainrows/autoscout24-scraper) · [Kijiji Scraper (Canada)](https://apify.com/plainrows/kijiji-scraper) · [Marktplaats Scraper (Netherlands)](https://apify.com/plainrows/marktplaats-scraper) · [Property Finder Scraper (UAE)](https://apify.com/plainrows/propertyfinder-scraper) · [Redfin Scraper (US Homes for Sale)](https://apify.com/plainrows/redfin-scraper) · [Otomoto Scraper (Polish Car Listings)](https://apify.com/plainrows/otomoto-scraper) · [Otodom Scraper (Poland Property)](https://apify.com/plainrows/otodom-scraper) · [Imovirtual Scraper (Portugal Property)](https://apify.com/plainrows/imovirtual-scraper) · [Standvirtual Scraper (Portugal Cars)](https://apify.com/plainrows/standvirtual-scraper) · [Immoweb Scraper (Belgium Property)](https://apify.com/plainrows/immoweb-scraper) · [Blocket Scraper (Sweden)](https://apify.com/plainrows/blocket-scraper) · [FINN.no Scraper (Norway)](https://apify.com/plainrows/finn-scraper) · [coches.net Scraper (Spain Cars)](https://apify.com/plainrows/coches-net-scraper) · [2dehands Scraper (Belgium)](https://apify.com/plainrows/2dehands-scraper) · [Storia Scraper (Romania Property)](https://apify.com/plainrows/storia-scraper) · [Autovit Scraper (Romania Cars)](https://apify.com/plainrows/autovit-scraper) · [FINN.no Car Scraper (Norway Cars)](https://apify.com/plainrows/finn-cars-scraper) · [DBA Scraper (Denmark)](https://apify.com/plainrows/dba-scraper) · [Tori.fi Scraper (Finland)](https://apify.com/plainrows/tori-scraper)
- **Content and media:** [Google News Scraper](https://apify.com/plainrows/google-news-scraper) · [YouTube Search Scraper](https://apify.com/plainrows/youtube-search-scraper) · [YouTube Search API (JSON)](https://apify.com/plainrows/youtube-search-api) · [YouTube Comments Scraper](https://apify.com/plainrows/youtube-comments-scraper) · [Google Images Scraper](https://apify.com/plainrows/google-images-scraper) · [Website Screenshot API](https://apify.com/plainrows/website-screenshot) · [Google Maps Reviews Scraper](https://apify.com/plainrows/google-maps-reviews) · [Google Reviews Scraper](https://apify.com/plainrows/google-reviews-scraper) · [App Store & Google Play Reviews Scraper](https://apify.com/plainrows/app-reviews-scraper) · [App Store & Google Play App Details Scraper](https://apify.com/plainrows/app-details-scraper) · [Google Play Reviews Scraper](https://apify.com/plainrows/google-play-reviews-scraper) · [App Store Reviews Scraper](https://apify.com/plainrows/app-store-reviews-scraper)

### Support

Missing a field or found a bug? Open an issue on this page. Issues are read and answered.

# Actor input Schema

## `targets` (type: `array`):

One per line. A domain ("example.com", also covers its subdomains) or a subdomain gives the backlinks of the whole site; a full URL with a path ("https://example.com/blog/post") gives the backlinks of that page only. Up to 1,000 targets per run.

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

Backlinks: each linking page with anchor, dofollow, ranks and dates. Referring domains: each domain that links to the target, with its number of backlinks. Anchor texts: each anchor used in links to the target, with how many backlinks and referring domains use it (anchor profile audit, over-optimization checks). Summary: one row per target with its total backlinks, referring domains, domain rank, spam score, broken links and top link countries and TLDs (compare many domains at once; maximum rows is ignored).

## `maxResultsPerTarget` (type: `integer`):

Each row returned is billed; targets with more backlinks are cut at this number (best-ranked first by default). Above 1,000, each extra block of 1,000 rows adds one lookup fee (see Pricing).

## `sortBy` (type: `string`):

Order of the rows, which also decides which rows you get when a target has more than the maximum. Not used in summary mode.

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

Skip nofollow links. In referring domains mode, only domains with dofollow links are listed and counts cover dofollow links only.

## `onePerDomain` (type: `boolean`):

Backlinks mode: keep only the best link from each linking domain (handy to scan a large profile).

## `includeLostLinks` (type: `boolean`):

Also return links that were found before but are gone now (isLost = true). Off: live links only.

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

For a domain target, also count links pointing to its subdomains (www, blog, shop...).

## Actor input object example

```json
{
  "targets": [
    "backlinko.com"
  ],
  "mode": "backlinks",
  "maxResultsPerTarget": 100,
  "sortBy": "rank",
  "dofollowOnly": false,
  "onePerDomain": false,
  "includeLostLinks": false,
  "includeSubdomains": true
}
```

# Actor output Schema

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

No description

## `referringDomains` (type: `string`):

No description

## `summary` (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 = {
    "targets": [
        "backlinko.com"
    ],
    "maxResultsPerTarget": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainrows/backlink-api").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 = {
    "targets": ["backlinko.com"],
    "maxResultsPerTarget": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("plainrows/backlink-api").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 '{
  "targets": [
    "backlinko.com"
  ],
  "maxResultsPerTarget": 100
}' |
apify call plainrows/backlink-api --silent --output-dataset

```

## MCP server setup

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

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/kjGufzmIxRyWRV0wq/builds/utu5SftbRpuLbdPVj/openapi.json
