# Wikipedia Book Citation Finder (`sculptural_delphinium/wikipedia-book-citations`) Actor

Find the Wikipedia articles that cite your books. Give ISBNs (and optional titles) and get every article whose citations carry each ISBN, with the cited edition, author, year and publisher, in any language edition. Uses the official Wikipedia API.

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

## Pricing

from $3.00 / 1,000 citing 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 Book Citation Finder

Find the Wikipedia articles that cite your books. Give a list of ISBNs (with titles, ideally) and get every article whose wikitext carries each ISBN, in any language edition, together with the citation as written: title, author, year, edition and publisher.

Useful for publishers tracking where their catalogue is cited, authors checking which edition Wikipedia uses, and book marketers looking for articles that cite an old edition.

### What it does

For each book and each Wikipedia edition you choose, the Actor:

1. Searches article wikitext through the official Wikipedia API for the ISBN in several spellings (13-digit, 10-digit, hyphenated `978-` form) and, if you gave one, for the title.
2. Downloads the wikitext of every candidate article and confirms the match: hyphens and spaces are stripped and the digits must equal your ISBN-10 or ISBN-13.
3. Reads the citation template that holds the ISBN (`{{cite book}}`, `{{citation}}`, `{{Literatur}}`, `{{ouvrage}}` and others) and returns its fields.

Only official Wikimedia APIs are used, with a rate-limited, identified client.

### Input

| Field | Meaning |
| --- | --- |
| `books` | List of `{ "isbn": "...", "title": "..." }`. ISBN-10 or ISBN-13, hyphens allowed. The title is optional but improves recall: Wikipedia's search only matches some hyphenation patterns, and the title catches citations that write the ISBN in another one. Every match is still verified against the ISBN. Up to 2000 books. |
| `wikis` | Language codes (`en`, `de`, `fr`) or hosts. Default `en`. |
| `includeTitleOnly` | Also return articles that mention the title but carry no matching ISBN (no ISBN, or a different edition). Unverified, free. Default `false`. |
| `maxResults` | Stop after this many rows. Default 10000. |

```json
{
  "books": [{ "isbn": "978-0-13-468599-1", "title": "Effective Java" }],
  "wikis": ["en", "de"]
}
```

### Output

One dataset row per (book, wiki, article). A real row from a test run on 2026-11-09:

```json
{
  "isbn13": "9780134685991",
  "isbn10": "0134685997",
  "bookTitle": "Effective Java",
  "wiki": "en.wikipedia.org",
  "articleTitle": "Comparison of Java and C++",
  "articleUrl": "https://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B",
  "pageId": 42922,
  "matchType": "isbn",
  "matchedIsbn": "978-0134685991",
  "citationCount": 1,
  "citeTemplate": "cite book",
  "citeTitle": "Effective Java: Programming Language Guide",
  "citeAuthor": "Bloch, Joshua",
  "citeYear": "2018",
  "citeEdition": "third",
  "citePublisher": "Addison-Wesley"
}
```

`matchType` is `isbn` (verified) or `titleOnly` (unverified, only with `includeTitleOnly`). `matchedIsbn` is the ISBN exactly as the article writes it. `citationCount` is how many times the ISBN appears in the article.

In that run, Effective Java (3rd edition) was cited by 27 English and 1 German article, with 18 more English articles mentioning the title without this ISBN (other editions, or citations without an ISBN).

The `OUTPUT` record in the key-value store has per-book, per-wiki counts, including books that no article cites.

### Pricing

Pay per event: $3 per 1,000 ISBN-verified citing articles, plus the standard Apify actor-start event. Books that no article cites and title-only matches cost nothing. A lookup that fails because of the Wikipedia API is not charged.

### Limits

- Only the article namespace is searched; talk pages, drafts and user pages are skipped.
- Wikipedia's search index can lag edits by a few minutes.
- Without a title, citations that hyphenate the ISBN differently from the forms searched can be missed. Add the title for best coverage.
- Different editions have different ISBNs. List each edition you care about.

### Data collected

Only public article titles, page IDs, URLs and citation fields from Wikipedia. No personal data is collected.

### 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

## `books` (type: `array`):

The books to look up: a list of objects with "isbn" (10 or 13 digits, hyphens allowed) and an optional "title". The title widens the search to citations that write the ISBN unusually; every match is still checked against the ISBN. Plain ISBN strings are accepted too. Up to 2000 books per run.

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

Language codes (en, de, fr) or hosts (es.wikipedia.org). Defaults to English Wikipedia.

## `includeTitleOnly` (type: `boolean`):

Also return articles that mention the book title but carry no matching ISBN, for example a citation without an ISBN or one citing a different edition. These rows are unverified and are never charged.

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

Stop after this many rows have been returned. Only ISBN-verified rows are charged.

## Actor input object example

```json
{
  "books": [
    {
      "isbn": "978-0-13-468599-1",
      "title": "Effective Java"
    }
  ],
  "wikis": [
    "en"
  ],
  "includeTitleOnly": false,
  "maxResults": 10000
}
```

# Actor output Schema

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

One row per (book, wiki, article): the Wikipedia article that cites the ISBN, how many times, and the cited title, author, year, edition and publisher.

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

Per-book counts for each wiki, including books that no article cites. 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 = {
    "books": [
        {
            "isbn": "978-0-13-468599-1",
            "title": "Effective Java"
        }
    ],
    "wikis": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sculptural_delphinium/wikipedia-book-citations").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 = {
    "books": [{
            "isbn": "978-0-13-468599-1",
            "title": "Effective Java",
        }],
    "wikis": ["en"],
}

# Run the Actor and wait for it to finish
run = client.actor("sculptural_delphinium/wikipedia-book-citations").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 '{
  "books": [
    {
      "isbn": "978-0-13-468599-1",
      "title": "Effective Java"
    }
  ],
  "wikis": [
    "en"
  ]
}' |
apify call sculptural_delphinium/wikipedia-book-citations --silent --output-dataset

```

## MCP server setup

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

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/V9MuFTDF5zorQLF6B/builds/w98OrLyJEBorFNOoj/openapi.json
