Bhagavad Gita API

Books / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

The Bhagavad Gita API provides structured access to all 18 chapters and 700 verses with translations from 21+ authors in Sanskrit, English, and Hindi. It is ideal for spiritual study apps or text comparison tools.

💡

Beginner Tip

Get your free API key from docs.bhagavadgitaapi.in and pass it in the x-api-key header. Start with GET /chapters to see available chapter IDs before fetching individual verses.

Available Data

repository name and description
star and fork counts
contributor data
issues and pull requests
commit history
book title and author

Example Response

JSON Response
{
  "translatedText": "Bonjour le monde",
  "detectedSourceLanguage": "en",
  "targetLanguage": "fr"
}

Field Reference

slok The original Sanskrit verse in Devanagari script
transliteration Romanized phonetic transliteration of the Sanskrit verse
tej.ht Hindi translation of the verse by the tej author set
siva.et English translation of the verse by the siva author set
chapter_number Chapter number 1-18 the verse belongs to
verse_number Position of the verse within its chapter

Implementation Example

const url = "https://docs.bhagavadgitaapi.in/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

403 Forbidden API key not included or using the wrong header name
Add 'x-api-key: YOUR_KEY' to your request headers; check the docs for the exact header name for your access tier
404 on verse endpoint Chapter or verse number is out of the valid range
Chapters run 1-18; verse counts vary per chapter. Call /chapters/{id} first to check verseCount before fetching a specific verse
Empty translations array Requesting a translation author ID that does not exist
Call GET /translations to list valid author IDs before filtering by author

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Books
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →