Where Can I get the Json Or API for Budhisms Main books?

i went to suttacentral and i couldnt find any json or api can anybody help me out with a direct link? because i am a beginner in coding

Welcome!!

You should check out the API documentation: Topics tagged api-documentation

They are, like most API docs, a work in progress.

I think I mention it, but for a simple example of using the API to render suttas, check out SC-Light: https://sc.readingfaithfully.org/?q=MN3 Scroll to the bottom and you will find a link to the github repo.

The json files for the segmented suttas are found here: https://github.com/suttacentral/bilara-data You will want to drill down in the HTML, root, and translation folders.

The API is a much better way to get them. It is also possible to get the non-segmented texts that way too.

I’m going to move this to the Meta > dev category.

1 Like

I am really a big beginner i think i just can do with a direct json or api link like i got the whole bible in one json in github in english

That doesn’t exist for SuttaCentral. The collection of books is so large that a single json would be so large as to be unusable. The minimum collection is more then 11 times the size of the Christian Bible.

If you are looking to use the data to train LLMs, SuttaCentral asks that its data not be used for that.

If you are not using it for training LLMs, I can probably help you get what you are looking for.

3 Likes

I am not training any LLM

I am just trying to make a wholesome religion based app

So what are the steps for the API? I used the json bilara data from github

But i would like to use the API

Did you look at that? At this point we would need you to ask a specific question about how our API works. Or tell us exactly what data you are trying to get from an API and we can point you to the right one.

And to be clear, are you asking how to fetch suttas from the live suttaCentral API, or are you asking how to set up your own version of the API running on your own server? Those are two very different things.