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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

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

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://bhagavadgitaapi.in/slok/1/1/";
// 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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Books
Difficulty Intermediate
Listing details not endpoint-verified

Similar APIs

View All →