English wikibooks logo, including the tagline 'Open books for an open world'

Wikibooks API

Power Your EdTech with Freely Reusable Textbooks

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 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 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 and maintained educational content free from publisher paywalls or proprietary restrictions. This provides a clean, libre dataset ideal for feeding knowledge bases and training models on academic and practical subjects.

Uncover Educational Insights and Curricula

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 a vast array of disciplines, from Computing and Engineering to 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.
A screenshot of the first page of the Wikibooks in English on Statics, showing a table of contents and introductory information.

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. Use the Snapshot API for complete project downloads or the On-demand API to retrieve specific modules or books.

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'

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"}],"limit":10}'


Access Wikibooks, Wikipedia, and other Wikimedia project data through one unified API delivering a consistent JSON output. Get started with free instant access today.