# Wikipedia Competitor Link Gap Finder (`sculptural_delphinium/wikipedia-link-gap`) Actor

Find the Wikipedia articles that link to your competitors but not to you, in any language. Each gap shows which rivals are cited, the exact URLs, and the article's 30-day pageviews, so you can see where your content is missing.

- **URL**: https://apify.com/sculptural_delphinium/wikipedia-link-gap.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 $5.00 / 1,000 gap articles

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

## Wikipedia Competitor Link Gap Finder

Find the Wikipedia articles that link to your competitors but not to you. You enter your domain and up to 10 competitor domains. The Actor asks Wikipedia's official API for every article that links to each site, in any language edition you choose, and drops the articles that already link to you. Each remaining article is a gap: a topic where Wikipedia editors cite a rival and not you.

Each gap comes with:

- which competitors the article cites, and the exact URLs
- the article's pageviews over the last 30 days, so you can start with the articles readers actually see
- the article's length, its last edit time, and a link to its Talk page

### Why use it

A competitor's Wikipedia citations show which of their pages editors treat as reliable sources: research, documentation, data, original reporting. A gap tells you which topics your content does not cover yet, or covers without anyone noticing. Use it for content planning, digital PR research, and to check how your site's coverage on Wikipedia compares with your competitors', language by language.

**Read this before editing Wikipedia.** Wikipedia's [conflict of interest guideline](https://en.wikipedia.org/wiki/Wikipedia:Conflict_of_interest) says you should not add links to your own site to articles. If you think your page is a better source, disclose your connection and suggest it on the article's Talk page (the `talkPageUrl` field), so independent editors can decide. Links from Wikipedia are `nofollow`; their value is referral traffic and credibility, not link equity. This Actor is a research tool and does not edit anything.

### Input

- **Your domain(s)**: your own site, e.g. `example.com`. Add every domain you own (`example.com`, `example.co.uk`); an article linking to any of them is not a gap.
- **Competitor domains**: 1 to 10 domains.
- **Wikis**: language codes such as `en`, `de`, `fr`, `ja`, or hosts such as `en.wikivoyage.org`. Default: `en`.
- **Minimum competitors cited** (default 1): set it to 2 or more to keep only articles that cite several rivals.
- **Include subdomains** (default off): also count `docs.example.com`, `blog.competitor.com` and so on.
- **Add pageviews and last edit** (default on).
- **Max gap articles** (default 1000): the cap on reported rows, which is also the cap on charged events.
- **Max links listed per competitor** (default 5000 per wiki): listing is free; raise it for very large competitors.

```json
{
  "yourDomains": ["plausible.io"],
  "competitorDomains": ["matomo.org", "usefathom.com", "simpleanalytics.com"],
  "wikis": ["en", "de"]
}
```

### Output

One dataset row per gap article. Rows are sorted by the number of competitors cited, then by pageviews. A real row from the example input above (English Wikipedia, November 2026):

```json
{
  "wiki": "en.wikipedia.org",
  "articleTitle": "Long-term support",
  "articleUrl": "https://en.wikipedia.org/wiki/Long-term_support",
  "pageId": 39758769,
  "competitorsCited": ["matomo.org"],
  "competitorCount": 1,
  "competitorLinkCount": 1,
  "competitorLinks": [
    { "domain": "matomo.org", "url": "https://matomo.org/blog/2016/01/announcing-long-term-support-in-piwik-2-the-analytics-platform-for-your-mission-critical-projects/" }
  ],
  "pageviews30d": 2253,
  "articleLength": 32109,
  "lastEditedAt": "2026-08-10T02:34:10Z",
  "talkPageUrl": "https://en.wikipedia.org/wiki/Talk:Long-term_support",
  "yourDomainListComplete": true
}
```

That run found 6 gap articles: 4 on English Wikipedia (including *List of web analytics software*, which cites matomo.org but not plausible.io) and 2 on German Wikipedia.

- `competitorLinks` lists up to 20 links per article; `competitorLinkCount` is the full count.
- `pageviews30d` is the sum of daily views by people (bots and crawlers excluded), desktop and mobile, over the last 30 days with data, from Wikipedia's PageViewInfo API. It is `null` if the API has no data for the article.
- `yourDomainListComplete` is `false` only if your own domain has more than 100,000 Wikipedia links on that wiki. Then some reported articles may already cite you.

