Return to Main RealmOpen-Access Sacred Data Engine

Yuga Scripture APIs

Publicly accessible, highly-optimized developer endpoints providing complete structured access to the Valmiki Ramayana and Srimad Bhagavad Gita. Fully enabled with CORS headers for direct client-side consumption.

Valmiki Ramayana API

Provides access to all 23,402 shlokas across all 7 Kandas of the classical epic.

Endpoint Structure

GET/api/ramayana

Query Parameters

ParameterTypeDescription
modestringSet to kandas to get the list of all 7 Kandas with their synopsis.
kandaIdstringFilter by Kanda number (1 to 7).
sarganumberFilter by specific Sarga (chapter) number.
shlokanumberFilter by specific shloka (verse) number.
searchstringCase-insensitive search across shloka text, transliteration, translation, and purport.
pagenumberCurrent page (default: 1).
limitnumberResults per page (default: 20, max: 100).
randombooleanSet to true to fetch a random shloka. Can be combined with other filters.

Example Consumption (Fetch JS)

fetch('/api/ramayana?random=true')
  .then(res => res.json())
  .then(data => console.log(data));

Interactive PlaygroundLive Sandbox

GET
No request sent. Click Send Request to execute call.