<p>SC has a API. E.g. : <a href="https://suttacentral.net/data?suttas=dn1,dn2" rel="nofollow noreferrer">https://suttacentral.net/data?suttas=dn1,dn2</a></p>

<p>Also see: <a href="https://discourse.suttacentral.net/t/suttacentral-api-apps/1927/8" rel="nofollow noreferrer">https://discourse.suttacentral.net/t/suttacentral-api-apps/1927/8</a></p>

<p>Also the data is in Github. E.g. <a href="https://github.com/suttacentral/suttacentral-data/blob/master/text/en/pi/su/an/an1/an1.21-40.html" rel="nofollow noreferrer">https://github.com/suttacentral/suttacentral-data/blob/master/text/en/pi/su/an/an1/an1.21-40.html</a> </p>

<p>Similarly you can download the whole Access to Insight website as files: <a href="http://www.accesstoinsight.org/tech/download/bulk.html" rel="nofollow noreferrer">http://www.accesstoinsight.org/tech/download/bulk.html</a></p>

CC BY-SA 3.0
2017-02-06T02:35:45.393Z
2017-02-06T02:35:45.393Z
Suminda Sirinath S. Dharmasena
<p>Does anyone know of an API for Buddhist texts along the same lines as this one for the <a href="https://bibles.org/pages/api" rel="nofollow noreferrer">Bible</a>. I do some spare time software projects and I would like to hook up to Buddhist text API just as part of playing around with some new technologies. Currently I'm using the <a href="https://developers.google.com/books/" rel="nofollow noreferrer">Google Books</a> API for it.</p>

<p>What I'm imaging is that one could make a web request to a URL such as <a href="http://buddhisttextapi/dhammapada/verse/12" rel="nofollow noreferrer">http://buddhisttextapi/dhammapada/verse/12</a> and you would get back the 12th verse of the dhammapada in whatever translation. So for the technically minded I'm interested in some kind of REST API - preferably under active development or at least with some decent documentation.</p>

<p>Many Thanks </p>

CC BY-SA 3.0
2017-02-05T18:18:32.190Z
SuttaCentral, for example, uses URLs which look like [https://suttacentral.net/en/sn5.3](https://suttacentral.net/en/sn5.3) ... would that count as an answer or are you looking for something other than that?
ChrisW
CC BY-SA 3.0
2017-02-05T19:41:21.283Z
@ChrisW Thanks but not really. That returns HTML which is human readable. You want machine readable so XML or JSON.
Crab Bucket
CC BY-SA 3.0
2017-02-05T20:25:11.873Z
To machine-read any web site, I use Html Agility Pack, which converts an HTML document to XML. Looking at the format of that linked Sutta Central page, for example, I would extract the contents of the `article` element (or `section.sutta` or `div#text` elements).
ChrisW
CC BY-SA 3.0
2017-02-06T03:23:05.310Z
@ChrisW I didn't know HAP can convert HTML to XML. +1
NuWin
CC BY-SA 3.0
2017-02-06T09:15:56.917Z
@ChrisW true but I just want the JSON or XML directly. I don't want to use the Agility Pack or any HTML parsing (like what is offered in google books). I'm using node.js and express for the server. The agility pack is purely C# isn't it. But thanks for the thought. The answer below gives a good to be fair so I'm happy with that
Crab Bucket
CC BY-SA 4.0
2019-12-06T20:55:38.537Z
@Crab Bucket, how did suttacentral api work out for you?
buddhatunes
<modern-world><media>
Is there an API for Buddhist texts?
# Is there an API for Buddhist texts?

(Asked by: username_0 on 2017-02-05)

Does anyone know of an API for Buddhist texts along the same lines as this one for the [Bible](https://bibles.org/pages/api). I do some spare time software projects and I would like to hook up to Buddhist text API just as part of playing around with some new technologies. Currently I'm using the [Google Books](https://developers.google.com/books/) API for it.

What I'm imaging is that one could make a web request to a URL such as <http://buddhisttextapi/dhammapada/verse/12> and you would get back the 12th verse of the dhammapada in whatever translation. So for the technically minded I'm interested in some kind of REST API - preferably under active development or at least with some decent documentation.

Many Thanks

**Tags:** modern-world, media

> **Comments:**
> **username_1**: SuttaCentral, for example, uses URLs which look like [https://suttacentral.net/en/sn5.3](https://suttacentral.net/en/sn5.3) ... would that count as an answer or are you looking for something other than that?  
> **username_0**: @username_1 Thanks but not really. That returns HTML which is human readable. You want machine readable so XML or JSON.  
> **username_1**: To machine-read any web site, I use Html Agility Pack, which converts an HTML document to XML. Looking at the format of that linked Sutta Central page, for example, I would extract the contents of the `article` element (or `section.sutta` or `div#text` elements).  
> **username_2**: @username_1 I didn't know HAP can convert HTML to XML. +1  
> **username_0**: @username_1 true but I just want the JSON or XML directly. I don't want to use the Agility Pack or any HTML parsing (like what is offered in google books). I'm using node.js and express for the server. The agility pack is purely C# isn't it. But thanks for the thought. The answer below gives a good to be fair so I'm happy with that  
> **username_3**: @username_0, how did suttacentral api work out for you?  

---

## 1 answers

### Answer by username_4 on 2017-02-06. Score: 3 | Accepted answer

SC has a API. E.g. : <https://suttacentral.net/data?suttas=dn1,dn2>

Also see: <https://discourse.suttacentral.net/t/suttacentral-api-apps/1927/8>

Also the data is in Github. E.g. <https://github.com/suttacentral/suttacentral-data/blob/master/text/en/pi/su/an/an1/an1.21-40.html>

Similarly you can download the whole Access to Insight website as files: <http://www.accesstoinsight.org/tech/download/bulk.html>


---

