Discover/Wikisource API
live

Wikisource APIen.wikisource.org

Access all 81 chapters of James Legge's 1891 Tao Te Ching translation via API. Retrieve individual chapters or the full text with chapter numbers and verbatim content.

This API takes change requests — .
Endpoint health
verified 31m ago
get_chapters
get_chapter
2/2 passing latest checkself-healing
Endpoints
2
Updated
1h ago

What is the Wikisource API?

This API exposes the complete text of James Legge's 1891 translation of the Tao Te Ching (Tâo Teh King) from Wikisource, covering all 81 chapters across 2 endpoints. The get_chapters endpoint returns the full collection as a structured array, while get_chapter retrieves a single chapter by number, each response including the verbatim chapter text, chapter number, translator name, and publication source.

This call costs1 credit / call— charged only on success
Try it

No input parameters required.

api.parse.bot/scraper/c0559c61-11e2-4951-9f6e-4269e1acebac/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/c0559c61-11e2-4951-9f6e-4269e1acebac/get_chapters' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace en-wikisource-org-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Tao Te Ching API — fetch book metadata and read individual chapters."""
from parse_apis.en_wikisource_org_api import TaoTeChingAPI, InvalidChapterNumber

client = TaoTeChingAPI()

# Fetch the full book to see metadata and chapter listing
book = client.books.get()
print(f"{book.title} — translated by {book.translator}")
print(f"Source: {book.source}")
print(f"Total chapters: {book.total_chapters}")

# Browse the first 3 chapter summaries from the book
for summary in book.chapters[:3]:
    print(f"  Ch. {summary.chapter}: {summary.text[:60]}...")

# Navigate from a summary to its full detail via .details()
first_summary = book.chapters[0]
full_chapter = first_summary.details()
print(f"\nFull chapter {full_chapter.chapter}: {full_chapter.text[:120]}...")

# Direct point-lookup for a specific chapter by number
ch42 = client.chapters.get(chapter=42)
print(f"\nChapter {ch42.chapter}: {ch42.text[:100]}...")

# Handle an invalid chapter number gracefully
try:
    client.chapters.get(chapter=99)
except InvalidChapterNumber as e:
    print(f"\nExpected error for chapter 99: {e.message}")

print("\nexercised: books.get / ChapterSummary.details / chapters.get / InvalidChapterNumber")
All endpoints · 2 totalmissing one? ·

Returns all 81 chapters of the Tao Te Ching in James Legge's translation. Each chapter includes the chapter number and full verbatim text. Makes a single request to Wikisource's API.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "title": "Original title of the work (Tâo Teh King)",
    "source": "Publication source and year",
    "chapters": "Array of chapter objects each containing chapter number and full text",
    "translator": "Translator name (James Legge)",
    "total_chapters": "Total number of chapters (always 81)"
  },
  "sample": {
    "data": {
      "title": "Tâo Teh King",
      "source": "Sacred Books of the East, Vol. 39 (1891)",
      "chapters": [
        {
          "text": "The Tao that can be described is not the enduring and unchanging Tao. The name that can be named is not the enduring and unchanging name.\n(Conceived of as) having no name, it is the Originator of heaven and earth; (conceived of as) having a name, it is the Mother of all things.\nAlways without desire we must be found,\n\nIf its deep mystery we would sound;\n\nBut if desire always within us be,\n\nIts outer fringe is all that we shall see.\nUnder these two aspects, it is really the same; but as development takes place, it receives the different names. Together we call them the Mystery. Where the Mystery is the deepest is the gate of all that is subtle and wonderful.",
          "chapter": 1
        }
      ],
      "translator": "James Legge",
      "total_chapters": 81
    },
    "status": "success"
  }
}

About the Wikisource API

Endpoints and Response Fields

The get_chapters endpoint takes no inputs and returns the complete work in a single response. The chapters array contains 81 objects, each with a chapter number and the full verbatim text of that chapter. The top-level response also includes title (Tâo Teh King), source (Sacred Books of the East, Vol. 39, 1891), translator (James Legge), and total_chapters (always 81).

The get_chapter endpoint accepts a single required integer parameter, chapter, in the range 1–81. It returns chapter (the requested number), text (full verbatim chapter text), title, and translator. This is the appropriate endpoint when you need only one section — for example, rendering a specific chapter in a reading app or running text analysis on a single passage.

