Wikipedia Facts
Entity grounding for AI agents. Before reasoning about a person, company, place, technology or event, an agent needs a reliable baseline — this tool provides it in one call: a Wikipedia search returning up to 10 ranked matches (title, one-line description, canonical URL), plus the full summary of the best match with its extract (up to 2000 characters), thumbnail image and last-modified timestamp, so you can see how fresh the article is. Works across 300+ Wikipedia language editions via the lang parameter (en, ro, de, ja...). Disambiguation pages are identifiable by their type field. Uses the official Wikimedia REST APIs with proper identification, and returns the CC BY-SA attribution note your agent must carry when republishing content. Pairs naturally with paper-search (academic sources) and web-search (current web) as the encyclopedic layer of a research stack.
Call with x402
1. Send the request. 2. Receive 402 with accepts[]. 3. Sign the payment and retry with the X-PAYMENT header.
curl -X POST https://agentbit.app/v1/knowledge/wiki \
-H 'Content-Type: application/json' \
-d '{"query":"EIP-3009","lang":"en"}'
Input schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Entity or topic to look up (2-300 chars)"
},
"lang": {
"type": "string",
"description": "Wikipedia language edition (default en)"
},
"limit": {
"type": "integer",
"description": "Max search matches (1-10, default 5)"
}
},
"required": [
"query"
]
}Output schema
{
"type": "object",
"properties": {
"query": {
"type": "string"
},
"lang": {
"type": "string"
},
"match_count": {
"type": "integer"
},
"matches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"key": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"url": {
"type": "string"
}
}
}
},
"top_summary": {
"type": [
"object",
"null"
],
"properties": {
"title": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"extract": {
"type": [
"string",
"null"
]
},
"url": {
"type": "string"
},
"thumbnail": {
"type": [
"string",
"null"
]
},
"last_modified": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
}
}
},
"attribution": {
"type": "string"
}
}
}Code examples
// JavaScript (x402-fetch)
import { wrapFetchWithPayment } from "x402-fetch";
const fetchWithPay = wrapFetchWithPayment(fetch, wallet);
const r = await fetchWithPay("https://agentbit.app/v1/knowledge/wiki", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"query":"EIP-3009","lang":"en"})
});
console.log(await r.json());
# Python (x402 client)
from x402.clients.requests import x402_requests
s = x402_requests(account)
r = s.post("https://agentbit.app/v1/knowledge/wiki",
json={"query":"EIP-3009","lang":"en"})
print(r.json())
// PHP
$r = Http::withHeaders(['X-PAYMENT' => $signedPayment])
->post('https://agentbit.app/v1/knowledge/wiki',
array (
'query' => 'EIP-3009',
'lang' => 'en',
));
$data = $r->json();