Developers
SanatanIQ Public API
Read-only, JSON access to everything SanatanIQ holds: the Bhagavad Gita, Rigveda and Samaveda, Upanishads, Puranas, temples, rituals, shlokas, the Sanskrit dictionary and, on paid plans, the daily Panchang for Indian cities. The ancient texts are humanity's shared inheritance; we add structure, citations, translations and attribution so you can build on them responsibly.
Base URL: https://api.sanataniq.com/api/public/v1. Machine-readable contract: openapi.json.
Quickstart
With a key in hand, the first call confirms your plan and limits:
curl -H "X-API-Key: sq_live_..." https://api.sanataniq.com/api/public/v1/meThen read scripture:
curl -H "X-API-Key: sq_live_..." https://api.sanataniq.com/api/public/v1/gita/chapters/2/verses/47List endpoints take limit (at most 100) and offset:
curl -H "X-API-Key: sq_live_..." "https://api.sanataniq.com/api/public/v1/vedas/rigveda/mandalas/1/suktas?limit=10&offset=0"Authentication
Every request carries your key, either as X-API-Key: sq_live_… or as Authorization: Bearer sq_live_…. Keys are issued by us (see Get a key), shown once, and stored by us only as a hash, so keep your copy somewhere safe.
Keys are server-side secrets. Call the API from your backend, a serverless function or a build step, never from a browser or a mobile app binary, where anyone can read the key. Cross-origin browser requests are not enabled.
Keys can be labelled, given an expiry, and revoked. A revoked key answers 403 immediately.
Response shape
Every successful response has the same envelope:
{
"success": true,
"data": …, // an object or an array
"meta": {
"count": 10, // items in this response (lists)
"pagination": { "limit": 10, "offset": 0, "total": 191 },
"mediaExpiresAt": "2026-…" // present when data holds image or audio URLs
},
"license": {
"content": [ { "subject": "Rigveda Sanskrit text and structure", "license": "CC BY 4.0", "citation": "…" } ],
"media": [ { "subject": "Temple sketch", "license": "CC BY-SA 4.0", "shareAlike": true, "author": "…" } ]
}
}Numeric ids are stable. Fields that are absent for a record are omitted rather than sent as null. The license block is described under Attribution.
Endpoints
All endpoints are GET under the base URL. Path parameters are shown in braces. The OpenAPI document has every parameter.
Account
GET /me | Your key, plan, limits and today's usage |
Bhagavad Gita
GET /gita/chapters | The 18 chapters |
GET /gita/chapters/{n} | One chapter |
GET /gita/chapters/{n}/verses | Verses with Sanskrit, transliteration, word meanings and recitation |
GET /gita/chapters/{n}/verses/{v} | One verse with its approved translations and commentary |
Vedas
GET /vedas | The Vedas available |
GET /vedas/{slug} | Overview, e.g. rigveda |
GET /vedas/{slug}/mandalas/{m}/suktas | Suktas of a mandala |
GET /vedas/{slug}/mandalas/{m}/suktas/{s} | One sukta with every rik |
GET /vedas/samaveda/purvarcika/… | Samaveda Pūrvārcika kāṇḍas and mantras |
GET /vedas/samaveda/uttararcika/… | Samaveda Uttarārcika prapāṭhakas and mantras |
Upanishads
GET /upanishads | The Upanishads available |
GET /upanishads/{id}/passages | Passages with canonical citations |
GET /upanishads/{id}/passages/{passageId} | One passage |
Puranas
GET /puranas | The 18 Puranas |
GET /puranas/{id}/stories | Stories |
GET /puranas/{id}/passages | Scriptural passages with source and licence |
Explore and learn
GET /temples | Temples, filterable by deity, location or search |
GET /rituals | Rituals with steps and materials |
GET /shlokas | Shlokas with translation and recitation |
GET /sanskrit/dictionary?query= | Sanskrit dictionary search |
Panchang (Pro and Enterprise)
GET /panchang?date=&cityId= | Sunrise, sunset, tithi, nakshatra, yoga, karana, rahukaal |
GET /panchang/cities | Supported cities |
GET /panchang/history?cityId=&startDate=&endDate= | A range of up to 92 days |
GET /panchang/observances?from=&to=&city= | Ekadashi, Purnima, Amavasya, Pradosh, Sankranti and festivals |
Panchang dates must fall within two years of today, and ranges may span at most 92 days. Each uncached date is computed on request, which is why Panchang has its own budget.
Plans and rate limits
| Plan | Per minute | Per day | Panchang | |
|---|---|---|---|---|
| Free | 60 | 1,000 | — | Attribution required. For prototypes, research and small projects. |
| Pro | 600 | 50,000 | 120 / 15 min | Includes Panchang and observances. |
| Enterprise | 2,000 | 500,000 | 600 / 15 min | Custom limits and support on request. |
Limits are per key. Every response carries the standard RateLimit and RateLimit-Policy headers (IETF draft 8), one policy per window, so you can pace requests without guessing:
RateLimit-Policy: "pubapi-minute"; q=60; w=60, "pubapi-day"; q=1000; w=86400
RateLimit: "pubapi-minute"; r=57; t=42When a window is exhausted the API answers 429 with a JSON body; wait for the window to reset. Paid plans are arranged by email for now; see Get a key.
Images and audio
Temple and ritual images and most recitations are served from private storage through signed URLs that expire one hour after the response was generated. meta.mediaExpiresAt tells you when. Fetch the media you need promptly, or request the record again for a fresh URL; never store a signed URL. Recordings hosted on Wikimedia Commons are linked directly and do not expire.
Attribution
The texts are public domain, but the editions, datasets and media SanatanIQ is built on carry obligations, and so does our own writing. Each response lists them in license.content (the text) and license.media (any image or audio URL in the response). When you show or redistribute content you must carry these forward, in particular:
- Rigveda text and structure, CC BY 4.0, from sanskrit-texts/rigveda. Reproduce the
citationfield: Oliver Hellwig, Heinrich Hettrich, Ashutosh Modi, Manfred Pinkal. “Multi-layer Annotation of the Rigveda.” Proceedings of the LREC, 2018. - Recitations from Wikimedia Commons (CC BY-SA 4.0, by NehalDaveND) and sketches drawn from CC BY-SA photographs: credit the author and source, and keep the share-alike licence on anything you derive from them. These entries have
shareAlike: true. - Temple facts from Wikidata are CC0. Annie Besant's 1922 Gita translation and the Sacred Books of the East Upanishad translations are public domain; credit is appreciated.
- SanatanIQ's own summaries, story retellings, meanings and reviewed commentary, some written with AI assistance, are licensed to you under the developer terms: show them with a “Source: SanatanIQ” credit and a link to sanataniq.com.
The full source list is on the sources and credits page.
Errors
Errors are JSON with success: false, a human-readable message and, where useful, a stable code:
| Status | Code | Meaning |
|---|---|---|
| 400 | — | Validation failed; error lists the fields |
| 401 | API_KEY_INVALID | Missing, malformed or unknown key |
| 403 | API_KEY_REVOKED | The key was revoked |
| 403 | API_KEY_EXPIRED | The key passed its expiry |
| 403 | API_CLIENT_SUSPENDED | Your account is suspended; contact us |
| 403 | PLAN_REQUIRED | The endpoint needs a paid plan |
| 404 | — | No such record |
| 429 | — | Rate limit exceeded; read the RateLimit header |
| 503 | FEATURE_DISABLED | The API is switched off on this server |
Get a key
Email admin@wharfstreetstudios.com with what you are building, the plan you need and the email address the key should be registered to. We issue keys by hand and reply within a few days. Free keys are available to anyone who agrees to the developer terms.