# Backlink Finder for Wikipedia (`sculptural_delphinium/wikipedia-backlink-finder`) Actor

List every Wikipedia article that links to your domain, in any language, then check each linked URL on your site today: live, redirected, redirected to the homepage, or broken (404/410). Find dead Wikipedia links worth fixing.

- **URL**: https://apify.com/sculptural_delphinium/wikipedia-backlink-finder.md
- **Developed by:** [Josep Peruga](https://apify.com/sculptural_delphinium) (community)
- **Categories:** SEO tools, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 backlink founds

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

## Backlink Finder for Wikipedia

Find every Wikipedia article that links to your site, then see which of those links still work. The Actor asks Wikipedia's official API for all external links pointing at your domain, in any language edition you choose, and checks each linked URL on your live site today:

- **live**: the URL answers 200 (a redirect to the same page over https or with a trailing slash still counts as live)
- **redirected**: it redirects to a different page that answers 200
- **redirected-to-homepage**: it redirects to the homepage, which usually means the content is gone
- **broken**: the URL answers 404 or 410
- **error**: 5xx, a timeout, a redirect loop or a network error
- **not-checked**: robots.txt disallows the URL, or the link is not http(s)

### Why use it

Links from Wikipedia send steady referral traffic, and editors remove or tag dead links. A broken link from a Wikipedia article is usually fixed on your side with one redirect. Use this Actor after a migration or redesign, as a routine check, or to see which of your pages Wikipedia cites and how often.

### Input

- **Domains**: one or more domains, e.g. `example.com`. `www.` is folded into the bare domain.
- **Wikis**: language codes such as `en`, `de`, `fr`, `ja`, or Wikimedia hosts such as `commons.wikimedia.org` and `en.wikivoyage.org`. Default: `en`.
- **Include subdomains**: also list links to `docs.example.com`, `blog.example.com` and so on.
- **Max backlinks per domain** (default 1000): the cap across all wikis.
- **Check linked URLs on the live site** (default on): turn off to only list the backlinks.

```json
{ "domains": ["nodejs.org"], "wikis": ["en", "de"] }
```

### Output

One dataset row per article and linked URL:

```json
{
  "domain": "nodejs.org",
  "wiki": "en.wikipedia.org",
  "articleTitle": "Node.js",
  "articleUrl": "https://en.wikipedia.org/wiki/Node.js",
  "pageId": 26415635,
  "linkedUrl": "https://nodejs.org/en/docs/guides/dont-block-the-event-loop/",
  "status": "broken",
  "finalUrl": "https://nodejs.org/en/docs/guides/dont-block-the-event-loop/",
  "finalStatus": 404,
  "hops": 0,
  "note": null,
  "archivedCopyUrl": "https://web.archive.org/web/2/https://nodejs.org/en/docs/guides/dont-block-the-event-loop/",
  "articlesLinkingToUrl": 1,
  "checkedAt": "2026-10-29T08:00:00.000Z"
}
```

Each linked URL is checked once, however many articles link to it. `articlesLinkingToUrl` shows how many articles in the run cite it, so you can fix the most-cited URLs first. `archivedCopyUrl` opens the latest Wayback Machine copy, so you can see what used to be there.

Key-value store records:

- **BROKEN_LINKS**: the broken URLs, each followed by a tab and the article that links to it, one per line. Map them to new targets and check the result with our [Redirect Map Validator](https://apify.com/sculptural_delphinium/redirect-map-validator).
- **OUTPUT**: per-domain counts for each status, per-wiki totals, and whether each list was complete or hit your cap.

### How it works

1. It calls the MediaWiki API (`list=exturlusage`) on each wiki, for articles only (main namespace), paging through all results. Requests are sequential, identify the Actor in the User-Agent and use `maxlag`, following Wikimedia's API etiquette.
2. Links to other hosts are dropped unless **Include subdomains** is on.
3. Each unique linked URL is requested on your live site. Redirects are followed one hop at a time (up to 10). No page bodies are downloaded, only status codes and headers.

### How it behaves on your site

- It identifies itself as `WikipediaBacklinkFinder/1.0` and obeys robots.txt for that agent (or `*`), including `Crawl-delay` up to 10 s per host. Turn **Respect robots.txt** off only for sites you own or are authorised to test.
- It collects no personal data. It reads only article titles, page IDs and URLs, plus status codes from your site. User pages and talk pages are not searched.

### Pricing

Pay per event: each backlink returned (one article linking to one URL) is one `backlink-found` event. Use **Max backlinks per domain** and the run's maximum cost setting to cap spend. The run stops cleanly when the cap is reached.

### Limitations

- Wikipedia's link table only covers links in article wikitext and templates. A few links added by Lua modules or Wikidata at render time are not listed.
- Very popular domains have hundreds of thousands of Wikipedia links. Raise the cap or narrow the domain to a subdomain for full coverage.
- A page that returns 200 with "not found" content (a soft 404) shows as `live`.
- If the Wikimedia API is down for one wiki, that wiki shows an error in OUTPUT, and the other wikis still run.

### Support

Open an issue on the Actor's Issues tab. Breakages are fixed within 48 hours.

*This Actor is built and maintained by an AI agent working for its publisher. A human owns the account and is responsible for it. It is not affiliated with or endorsed by the Wikimedia Foundation. Wikipedia is a trademark of the Wikimedia Foundation.*

# Actor input Schema

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

Domains to look up, for example example.com. A full URL also works; only its host is used, and www. is folded into the bare domain.

## `wikis` (type: `array`):

Wikipedia language codes (en, de, fr, es, ja...) or Wikimedia hosts such as commons.wikimedia.org or en.wikivoyage.org. Default: English Wikipedia.

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

Also list links to subdomains (docs.example.com, blog.example.com). Off: only example.com and www.example.com.

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

Upper limit on backlinks returned per domain, across all wikis. One backlink is one article linking to one URL, and is one billable event.

## `checkLinks` (type: `boolean`):

Request each linked URL once and report whether it is live, redirected, redirected to the homepage or broken. Off: only list the backlinks.

## `respectRobotsTxt` (type: `boolean`):

Skip linked URLs that the site's robots.txt disallows, and honour Crawl-delay (up to 10 s). Skipped URLs are listed as not-checked. Turn off only for sites you own or are authorised to test.

## `maxConcurrency` (type: `integer`):

Parallel requests to the live site.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each request to the live site.

## Actor input object example

```json
{
  "domains": [
    "nodejs.org"
  ],
  "wikis": [
    "en"
  ],
  "includeSubdomains": false,
  "maxBacklinksPerDomain": 1000,
  "checkLinks": true,
  "respectRobotsTxt": true,
  "maxConcurrency": 4,
  "requestTimeoutSecs": 15
}
```

# Actor output Schema

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

One row per article and linked URL: the article, the URL it links to, and that URL's status on the live site today.

## `brokenLinks` (type: `string`):

Linked URLs that now return 404 or 410, with the article that links to them, tab-separated, one per line.

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

Per-domain counts of backlinks, articles, unique linked URLs and each status, per wiki, stored in the OUTPUT record.

# 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": [
        "nodejs.org"
    ],
    "wikis": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sculptural_delphinium/wikipedia-backlink-finder").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": ["nodejs.org"],
    "wikis": ["en"],
}

# Run the Actor and wait for it to finish
run = client.actor("sculptural_delphinium/wikipedia-backlink-finder").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": [
    "nodejs.org"
  ],
  "wikis": [
    "en"
  ]
}' |
apify call sculptural_delphinium/wikipedia-backlink-finder --silent --output-dataset

```

## MCP server setup

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

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/q80bua28mHHWi0QV5/builds/SXrEn1Aea8udsXEcc/openapi.json
