# AI Citation Checker - Detect Fake & Hallucinated References (`vivi_quant/ai-citation-checker`) Actor

Checks every reference in AI-written text: DOIs, papers, arXiv, books, links and US case law. Flags fake, wrong, retracted or dead citations and returns the corrected reference. For lawyers, researchers, students and AI agents. Pay per reference, unverifiable ones free.

- **URL**: https://apify.com/vivi_quant/ai-citation-checker.md
- **Developed by:** [Vivi Datas](https://apify.com/vivi_quant) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 reference checked

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

## AI Citation Checker - Detect Fake & Hallucinated References

**AI makes up sources.** Fake papers, DOIs that point to the wrong article, dead links, court cases that
never existed. Courts have issued hundreds of decisions about hallucinated citations, with sanctions in the
tens of thousands of dollars, and journals and universities face the same problem.

This actor checks **every reference** in a text against open authoritative indexes and tells you, for each
one, whether it is **real, wrong, retracted, dead or probably invented**, and gives you the **corrected citation**.

Use it as the **last step of any AI writing workflow**, or let your **AI agent call it to verify its own sources**
before delivering a report.

### What it checks

| Reference type | Checked against | Example |
|---|---|---|
| DOI | Crossref, OpenAlex, doi.org | `https://doi.org/10.1038/nature14539` |
| Paper without DOI (any citation style) | Crossref + OpenAlex search (250M+ works) | `Vaswani, A. et al. (2017). Attention is all you need.` |
| arXiv preprint | arXiv | `arXiv:1810.04805` |
| Book | Open Library | `ISBN 978-0374275631` |
| Web link | the live web | `https://www.who.int/...` |
| US case law | CourtListener | `678 F. Supp. 3d 443` |

Detected automatically anywhere in the text, plus every entry of a **References / Bibliography / Sources**
section (APA, MLA, Chicago, IEEE, Vancouver, numbered or bulleted).

### Verdicts

| Verdict | Meaning |
|---|---|
| `verified` | The work exists and matches the citation |
| `mismatch` | Something exists but the citation is wrong: **DOI pointing to a different paper**, wrong year, wrong author, altered title |
| `not_found` | No matching work in the indexes: **likely fabricated** (or a document those indexes do not cover) |
| `retracted` | The work exists but has been **retracted** |
| `broken_link` | The cited URL does not resolve |
| `unverifiable` | Not enough information, site refused automated access, or source unavailable (**free**) |

Each row also gives `issues` (what exactly is wrong), `correctedCitation` (APA, from the real metadata),
`match` (title, authors, year, venue, DOI, URL), `confidence` and the sources checked.

### Output

```json
{
  "reference": "Smith, J. (2020). Neural networks for cooking recipes. Nature. https://doi.org/10.1038/nature14539",
  "type": "doi",
  "verdict": "mismatch",
  "confidence": 0.9,
  "issues": ["DOI points to a DIFFERENT work than the one cited", "title does not match the real work (\"Deep learning\")"],
  "correctedCitation": "LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436-444. https://doi.org/10.1038/nature14539",
  "checkedIn": ["crossref"]
}
```

The key-value store also holds:

- `SUMMARY`: counts per verdict, `problemRate`, overall `risk` (low / medium / high) and the list of problems — ideal for agents;
- `REPORT`: a readable Markdown report to share.

### For AI agents

Call it with `{"text": "<your draft>"}` and read `SUMMARY.risk` and `SUMMARY.problems`. If risk is not `low`,
replace each problem with its `correctedCitation` or remove the claim. Works through the Apify API, the Apify MCP
server, n8n, Make and Zapier.

### Who uses it

- **Law firms and legal teams**: catch fake case citations before filing.
- **Researchers, students, universities, publishers**: screen bibliographies and submissions.
- **Content and SEO teams, newsrooms**: check AI-written articles before publishing.
- **AI builders**: add a citation-verification step to RAG pipelines and agents.

### Pricing

One event per reference that gets a definite verdict (`verified`, `mismatch`, `not_found`, `retracted`,
`broken_link`). **Unverifiable references are free.** Set a maximum spend per run anytime.

### Limits

- `not_found` means "not in Crossref/OpenAlex": book chapters, grey literature, reports and very new papers can be
  missing there. Treat it as "verify manually", not as proof of fraud.
- Case law covers US courts only (CourtListener).
- Some websites block automated access: those links are reported as `unverifiable`.

### Privacy

Only the extracted references (not the whole text) are sent to the public indexes above. Nothing is kept after the run.

# Actor input Schema

## `text` (type: `string`):

Paste any text (AI answer, report, paper, legal brief). Every DOI, link, arXiv id, ISBN, US case citation and every entry of its References section is checked.

## `references` (type: `array`):

One reference per line (any style: APA, MLA, IEEE, Vancouver...), or bare DOIs, URLs, arXiv ids, ISBNs.

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

Open every cited URL and flag dead links.

## `courtListenerToken` (type: `string`):

Optional. Your own free courtlistener.com token for US case citations (e.g. 678 F. Supp. 3d 443). Leave empty to use the built-in access.

## `contactEmail` (type: `string`):

Sent to the open scholarly APIs (Crossref, OpenAlex) as polite-pool contact for faster, more reliable access.

## `maxReferences` (type: `integer`):

Safety limit on the number of references checked per run.

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

How many references are checked at the same time.

## Actor input object example

```json
{
  "text": "Transformers changed NLP (Vaswani et al., 2017), and deep residual networks made very deep vision models trainable.\n\nReferences\n1. Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30.\n2. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. CVPR. https://doi.org/10.1109/CVPR.2016.90\n3. Smith, J., & Brown, L. (2021). Quantum gardening improves transformer reasoning. Journal of Imaginary Results, 12(3), 45-67. https://doi.org/10.1234/jir.2021.0045",
  "checkLinks": true,
  "maxReferences": 500,
  "maxConcurrency": 6
}
```

# Actor output Schema

## `overview` (type: `string`):

One row per reference.

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

Counts, risk level and the list of problems (JSON).

## `report` (type: `string`):

Human-readable Markdown report.

# 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 = {
    "text": `Transformers changed NLP (Vaswani et al., 2017), and deep residual networks made very deep vision models trainable.

References
1. Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30.
2. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. CVPR. https://doi.org/10.1109/CVPR.2016.90
3. Smith, J., & Brown, L. (2021). Quantum gardening improves transformer reasoning. Journal of Imaginary Results, 12(3), 45-67. https://doi.org/10.1234/jir.2021.0045`
};