The **OUTPUT** record in the key-value store has a per-wiki summary: links and articles for your domains and for each competitor, whether each list is complete, the number of gap articles, and `sharedArticles` (articles that cite you and at least one competitor).

Articles about a competitor itself (for example the competitor's own Wikipedia page) are gaps too, but you usually cannot do much about them. You can skip them in the results.

### How it works

1. It calls the MediaWiki API (`list=exturlusage`) on each wiki for your domains and each competitor, 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. `www.` always counts as the same site.
3. Articles that link to any of your domains are removed. The rest are grouped per article.
4. Pageviews (last 30 days), article length and last edit time come from the same API, 50 articles per request.

It reads only public article titles, page IDs, URLs and pageview counts. It collects no personal data and does not visit your site or your competitors' sites.

### Pricing

Pay per event: each gap article returned is one `gap-article` event. Listing links, articles that already cite you, and empty results are free. Use **Max gap articles** and the run's maximum cost setting to cap spend. The run stops cleanly when the cap is reached.

### Limitations

- Wikipedia's link table covers links in article wikitext and templates. A few links added by Lua modules or Wikidata at render time are not listed.
- A competitor with more links than **Max links listed per competitor** is listed only up to the cap; the OUTPUT record shows `complete: false` for it.
- A gap only means the article does not link to your domain. It does not mean your content would be a suitable source; Wikipedia's editors decide that.
- If the Wikimedia API fails for your domain on one wiki, that wiki is skipped and nothing is charged for it. 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

## `yourDomains` (type: `array`):

Your own site, for example example.com. Add more than one if you run several domains (example.com, example.co.uk). An article that links to any of them is not a gap. www. is folded into the bare domain.

## `competitorDomains` (type: `array`):

Up to 10 competitor domains. The Actor lists every Wikipedia article that links to each of them.

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

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

## `minCompetitors` (type: `integer`):

Only report articles that link to at least this many of your competitors. 2 or more keeps the strongest gaps: topics where several rivals are cited and you are not.

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

Also count links to subdomains such as docs.example.com or blog.competitor.com, for your domains and your competitors'.

## `includeStats` (type: `boolean`):

Add each gap article's pageviews over the last 30 days, its length and its last edit time, and sort by pageviews. Uses Wikipedia's API, 50 articles per request.

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

Stop after this many gap articles across all wikis. Each reported article is one charged event.

## `maxLinksPerDomain` (type: `integer`):

Cap on the links listed for each competitor on each wiki. Listing is free; raise it for very large competitors. Your own domain is always listed up to 100,000 links.

## Actor input object example

```json
{
  "yourDomains": [
    "plausible.io"
  ],
  "competitorDomains": [
    "matomo.org",
    "usefathom.com",
    "simpleanalytics.com"
  ],
  "wikis": [
    "en"
  ],
  "minCompetitors": 1,
  "includeSubdomains": false,
  "includeStats": true,
  "maxResults": 1000,
  "maxLinksPerDomain": 5000
}
```

# Actor output Schema

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

One row per Wikipedia article that links to at least one competitor and none of your domains, with the competitor URLs and the article's pageviews.

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

Per-wiki counts: links and articles for your domains and each competitor, gap articles, and articles that already cite you and a competitor. 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 = {
    "yourDomains": [
        "plausible.io"
    ],
    "competitorDomains": [
        "matomo.org",
        "usefathom.com",
        "simpleanalytics.com"
    ],
    "wikis": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sculptural_delphinium/wikipedia-link-gap").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 = {
    "yourDomains": ["plausible.io"],
    "competitorDomains": [
        "matomo.org",
        "usefathom.com",
        "simpleanalytics.com",
    ],
    "wikis": ["en"],
}

# Run the Actor and wait for it to finish
run = client.actor("sculptural_delphinium/wikipedia-link-gap").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 '{
  "yourDomains": [
    "plausible.io"
  ],
  "competitorDomains": [
    "matomo.org",
    "usefathom.com",
    "simpleanalytics.com"
  ],
  "wikis": [
    "en"
  ]
}' |
apify call sculptural_delphinium/wikipedia-link-gap --silent --output-dataset

```

## MCP server setup

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

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/xMYcY7W2JsUm7A1OB/builds/lucDMB3VRj4u3uOtL/openapi.json
