I’m working on the hyperlink system, and I would like to use suttacentral as the source of the texts : are the URL like https://suttacentral.net/mn11 stable, or is there better way to link to a specific text ? Also is there a specific link or API to know if a translation is available in a specific language, or to have the Pali name of this text ?
I’m currently using this file sc-data/text_extra_info.json at master · suttacentral/sc-data · GitHub ; I would prefer to use an API to avoid keeping in sync when the file changes. I didn’t find documentation about existing APIs, I would be grateful if some points me to the docs if they exist !
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.
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.