// Run the Actor and wait for it to finish
const run = await client.actor("vivi_quant/ai-citation-checker").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 = { "text": """Transformers changed NLP (Vaswani et al., 2017), and deep residual networks made very deep vision models trainable.

References
1. Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30.
2. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. CVPR. https://doi.org/10.1109/CVPR.2016.90
3. Smith, J., & Brown, L. (2021). Quantum gardening improves transformer reasoning. Journal of Imaginary Results, 12(3), 45-67. https://doi.org/10.1234/jir.2021.0045""" }

# Run the Actor and wait for it to finish
run = client.actor("vivi_quant/ai-citation-checker").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 '{
  "text": "Transformers changed NLP (Vaswani et al., 2017), and deep residual networks made very deep vision models trainable.\\n\\nReferences\\n1. Vaswani, A., Shazeer, N., Parmar, N., et al. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30.\\n2. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. CVPR. https://doi.org/10.1109/CVPR.2016.90\\n3. Smith, J., & Brown, L. (2021). Quantum gardening improves transformer reasoning. Journal of Imaginary Results, 12(3), 45-67. https://doi.org/10.1234/jir.2021.0045"
}' |
apify call vivi_quant/ai-citation-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vivi_quant/ai-citation-checker"
        }
    }
}
```

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/MabCdBauEQwbzeIjn/builds/Le5FUPTKrjS6dAAtR/openapi.json
