The API
Every unit in the library is a JSON file served from the same CDN as the pages. There is no key, no rate limit, no account and no server that can go down independently of the site itself. If you can fetch a page here, you can fetch its data.
Start here
curl https://sanatan.digital/api/v1/index.jsonThat returns the manifest: counts, licence position and every endpoint shape.
One verse
curl https://sanatan.digital/api/v1/rv/10.129.1.jsonThe response carries the original in Devanagari, IAST transliteration, the padapāṭha where one exists, the ṛṣi, devatā and chandas, every translation with its status and translator, the agreement result, and aprovenance map naming the source of each field. Resolve those source ids against /api/v1/sources.json.
One division
curl https://sanatan.digital/api/v1/rv/10.129.jsonThe whole sūkta, with all its ṛcs inline.
A whole work
curl https://sanatan.digital/api/v1/works/rigveda.jsonBulk, line delimited
curl https://sanatan.digital/api/v1/bulk/rigveda.jsonl \
| jq -r 'select(.agreement == "divergent") | .id'One JSON object per line, which is the format you want if you are piping it anywhere. See also the bulk download page.
Addresses in the library
| Work | Prefix | Reference shape | Example |
|---|---|---|---|
| Ṛgveda Saṃhitā | rv | mandala.sukta.rc | /api/v1/rv/… |
| Bhagavad Gītā | bg | chapter.verse | /api/v1/bg/… |
| Īśopaniṣad | isha | mantra | /api/v1/isha/… |
| Muṇḍakopaniṣad | mundaka | mundaka.khanda.mantra | /api/v1/mundaka/… |
Stability
An address, once published, does not change or get reused. That is the single promise this project makes to anyone building on it. The/api/v1/ prefix will keep its current shape; anything incompatible goes to /api/v2/ and both stay up.
Terms
The texts are public domain. The apparatus is CC BY-SA 4.0. Per-unit licences are recorded in provenance and resolved againstthe source registry. Attribution to sanatan.digital is appreciated and, for the apparatus, required.