import os, requests
r = requests.post(
"https://wikivectors.com/v1/search",
headers={"Authorization": f"Bearer {os.environ['WIKIVECTORS_KEY']}"},
json={"query": "what causes the northern lights", "limit": 3},
)
for hit in r.json()["results"]:
print(hit["title"], hit["url"])
{
"results": [{
"title": "Aurora",
"section": "",
"text": "An aurora is a natural light display in
Earth's upper atmosphere caused by charged
particles from the Sun colliding with atoms…",
"url": "https://en.wikipedia.org/wiki/Aurora",
"permalink": "https://en.wikipedia.org/w/index.php?oldid=1382287719",
"license": "CC BY-SA 4.0",
"description": "Atmospheric effect caused by the solar wind",
…
}],
"mode": "hybrid",
"index_synced_at": "2026-11-26T00:19:12Z",
"request_id": "req_43589867b4efa80a"
}
WikiVectors is a remote MCP server at https://wikivectors.com/mcp. Add it to your AI tool and it can search Wikipedia for you. Put your key where it says wv_live_….
# in a terminal
claude mcp add --transport http wikivectors https://wikivectors.com/mcp \
--header "Authorization: Bearer wv_live_…"
{
"results": [{
"passage_id": 46011685,
"page_id": 49658,
"title": "Aurora",
"section": "",
"text": "An aurora is a natural light display in
Earth's upper atmosphere caused by charged
particles from the Sun colliding with atoms…",
"url": "https://en.wikipedia.org/wiki/Aurora",
"permalink": "https://en.wikipedia.org/w/index.php?oldid=1382287719",
"revision_id": 1382287719,
"license": "CC BY-SA 4.0",
"attribution": "\"Aurora\" by Wikipedia contributors, CC BY-SA 4.0, https://…",
"score": 0.912,
"exact_title_match": false,
"description": "Atmospheric effect caused by the solar wind",
"wikidata_id": "Q40609"
}],
"mode": "hybrid",
"index_synced_at": "2026-11-26T00:19:12Z",
"request_id": "req_43589867b4efa80a"
}
What you send
Field
Type
What it is
query
string
A question, a topic or a name, in plain words. Required.
limit
number
How many paragraphs, 1 to 20. Default 5.
What you get back
results is a list of paragraphs, best first. Each one is described in Result fields. mode is hybrid, or keyword if meaning search was briefly down (you still get results). index_synced_at is when our copy last caught up with Wikipedia.
Tips
Looking for one person or thing by name? Check exact_title_match, and use description and wikidata_id to tell same-name pages apart. If you already know the exact page names (or they are redirects like "JFK"), Pages by title is faster and surer.
If it fails
400 invalid_request if the query is empty or limit is out of range. 503 search_unavailable: retry in a moment. All codes: Errors and limits.
POST/v1/answer · 5 searches
Answer a question
Ask in plain words. Get the shortest right answer (like "Ada Lovelace"), plus 1 to 3 sentences written only from Wikipedia, with [1] style citations and the sources they point to.
{
"answer": "Charged particles from the Sun",
"detail": "The northern lights are a natural light
display in Earth's sky [1], caused by charged
particles from the Sun colliding with atoms
in the atmosphere [4].",
"answered": true,
"sources": [
{ "ref": 1, "title": "Northern Lights", "text": "…",
"url": "https://en.wikipedia.org/wiki/Northern_Lights", … },
{ "ref": 4, "title": "Aurora", "text": "…",
"url": "https://en.wikipedia.org/wiki/Aurora", … }
],
"model": "deepseek/deepseek-v4.1-flash",
"searches_charged": 5,
"mode": "hybrid",
"index_synced_at": "2026-11-26T00:19:12Z",
"request_id": "req_7676252784414d1e"
}
What you send
Field
Type
What it is
query
string
Your question, in plain words. Required.
options
list of strings
Optional. 2 to 10 choices, each up to 200 characters, like ["over 30,000 ft", "under 30,000 ft"] or ["1905", "1912", "1920"]. The answer is then one of them, exactly as you wrote it, or "None of these". Good for checking a claim. Same cost.
What you get back
Field
What it is
answer
The shortest right answer: a name, number, date or a few words ("Ada Lovelace"). Just "Yes" or "No" for a yes/no question. No citations. null when not answered.
detail
1 to 3 sentences with [n] citations that back the answer up, or null
answered
false when the paragraphs we found don't answer it. Better than a made-up answer.
choice
Only when you sent options: the option it picked, exactly as you sent it. Left out when none fits (then answer is "None of these" and detail says why) or when it can't tell (answered is false).
sources
The cited paragraphs. Each is a search result plus ref, the number used in the text.
model
The AI model that wrote it
searches_charged
Searches used: 5, answered or not
How it works
We run a search, give the top 5 paragraphs to an AI model, and ask it to answer only from them. So it can be wrong only where those paragraphs are.
Pick from options
Send options to make it choose. If the model names something that isn't one of your options, you get answered: false, never a guess.
curl https://wikivectors.com/v1/answer \
-H "Authorization: Bearer $WIKIVECTORS_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Is Mount Everest over or under 30,000 ft?", "options": ["over 30,000 ft", "under 30,000 ft"]}'
Back: "answer": "under 30,000 ft", "choice": "under 30,000 ft", and a detail sentence with the height and its source.
If it fails
503 answer_unavailable: answers are paused or the AI failed. Nothing is charged, and search still works. All codes: Errors and limits.
POST/v1/pages · 1 search per title
Get pages by title
Know the page names already? Get the opening paragraph of up to 20 pages in one call. It ignores case, treats _ as a space and follows redirects ("JFK" gives "John F. Kennedy").
import os, requests
r = requests.post(
"https://wikivectors.com/v1/pages",
headers={"Authorization": f"Bearer {os.environ['WIKIVECTORS_KEY']}"},
json={"titles": ["Ada Lovelace", "JFK", "Not A Real Page"]},
)
for p in r.json()["pages"]:
print(p["query"], "→", p.get("title", "not found"))
pages has one entry per title, in the same order. Each has query (what you sent) and found. A found page also has page_id, title, text (the opening paragraph), url, permalink, revision_id, license, attribution, disambiguation and is_person, plus description and wikidata_id when the page has them, and redirected_from when your title was a redirect.
disambiguation is true when the page is a list of things that share the name, not one thing. "Brookfield" and "Mercury" are like this: their text is "… may refer to:". Try a more exact title ("Brookfield, Wisconsin") or use /v1/search.
is_person is true when the page is about one person (Wikipedia files it under a birth or death year, or "Living people"). Check it when you look up a name: a person's name can lead to a page about an event instead. "Erin Patterson" gives "Leongatha mushroom murders", with redirected_from: "Erin Patterson" and is_person: false.
Cost
Each title counts as one search, found or not. If your key can't cover all of them, nothing is used and you get quota_exceeded.
GET/v1/titles · 1 search
Find pages by title
List every page whose title starts with some text, like all 427 "2025 in …" pages, or matches a pattern like "* in science". Most-read first, or newest edit first. Then get their text with Pages by title.
import os, requests
r = requests.get(
"https://wikivectors.com/v1/titles",
headers={"Authorization": f"Bearer {os.environ['WIKIVECTORS_KEY']}"},
params={"pattern": "* in science", "sort": "newest"},
)
for t in r.json()["titles"]:
print(t["title"], t["revised_at"])
{
"titles": [
{ "page_id": 76983016,
"title": "2025 in science",
"description": "Overview of the events of 2025 in science",
"url": "https://en.wikipedia.org/wiki/2025_in_science",
"revision_id": 1324567890,
"revised_at": "2026-11-26T14:02:11Z",
"disambiguation": false, "is_person": false },
…
],
"more": false,
"query": { "prefix": "2025 in ", "sort": "newest", "limit": 500, "offset": 0 },
"request_id": "req_4cb13c297188bd7a"
}
What you send
As query parameters on GET, or the same fields as JSON with POST /v1/titles.
Field
Type
What it is
prefix
string
Start of the title, any case. A trailing space counts: "2025 in " leaves out "2025 India heatwave". _ is a space.
pattern
string
Or a pattern where * is any text: "* in science", "List of * rivers". With no *, it matches anywhere in the title. Needs 3 or more letters or digits.
sort
string
popular (most-read first, the default), newest (last edit first) or title (A to Z).
limit
number
1 to 500. Default 100.
offset
number
Skip this many, to page on. Up to 10,000.
Send prefix or pattern, not both.
What you get back
titles: each page's page_id, title, description (when it has one), url, revision_id, revised_at (when that revision was saved on Wikipedia), disambiguation and is_person. Only real pages, not redirects. When more is true, call again with offset set to next_offset.
If it fails
400 too_broad: so many titles match (a one-letter prefix, say) that sorting them takes too long. Send a longer prefix or pattern, or sort=title. It is not counted. All codes: Errors and limits.
GET/v1/changes · 1 search
See what changed
List pages that were created, edited, moved or removed on Wikipedia in the last 30 days, with a link to each edit. Poll it to keep your copy fresh. Want us to tell you instead? Use Watches.
A change_id. Pass back next_after to get the next batch.
limit
1 to 500. Default 100.
What you get back
Each change has a kind: created, edited, moved (with old_title) or removed. changed_at is when it happened on Wikipedia; recorded_at is when our index took it in. diff_url shows the edit on Wikipedia.
Polling
Call it every few minutes with after set to the last next_after you saw. You get each change once.
POST/v1/watches · free
Watch a page
Tell us a page and your URL. Each time the page is edited, moved or removed, we send a signed POST to your URL. No polling.
func verify(secret, header string, body []byte) bool {
var t, v1 stringfor _, p := range strings.Split(header, ",") {
k, v, _ := strings.Cut(p, "=")
if k == "t" { t = v } else if k == "v1" { v1 = v }
}
ts, err := strconv.ParseInt(t, 10, 64)
if err != nil || math.Abs(float64(time.Now().Unix()-ts)) > 300 { return false }
mac := hmac.New(sha256.New, []byte(secret))
mac.Write([]byte(t + "."))
mac.Write(body)
return hmac.Equal([]byte(hex.EncodeToString(mac.Sum(nil))), []byte(v1))
}
If it fails
Code
Why
invalid_callback_url
Not a public https URL
page_not_found
No page has that name
watch_exists
You already watch that page with that URL
too_many_watches
100 per key. Delete one first.
watch_not_found
No watch with that id on your key
Reference
Result fields
Every search result (and every answer source) has these fields.
Field
What it is
text
The paragraph, ready to quote
title, section
Where it sits in the article. section is "" for the opening.
url
The live Wikipedia page
permalink
This exact version of the page
revision_id
The Wikipedia version we searched
license
CC BY-SA 4.0
attribution
A ready-made credit line. Show it (or the title and link) next to any text you display.
exact_title_match
true when the page title is your query (any case). Easier to act on than score.
description
The page's short description, like "American financier", or null
wikidata_id
Its Wikidata item, like "Q193156", or null. Use it to tell same-name pages apart.
score
How well the first search matched. Results come best first: a reranker reads each paragraph with your question and sets the order, so don't re-sort by score.
passage_id, page_id
Our ids for the paragraph and Wikipedia's id for the page
On every reply
Field
What it is
index_synced_at
When our copy last caught up with Wikipedia (within the hour)
request_id
Quote it if you write to us
Reference
Errors and limits
Every error looks the same, so you can handle them in one place.
Ask a question in a form, get a short answer with its Wikipedia links. In n8n: Import from URL, paste this link, then add your key as a Bearer Auth credential.