Instant, citation-backed answers in a cozy reading room
Search any topic for full Wikipedia summaries, images, and direct source links—zero guesswork.
Under the Hood: Wikipedia Shelf
Wikipedia APIEvery question pulls the full Wikipedia article summary and image directly from Wikipedia—never guessed.
Waiting for your question...
Sign up for a free account in the top-right to save your preferred plan, or try "Tell me about Dune" to see full Wikipedia images and summaries in action.
Simple Plans for Curious Readers & Teams
Start free with live Wikipedia lookups, or upgrade for team workspaces and commercial API access.
For solo learners exploring Wikipedia topics in a cozy reading room.
- • Unlimited Wikipedia article lookups
- • Full article images & summaries
- • Source citations on every reply
For writers, researchers, and creators embedding Bookwormist on their sites.
- • Everything in Reader
- • Commercial website widget embed
- • Saved reading shelves & export
For schools, publishers, and organizations needing shared knowledge tools.
- • Up to 25 team seats
- • Custom branding & API access
- • Priority support & SLA
How Bookwormist AI Fetches Full Wikipedia Info & Images
A clean, two-step Wikipedia lookup using fetch().
// ============================================================================
// BOOKWORMIST AI: FULL WIKIPEDIA IMAGE + INFO CHATBOT
// ============================================================================
// 1. Clean conversational prefixes ("Who was...", "Tell me about...")
function extractSearchTopic(question) {
return question
.replace(/^(who was|who is|what is|what are|tell me about|explain|define)\s+/i, "")
.replace(/[?!.]+$/, "")
.trim() || question;
}
// 2. Search Wikipedia for the best matching article, then fetch its full summary & image
async function fetchWikipediaSummary(question) {
const topic = extractSearchTopic(question);
// Step A: Find the top matching Wikipedia page title
const searchUrl = `https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=${encodeURIComponent(topic)}&format=json&origin=*`;
const searchRes = await fetch(searchUrl);
const searchData = await searchRes.json();
const topTitle = searchData.query?.search?.[0]?.title;
if (!topTitle) return null;
// Step B: Fetch the full summary, description, image, and URL
const summaryUrl = `https://en.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(topTitle)}`;
const summaryRes = await fetch(summaryUrl);
const summaryData = await summaryRes.json();
return {
title: summaryData.title,
description: summaryData.description || "",
extract: summaryData.extract,
image: summaryData.originalimage?.source || summaryData.thumbnail?.source || null,
url: summaryData.content_urls?.desktop?.page
};
}
// 3. Render the full Wikipedia image and info in Bookwormist AI
async function getBookwormistReply(userText) {
const wiki = await fetchWikipediaSummary(userText);
if (wiki && wiki.extract) {
return {
title: wiki.title,
description: wiki.description,
image: wiki.image,
text: wiki.extract, // Whole summary from Wikipedia
url: wiki.url
};
}
return {
text: "I checked the Wikipedia shelves and couldn't find an article on that, so I won't make anything up!"
};
}