Do you need all the information regarding translations for a specific sutta on SuttaCentral? Or do you need to get the actual translation for one of the legacy suttas? Then the sutta API is what you need.
[ All API documentation | General discussion on SC APIs ]
The SuttaPlex cards provide the website user with a collection of all existing information about a particular sutta, including:
- Link to root text
- Links to all translations of that sutta
- All paralels
- The previous and next suttas where they exist.
- Blurb (aka short description)
- Difficulty level
This is what the card looks like on the website navigation:
The same information can be seen when viewing a sutta and clicking on parallels:
Requesting SuttaPlex information
There are several options. See the examples below
Basic request
https://suttacentral.net/api/suttas/mn1
Returns an OBJECT
with the following key value pairs:
root_text
null
translation
null
segmented
(BOOLEAN
)
Not sure why this is false
.
suttaplex
{
Returns an object with the following key/value pairs:
key | value |
---|---|
acronym (STRING ) |
This is a citation with the abbreviation properly capitalized, e.g. "Iti 1" , MN 1
|
volpages (STRING ) |
A string with comma separated PTS pages where the sutta can be found. E.g. " PTS 1.1, PTS 1.2, PTS 1.3, PTS 1.4, PTS 1.5, PTS 1.6"
|
alt_volpages |
|
uid (STRING ) |
Unique identifier for the sutta. All lowercase, no spaces E.g. â iti1 â, "mn1"
|
blurb (STRING ) |
A description of the sutta. By default the description is in English (see other options below) |
difficulty (INT ) |
Number from 1 to 3 |
original_title (STRING ) |
Title in the root language. Capitalized. |
root_lang (STRING ) |
Language id. E.g "pli"
|
root_lang_name (STRING ) |
Full name of the language. E.g. "PÄli"
|
type |
"leaf" what is this?
|
from |
what is this? |
translated_title (STRING ) |
Default English title of sutta |
translations (ARRAY ) |
A list of objects with translations for this sutta. See description below. |
parallel_count (INT ) |
Number of parallels this sutta has |
biblio |
what is this? |
priority_author_uid |
what is this? |
Objects in translations
array (see above)
Key | value |
---|---|
lang_name (STRING ) |
Full language name. E.g. "English"
|
is_root (BOOLEAN ) |
This is a little counter intuitive because this array of translations also includes the root text. So, this value will be true if it is a root text. |
author (STRING ) |
Full author name. E.g. "Bhikkhu Sujato"
|
author_short (STRING ) |
Unique author code. E.g. "sujato" Is this ever a different value from author_uid ?
|
author_uid (STRING ) |
Unique author code. E.g."sujato"
|
publication_date |
Is this going to be used? |
id (STRING ) |
where is this used? E.g. "mn1_translation-en-sujato"
|
segmented (BOOLEAN ) |
"true" if it was created using the Bilara software and can be presented line by line with the PÄli. |
title (STRING ) |
The specific sutta title within this translation |
volpage |
Is this the volume and page number if the translation was previously published? |
bilara_root_text
{
This is an object with the following key/value pairs:
needs to be completed
}
needs to be completed
Request including translator
https://suttacentral.net/api/suttas/mn1/sujato
needs to be completed
Parameters
lang=en
needs to be completed
siteLanguage=en
needs to be completed
Note: This is post is a wiki. Please feel free to click the edit button below to make changes. Feel free to reply to the post if you have questions