SuttaCentral API access

The answer to this question depends on your definition of “source” and “stable”.

  • The JSON source of SuttaCentral Dhamma texts is https://github.com/suttacentral/bilara-data. The default branch of this repository is published. The segmented texts here are updated periodically, and available through the github API as, for example, https://raw.githubusercontent.com/suttacentral/bilara-data/published/translation/en/sujato/sutta/mn/mn11_translation-en-sujato.json. Non-segmented legacy texts are NOT included in bilara-data
  • The formatted HTML Dhamma content is indeed available from suttacentral itself with the URL like https://suttacentral.net/mn11. Such URLs are stable and good for end-user links.

Suttacentral has a suttaplex API that describes a sutta. Voice uses that API, which changes from time to time. It’s fairly stable, at least with respect to major semantic components.

https://suttacentral.net/api/suttaplex/mn11?language=en

Voice has had to solve the problem you’re facing and developed its own APIs for accessing SC data. The Voice APIs support search and audio. Those APIs are beta quality and somewhat unstable.

6 Likes