All Project Data / Wikibooks API

Wikibooks API
Free, open textbook data for AI training and EdTech
Wikibooks is a Wikimedia project dedicated to providing free, open-content textbooks, manuals, and other instructional texts. This global, human-curated educational library is built by learners, educators, and subject matter experts, featuring over 350,000 articles across more than 75 languages.
This dataset provides high-quality ground truth knowledge for training instructional AI systems, powering adaptive learning platforms, generating curriculum summaries, and enriching academic and educational applications with structured lesson plans.
Structured learning materials, curated by humans
Wikibooks is designed for instruction. Just like on Wikipedia and other Wikimedia projects, Wikibooks can be edited by any human, at any time. Community volunteers and editors write new books, update modules, and enforce the site’s policies. Wikibooks content is licensed under CC BY-SA and the GFDL (GNU Free Documentation License).
Wikibooks data provides an educational method that is ideal for Machine Learning models focused on “how-to” reasoning, context engineering, and step-by-step instruction.
- Clear Hierarchy: Wikibooks modules are organized into cohesive units following a hierarchical structure. Books are split up into chapters, which in turn are split up into learning modules. This consistent hierarchical format allows you to extract full courses or specific lesson units, making it easier to model educational progression and subject depth. Additionally, educational subjects are grouped together into departments and shelves.
- Instructional Tone: Wikibooks content is meant to teach. This provides a unique dataset for training LLMs on instructional language, tutorial generation, and explanatory dialogue, distinguishing it from the descriptive tone of Wikipedia or the conversational tone of other online data sources.
- Human-Curated and Open: Wikibooks offers authentic community-curated academic and educational content, free from publisher paywalls or proprietary restrictions. This makes it a clean, libre dataset for knowledge bases and AI models that need university-level subject coverage alongside practical instruction.
Build educational knowledge graphs and context-aware tools
Wikibooks is deeply integrated with the broader open-source knowledge ecosystem. You can extract and interlink information to build context-aware educational tools.
- Unique and Human: Where other Wikimedia projects such as Wikisource provide access to existing textual data that may also be found in other datasets, data from Wikibooks is often written explicitly for the Wikibooks platform, or adapted from existing libre educational content. Wikibooks policy ensures that its content is not generated or summarized by LLMs.
- Rich Media Integration: Wikibooks relies heavily on diagrams, schemas, and photos from Wikimedia Commons to explain complex concepts. Access these high-quality visuals to enhance digital textbooks or learning apps.
- Build a Comprehensive Library: Combine Wikibooks with Wikipedia and Wikiversity data to create a multi-layered educational resource that offers users definitions, deep dives, and structured lessons simultaneously. Wikimedia sister projects often already interlink with each other, making it easy to integrate these different data sources into one knowledge graph.
What information do Wikibooks hold?
A Wikibooks page is usually part of a larger “Book.” The main page of a Book acts as a Table of Contents, linking to the various chapters and subpages (modules) that contain the actual educational content. The data covers academic and practical disciplines including Computing (with books on Python, Java, MySQL, and LaTeX), Mathematics (Calculus, Statistics), Cooking (the Cookbook recipe collection), Engineering, Languages, and Humanities.
The structure of a Wikibooks page generally follows this logic:
- Introduction/Prerequisites: Most modules start with an overview of what the learner needs to know before starting and what the learning outcomes are.
- Core Instructional Content: The body of the text. This is often broken down into logical subheadings (H1, H2, H3) representing steps in a process, sub-concepts, or questions in the header and answers in the body text.
- Code and Examples: In technical books (like Computing), you will find extensive blocks of code, syntax examples, and algorithm explanations.
- Exercises and quizzes: Many modules end with review questions, exercises, or quizzes to test comprehension, providing excellent data for generating automated assessments.
- References: Links to external resources or other wiki pages for deeper study and further reading.
- Navigation templates: Links to the previous chapter and the next chapter, maintaining the linear flow of the curriculum.

Where to find other instructional data
Other Wikimedia sister projects host instructional data, although for other reasons or in other formats than Wikibooks. There is considerable overlap between Wikibooks and Wikiversity, although Wikiversity is dedicated to collaborative learning by providing learning resources and research, and a space for community interaction.Wikiversity content is broken up into Resources with sections and units.
Historical non-fiction works that are out of copyright are provided via Wikisource, a library of free source texts and translations.
How to access Wikibooks data
Access Wikibooks data in any of nearly 80 languages through the Wikimedia Enterprise APIs.
Download complete Wikibooks projects with the Snapshot API.
Snapshots deliver the full content of a Wikibooks project as a single dataset, ideal for bulk ingestion into a knowledge base, training pipeline, or local archive. Each snapshot returns articles in HTML and Wikitext, with chunked delivery for large language editions.
Example call to download all of English Wikibooks:
curl -L 'https://api.enterprise.wikimedia.com/v2/snapshots/enwikibooks_namespace_0/download' -H 'Authorization: Bearer ACCESS_TOKEN'
Retrieve individual books or chapters with the On-demand API.
Pull specific Wikibooks pages by title for live access to the current revision, useful when integrating into an application that needs targeted content rather than the full project.
Example call to get a specific Wikibooks page, e.g., the ‘Control Flow’ chapter of a Python book:
curl -L 'https://api.enterprise.wikimedia.com/v2/articles/Python_Programming/Control_Flow' -H 'Content-Type: application/json' -H 'Authorization: Bearer ACCESS_TOKEN' -d '{"filters":[{"field":"is_part_of.identifier","value":"enwikibooks"}]}'
A free Wikimedia Enterprise account gives you immediate access to Wikibooks alongside Wikipedia, Wikidata, Wiktionary, and other Wikimedia project data through the same unified API. Sign up to start building.
Frequently Asked Questions
What is the Wikibooks API?
The Wikimedia Enterprise Wikibooks API provides programmatic access to Wikibooks content across 75+ languages, including textbooks, manuals, and instructional guides. Content is delivered as HTML, Wikitext, and structured JSON metadata, ready for AI training, EdTech applications, and educational tooling.
How do I download all of Wikibooks?
Use the Snapshot API to download complete Wikibooks projects. A free Wikimedia Enterprise account includes Snapshot access. Sign up to get started or see the pricing page for current limits.
What subjects does Wikibooks cover?
Wikibooks covers academic and practical disciplines including Computing (Python, Java, MySQL, LaTeX), Mathematics (Calculus, Statistics), Engineering, Languages, Humanities, and Cooking (the Cookbook recipe collection). Books range from introductory to university level, and many include exercises, code examples, and review questions.
What license is Wikibooks data?
Wikibooks content is dual-licensed under Creative Commons Attribution-ShareAlike 4.0 (CC BY-SA) and the GNU Free Documentation License (GFDL). License information is embedded in every API response. The licenses permit commercial and non-commercial use, including redistribution, adaptation, and inclusion in academic research, provided attribution is preserved and derivative works carry the same license.
How is Wikibooks different from Wikipedia or Wikiversity?
Wikipedia provides encyclopedic reference content. Wikiversity hosts collaborative learning resources and research projects. Wikibooks is specifically a library of instructional textbooks, manuals, and how-to guides organized into chapters and learning modules. For AI training, Wikibooks offers structured “how-to” reasoning and step-by-step instruction that complement Wikipedia’s descriptive tone.
Is there a free way to access Wikibooks data?
Yes. Wikimedia Enterprise offers a free account with no credit card required. The free tier includes access to Snapshot and On-demand endpoints across all Wikimedia projects, including Wikibooks. Sign up to start building.