Source and Translation Notes

The text is Legge's translation as published in the Sacred Books of the East series, Vol. 39 (1891), hosted on Wikisource. The work is in the public domain. The API reflects that edition exactly — the chapter text matches the Wikisource-hosted version, including Legge's original spellings, annotations, and diacritical marks (e.g., Tâo, Teh). No modernized or alternate translations are included in this API.

Reliability & maintenanceVerified

The Wikisource API is a managed, monitored endpoint for en.wikisource.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when en.wikisource.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official en.wikisource.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
31m ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a daily chapter reader app that fetches one chapter at a time using get_chapter with a rotating chapter number.
  • Run comparative textual analysis across all 81 chapters by pulling the full chapters array from get_chapters.
  • Populate a searchable database of classical philosophical texts with structured chapter-level records.
  • Generate embeddings or semantic search indexes over Legge's translation using the verbatim text fields.
  • Display chapter-by-chapter reading progress in a philosophy study tool, referencing total_chapters to track completion.
  • Integrate public-domain philosophical texts into an LLM fine-tuning dataset with clean chapter boundaries.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Wikisource have an official developer API?+
Yes. Wikisource runs on MediaWiki, which exposes the MediaWiki Action API at https://en.wikisource.org/w/api.php. That API is general-purpose and requires manual parsing of wikitext or HTML to extract structured chapter data; this Parse API returns clean, chapter-level JSON without that processing step.
What exactly does `get_chapter` return for each chapter?+
get_chapter returns four fields: chapter (the integer you requested), text (the full verbatim chapter text from Legge's translation), title (Tâo Teh King), and translator (James Legge). It does not include footnotes, section headings within a chapter, or the original Chinese text.
Does the API include the original Chinese text alongside the English translation?+
Not currently. Both endpoints return only Legge's English translation. The text field contains no Chinese characters or romanized Chinese source text. You can fork this API on Parse and revise it to add a parallel Chinese-text field if the Wikisource source page includes that content.
Are other translations of the Tao Te Ching available through this API?+
Not currently. The API covers only James Legge's 1891 translation from Sacred Books of the East, Vol. 39. Other translations (such as those by Giles or Waley) are not returned by any endpoint. You can fork this API on Parse and revise it to point at a different Wikisource translation page and add the missing endpoint.
How fresh is the text data — does it update if the Wikisource page is edited?+
The text reflects the Wikisource-hosted edition of Legge's 1891 translation. Because the work is a historical public-domain text, the Wikisource page changes infrequently. Minor editorial corrections on Wikisource would be reflected after the API's cache refreshes, but the core content is stable.
Page content last updated . Spec covers 2 endpoints from en.wikisource.org.
Related APIs in EducationSee all →
vedabase.io API
vedabase.io API
fengsuitang.com API
Access articles, products, and Taoist calendar information from Feng Sui Tang, a Hong Kong-based Taoist cultural organization. Browse their collection of cultural content and check the Taoist calendar for dates and auspicious timing.
ranobes.top API
Access novel chapter listings and read full chapter text from ranobes.top to stay updated on your favorite stories. Browse through available chapters and retrieve complete content for any novel in the database.
qingheks.com API
Search and discover novels on Qinghe Book City by title or keyword, then browse chapter lists and read full chapter content directly. Access a comprehensive library of books with seamless navigation between chapters for uninterrupted reading.
aquinas.cc API
Search and retrieve bilingual texts from Thomas Aquinas's philosophical and theological works, with the ability to find specific articles and statements across the entire collection. Access organized works by reference or use global search to discover relevant passages on topics within Aquinas's writings.
openstax.org API
Access learning outcomes, table of contents, and metadata from 60+ free OpenStax textbooks spanning Business, Science, Math, Social Sciences, Humanities, Computer Science, and Nursing. Search and retrieve structured content from any of these textbooks.
biblehub.com API
Search Hebrew and Greek biblical lexicon data, explore word morphology and definitions, and analyze interlinear verse translations to deepen your understanding of biblical text. Look up Strong's numbers and linguistic details across both original language systems in one place.
legislation.gov.uk API
Search and retrieve official UK legislation from legislation.gov.uk, including Acts of Parliament and Statutory Instruments, by title, year, number, or type. Browse complete tables of contents and read the full text of individual sections to find the specific legal information you need.