Fact-check API: check a claim against Wikipedia in one call (31 claims tested)
To fact-check a claim with an API, send it to POST https://wikivectors.com/v1/answer with the choices ["True", "False"]. It searches today's English Wikipedia, reads the best paragraphs, and returns True, False, or “no answer”, with the Wikipedia paragraphs it used as proof. We ran 31 claims through it: 28 right, 3 “no answer”, 0 wrong.
Try a claim now
The try box on the home page runs the same answer call with no key. A free key gives you 1,000 searches a month; one fact check counts as 5, so that is 200 checks.
Everything below was run on 1 December 2026 against the live API. The outputs are copied as they came back.
How do I fact-check one claim with one API call?
Wrap the claim in a question and give two choices. The answer is always one of your choices, exactly as you sent it, or answered: false when Wikipedia's paragraphs don't settle it:
import os, requests claim = "The Great Wall of China is visible from the Moon with the naked eye." r = requests.post( "https://wikivectors.com/v1/answer", headers={"Authorization": "Bearer " + os.environ["WIKIVECTORS_KEY"]}, json={"query": "Is this claim true? Claim: " + claim, "options": ["True", "False"]}, timeout=60, ) d = r.json() print(d["answer"] if d["answered"] else "No answer") print(d["detail"]) for s in d["sources"]: print(s["ref"], s["title"], "|", s["section"], s["url"])
False False. The Great Wall of China cannot be seen by the naked human eye from the Moon, which orbits Earth at an average distance of 384,399 kilometres [1]. The claim is a myth that has been thoroughly debunked [1]. 1 Great Wall of China | From the Moon https://en.wikipedia.org/wiki/Great_Wall_of_China
The [1] in the detail points to source 1. Each source holds the exact Wikipedia paragraph, so you can show the proof next to the verdict:
{
"ref": 1,
"title": "Great Wall of China",
"section": "From the Moon",
"text": "The Great Wall of China cannot be seen by the naked human eye from the Moon ...",
"url": "https://en.wikipedia.org/wiki/Great_Wall_of_China",
"revision_id": 1384301633
}
revision_id names the exact version of the page we read, so anyone can open that version later and check it. Wikipedia text is CC BY-SA 4.0: link the page when you show it.
How accurate is it? We tested 31 claims
We wrote 31 claims whose answer we already knew: 23 common facts, myths and 2026 events, then 8 harder ones (trick wording, two facts at once). One call each, same code as above:
| Set | Claims | Right | “No answer” | Wrong |
|---|---|---|---|---|
| Facts, myths, this year | 23 | 23 | 0 | 0 |
| Harder ones | 8 | 5 | 3 | 0 |
| All | 31 | 28 | 3 | 0 |
Some of the verdicts, as they came back:
| Claim | Verdict | Main source |
|---|---|---|
| Humans use only 10 percent of their brains. | False | Ten-percent-of-the-brain myth |
| Napoleon Bonaparte was unusually short for a Frenchman of his time. | False | Napoleon › Appearance and image |
| The 2026 Winter Olympics were held in Milan and Cortina d'Ampezzo. | True | Italy at the 2026 Winter Olympics |
| The 2026 Winter Olympics were held in Sapporo. | False | 2026 Winter Olympics pages |
| Mount Everest is the tallest mountain on Earth when measured from base to peak. | False | Mountain; Mount Everest › Comparisons (Mauna Kea) |
| A day on Venus is longer than a year on Venus. | True | Venus › Orbit and rotation |
| Glass is a slow-flowing liquid, which is why old windows are thicker at the bottom. | False | Glass › Reputed flow |
| My neighbour's cat is named Biscuit. | No answer | (nothing on Wikipedia, as it should be) |
The important number is the last column. When the paragraphs don't settle a claim, it says so instead of guessing. A wrong “True” is far worse for a fact checker than “I don't know”.
Time: 6 to 14 seconds per claim, 8 seconds in the middle. Most of that is the AI model reading the paragraphs. Checking many claims? Run them side by side: a key allows 10 calls a second.
WIKIVECTORS_KEY, then run python3 factcheck.py.What do I do when it says “no answer”?
Ask the question behind the claim, without the True/False choices. All three “no answer” claims came out right this way:
| Claim (no answer) | Ask instead | Answer we got |
|---|---|---|
| The Sahara is the largest desert in the world. | What is the largest desert in the world? | Antarctica. “The Sahara is the largest hot desert, but it is the third-largest desert overall.” So: False. |
| Thomas Edison invented the first electric light bulb. | Did Thomas Edison invent the first electric light bulb? | No. “Joseph Swan's incandescent light bulb predated Edison's.” So: False. |
| Cleopatra lived closer in time to the Moon landing than to the building of the Great Pyramid of Giza. | When did Cleopatra live? When was the Great Pyramid of Giza built? | 70/69 BC – 30 BC, and c. 2600 BC. Your code does the sum: about 2,570 years to the pyramid, about 2,000 to 1969. So: True. |
The last one is the general rule: a claim that needs two facts and some math is two questions. Ask each one, then compare the numbers in your own code. Don't ask the model to do the sum.
Why check claims against Wikipedia, and not the model alone?
Because the verdict comes with its proof. A model alone answers from memory: it can be out of date (it doesn't know this year's events, see LLM knowledge cutoff) and it can't show where a fact came from. Here the model may only use the paragraphs we found, every verdict lists them, and our index follows Wikipedia's edits within the hour. If a page changes tomorrow, tomorrow's check reads the new text.
How is this different from the Google Fact Check Tools API?
Google's Fact Check Tools API searches fact-checks that news outlets have already published (their ClaimReview markup). It is good for viral claims a fact-checker has written about. For a claim nobody has written a fact-check about, it has nothing to return. Checking against Wikipedia works the other way round: it doesn't need anyone to have reviewed your exact claim, only that Wikipedia covers the facts in it. Many teams use both.
What can't it check?
- Anything Wikipedia doesn't cover: private facts, breaking news from the last hour, small local events. You get “no answer”.
- Opinions (“X is the best film ever”): there is no true or false to find.
- Claims where Wikipedia itself is wrong. We never change Wikipedia's text, so we can't be more right than it is. The source paragraph is there so a person can judge.
- Long texts at once. Split an article into single claims first (one sentence, one fact) and check each.
Want the paragraphs without a verdict, to feed your own model? Use /v1/search. Full field list for answers: /v1/answer. In an AI app with MCP, the same call is the answer_question tool (MCP setup).
Wikipedia for your AI app, without the limits
WikiVectors searches all of English Wikipedia and returns short, cited paragraphs, fresh within the hour. 1,000 free searches a month, then $2 per 1,000.
More guides
- Qwen 4 35B on a home PC: 35 of 60 facts alone, 60 of 60 with one WikiVectors searchWe ran Qwen 4 35B-A3B in Ollama on an RTX 4070 and asked 60 fact questions. Alone: every easy and medium one, but 5 of 15 rare facts and 0 of 15 from 2026. Thinking mode didn't fix it. With 5 WikiVectors paragraphs: 60 of 60, none wrong. Code and every answer.
- LangChain Wikipedia retriever: the built-in one vs WikiVectors, tested on 45 questionsLangChain's WikipediaRetriever crashed on 18 of 45 questions with Wikipedia's 429 (shown as JSONDecodeError) until we set a User-Agent; then it found 34 of 45 in 5.7 s each. WikiVectorsRetriever: 45 of 45 in 0.57 s, with a fifth of the text. Code, fix and real output.
- Wikipedia MCP server for Claude, Cursor and VS Code (tested in Claude Code)Add Wikipedia to Claude Code, Claude Desktop, claude.ai, Cursor or VS Code with one line or one JSON file. A real Claude Code run went from "I don't know" to the right 2026 answer in 7 s. 8 questions vs Wikipedia's own search, speed, cost, no-key tries.