OneBhakthi API docs
Everything you need to read the Bhagavad Gita, the Panchang and daily horoscopes from your own app or website.
Getting started
All calls go to https://www.onebhakthi.org/api/v1 and return JSON. Every call needs a key.
- Get a free key. Sign in with Google and it appears in under a minute.
- Send it in the
X-API-Keyheader. - Make your first call.
curl "https://www.onebhakthi.org/api/v1/gita/2/47?lang=en" \
-H "X-API-Key: ob_live_your_key"Your API key
A key looks like ob_live_…. Send it in the X-API-Key header, never in the web address, so it does not end up in logs or browser history.
- We show a key once, when you make it. We keep only a scrambled copy, so we cannot show it again.
- You can make a key for each app, and revoke any of them from your dashboard. A revoked key stops working at once.
- Keep keys out of code you publish. If a key leaks, revoke it and make a new one.
- Calls from a browser tell us the website address they came from. Calls from servers and mobile apps do not. Our own systems never store IP addresses.
Limits and plans
A key on the Free plan gets 5,000 calls a day, which resets at midnight UK time, and 120 calls a minute. That is plenty for an app. Calls that fail on our side (a 5xx error) are given back and do not count. If you need more, or your product earns money, see the plans. Whole chapters come back in one call with /gita/{chapter}, which is kinder to your limit than 78 separate verse calls.
Every response tells you where you stand.
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Your calls per day |
X-RateLimit-Remaining | Calls left today |
X-RateLimit-Reset | Seconds until the daily count resets |
Retry-After | On a 429, how many seconds to wait |
Responses can be cached by your own app for a few minutes, because the text does not change. Fair use is simple: no scraping the whole text to republish it as your own, and credit the translators shown in each response.
Errors
Errors always look the same, and never include anything about our systems.
{
"error": {
"code": "daily_limit",
"message": "This key has reached its daily limit. It resets at midnight UK time."
}
}| Status | Code | What it means |
|---|---|---|
| 400 | bad_request | Something in the request is wrong: a language we do not have, a search that is too short or too long, a number out of range. The message says which. |
| 401 | missing_key | No key was sent. Use the X-API-Key header. |
| 401 | invalid_key | The key is wrong or malformed. |
| 401 | key_revoked | The key was revoked. Make a new one on your dashboard. |
| 403 | key_suspended | We have paused the key. Please contact us. |
| 404 | not_found | No such chapter or verse. |
| 413, 415 | payload_too_large, unsupported_media_type | A POST body that is too big, or not sent as JSON with Content-Type: application/json. |
| 422 | no_sunrise | A sunrise-based Panchang cannot be worked out because the Sun does not rise or set that day at that place (near the poles). |
| 429 | rate_limited | Too many calls in a minute. Wait for Retry-After seconds. |
| 429 | daily_limit | The key used up its calls for today. It resets at midnight UK time. |
| 502, 503 | upstream_error, unavailable, reading_not_ready | A problem on our side, or no horoscopes are stored yet. Try again shortly. These calls are not counted against your limit. |
Gita API
The Bhagavad Gita: 18 chapters and 701 verses, each with its Sanskrit, who speaks it, and translations in English, Tamil and Hindi. Pick the languages with lang: en, ta, hi, several separated by commas (lang=ta,en), or lang=all. English is the default.
Chapters
/api/v1/gita/chaptersThe 18 chapters with their verse counts and chapter names (Tamil names and introductions today).
{
"chapters": [
{
"chapter": 1,
"verse_count": 47,
"names": [ { "lang": "ta", "name": "அர்ஜுன விஷாத யோகம்", "situation": "…", "source": "Subramania Bharati" } ]
},
…
],
"attribution": "Texts: Tamil by Subramania Bharati (public domain). Served by OneBhakthi API."
}A whole chapter
/api/v1/gita/{chapter}| Parameter | Where | What it does |
|---|---|---|
chapter | path | 1 to 18 |
lang | query | Languages, comma separated. Default en |
X-API-Key | header | Your key |
Returns verse_count, the chapter names, and every verse in order, each shaped like the single verse below.
Get a verse
/api/v1/gita/{chapter}/{verse}Returns one verse with its Sanskrit, the speaker and the translations you ask for.
| Parameter | Where | What it does |
|---|---|---|
chapter | path | 1 to 18 |
verse | path | Verse number in that chapter |
lang | query | Languages, comma separated: en, ta, hi, or all. Default en |
X-API-Key | header | Your key |
{
"chapter": 2,
"verse": 47,
"speaker": "krishna",
"sanskrit": "कर्मण्येवाधिकारस्ते मा फलेषु कदाचन । …",
"translations": [
{
"lang": "ta",
"text": "தொழில் செய்யத்தான் உனக்கு அதிகாரமுண்டு. …",
"source": "Subramania Bharati"
},
{
"lang": "en",
"text": "Thy business is with the action only, never with its fruits; …",
"source": "Annie Besant and Bhagavan Das (1922)"
}
],
"attribution": "Texts: Sanskrit as printed in the Besant and Bhagavan Das edition (1922, public domain); Tamil by Subramania Bharati (public domain); English by Annie Besant and Bhagavan Das (1922, public domain). Served by OneBhakthi API."
}speaker is one of krishna, arjuna, sanjaya or dhritarashtra. If a language you asked for has no text for that verse, it is listed in unavailable and the rest still comes back:
{
"chapter": 18,
"verse": 49,
"speaker": "krishna",
"sanskrit": "असक्तबुद्धिः सर्वत्र …",
"translations": [ { "lang": "en", "text": "He whose Reason is everywhere unattached, …", "source": "…" } ],
"unavailable": ["ta"],
"attribution": "…"
}Try it
Search
/api/v1/gita/search?q=duty&lang=enFinds verses whose translation contains your words. Searches one language at a time.
| Parameter | Where | What it does |
|---|---|---|
q | query | The words to find, 2 to 80 characters |
lang | query | One of en, ta, hi. Default en |
limit | query | 1 to 50. Default 20 |
offset | query | 0 to 1000, for the next page. Default 0 |
{
"query": "duty",
"lang": "en",
"count": 1,
"results": [
{
"chapter": 2,
"verse": 7,
"lang": "en",
"text": "My heart is weighed down with the vice of faintness; my mind is confused as to duty. …",
"source": "Annie Besant and Bhagavan Das (1922)"
}
],
"attribution": "Texts: English by Annie Besant and Bhagavan Das (1922, public domain). Served by OneBhakthi API."
}Search words are used to find results and then forgotten. We do not store them.
Languages and sources
/api/v1/gita/sourcesEvery response names its sources. Here is the full list.
| Text | Source | Verses | Notes |
|---|---|---|---|
| Sanskrit and English | Annie Besant and Bhagavan Das, The Bhagavad-Gita, 4th edition, 1922. Public domain. | 701 | This edition counts 35 verses in Chapter 13, one more than the usual 34. |
| Tamil | Subramania Bharati (Bharathiar). Public domain. | 697 | Exactly as printed. The book has no text for 13.35, 18.49, 18.58 or 18.61. Chapter names and introductions are in Tamil. |
| Hindi | Machine translation of the English above, checked verse by verse. | 701 | There is no printed Hindi edition behind it. Every response says so. |
Please credit the translators shown in each response. A line such as “Powered by OneBhakthi API” with a link is welcome, and never required.
Astrology API
The Panchang, moon dates, birth signs and daily horoscopes, in English, Tamil and Hindi. Everything except the horoscopes is worked out from the real positions of the Sun and Moon, for any place on Earth and any date from 1900 to 2100. Nothing is looked up, and nothing you send is stored.
| Endpoint | What it gives you |
|---|---|
GET /astrology/panchang | The day: tithi, nakshatra, yoga, karana, sunrise and sunset, Rahu Kalam and more |
GET /astrology/moon | Moon phase, coming Ekadashi, Purnima and Amavasya, Mercury retrograde |
POST /astrology/birth | Sun sign, Moon sign and birth nakshatra from a birth date, time and place |
GET /astrology/horoscope | The daily or weekly reading for a sign, written by OneBhakthi AI |
How every Astrology call works
- Place. Send
latandlonin degrees, with east and north positive. We work out the time zone from them. Sendtimezone, for exampleEurope/London, if you want to choose it. Two decimal places (about 1 km) is plenty, so please do not send more than you need. - Dates. Written
2026-10-06, meaning that calendar day at the place. If you leavedateout, you get today at the place. - Times. Every time is written with its local offset, rounded to the minute, such as
2026-10-06T07:09:00+01:00. A time after midnight carries the next day's date. - Languages.
lang=en(default),taorhi. English uses the usual spellings (Ekadashi, Ashlesha). Tamil and Hindi use their own script. Fields such asnumberandkeynever change with the language, so use those in code. - Sunrise to sunrise. A Hindu day runs from one sunrise to the next. The tithi, nakshatra, yoga and karana of the day are the ones in force at sunrise, and each comes with the exact time it ends. That is how the published panchangs do it.
- Ayanamsha. Lahiri (Chitrapaksha), the official Indian value.
Panchang
/api/v1/astrology/panchang?lat=51.5074&lon=-0.1278&date=2026-10-06| Parameter | Where | What it does |
|---|---|---|
lat | query | Latitude, -90 to 90. Required |
lon | query | Longitude, -180 to 180, east positive. Required |
date | query | The day, 1900-01-01 to 2100-12-31. Default: today at the place |
timezone | query | A time zone name. Default: worked out from lat and lon |
lang | query | en, ta or hi. Default en |
{
"date": "2026-10-06",
"lang": "en",
"place": { "lat": 51.5074, "lon": -0.1278, "timezone": "Europe/London", "utc_offset": "+01:00" },
"ayanamsha": { "name": "lahiri", "degrees": 24.2309 },
"weekday": { "number": 2, "name": "Tuesday", "ruler": { "key": "mars", "name": "Mars" } },
"sun": {
"sunrise": "2026-10-06T07:09:00+01:00",
"sunset": "2026-10-06T18:27:00+01:00",
"next_sunrise": "2026-10-07T07:11:00+01:00",
"sign": { "number": 6, "name": "Kanya", "western": "Virgo" }
},
"moon": {
"moonrise": "2026-10-07T03:11:00+01:00",
"moonset": "2026-10-06T16:51:00+01:00",
"sign": { "number": 4, "name": "Karka", "western": "Cancer" },
"signs": [ { "number": 4, "name": "Karka", "start": "…", "end": "2026-10-06T17:48:00+01:00", "at_sunrise": true }, … ]
},
"tithi": {
"number": 11, "lunar_day": 26, "name": "Ekadashi",
"paksha": { "key": "krishna", "name": "Krishna" },
"start": "2026-10-05T21:38:00+01:00",
"end": "2026-10-06T20:05:00+01:00",
"at_sunrise": true
},
"tithis": [ { "name": "Ekadashi", "at_sunrise": true, … }, { "name": "Dwadashi", "at_sunrise": false, … } ],
"nakshatra": {
"number": 9, "name": "Ashlesha",
"lord": { "key": "mercury", "name": "Mercury" },
"start": "2026-10-05T18:40:00+01:00",
"end": "2026-10-06T17:48:00+01:00",
"at_sunrise": true
},
"nakshatras": [ … ],
"yoga": { "number": 22, "name": "Sadhya", "start": "…", "end": "2026-10-07T00:31:00+01:00", "at_sunrise": true },
"yogas": [ … ],
"karana": { "number": 51, "name": "Bava", "start": "…", "end": "2026-10-06T08:50:00+01:00", "at_sunrise": true },
"karanas": [ … ],
"month": {
"amanta": { "number": 6, "name": "Bhadrapada", "adhika": false },
"purnimanta": { "number": 7, "name": "Ashvina", "adhika": false }
},
"samvat": { "shaka": 1948, "vikram": 2083 },
"season": { "ritu": { "number": 3, "name": "Varsha" }, "ayana": { "key": "dakshinayana", "name": "Dakshinayana" } },
"periods": {
"rahu_kalam": { "start": "2026-10-06T15:38:00+01:00", "end": "2026-10-06T17:02:00+01:00" },
"yamagandam": { "start": "…", "end": "…" },
"gulika_kalam": { "start": "…", "end": "…" },
"abhijit_muhurta": { "start": "2026-10-06T12:26:00+01:00", "end": "2026-10-06T13:11:00+01:00", "applicable": true },
"choghadiya": [ { "key": "rog", "name": "Rog", "nature": "inauspicious", "start": "…", "end": "…" }, … ]
},
"attribution": "Computed by OneBhakthi from the positions of the Sun and Moon, using the Lahiri ayanamsha. Served by OneBhakthi API."
}| Field | What it is |
|---|---|
tithi, nakshatra, yoga, karana | The one in force at sunrise, with the times it starts and ends. The start can be the evening before. |
tithis, nakshatras, yogas, karanas | Every one that runs during the day, in order. The first has at_sunrise true. The last can end after the next sunrise. |
tithi.number | 1 to 15 within the half of the month (paksha), the way tithis are named. lunar_day is 1 to 30 across the whole month. |
moon.signs | The Moon's sign during the day, the same way. sun.sign is the Sun's sidereal sign at sunrise. |
month | The lunar month counted both ways: amanta (new moon to new moon) and purnimanta (full moon to full moon). adhika is true in an extra month. |
samvat | Shaka and Vikram years, both starting at Chaitra. |
season | The Vedic ritu, from the lunar month (Chaitra and Vaishakha are Vasanta, and so on), and the ayana, from the Sun's sidereal sign. |
periods | Rahu Kalam, Yamagandam, Gulika Kalam, Abhijit Muhurta and the eight daytime Choghadiya periods, each as start and end. |
- moonrise and moonset are the first of each between this sunrise and the next, or
nullif there is none. They use the centre of the Moon at the horizon, as Drik Panchang does. - Many traditions do not use Abhijit Muhurta on a Wednesday. We still give the times, with
applicableset to false. - Near the poles there are days with no sunrise or no sunset. Then a sunrise-based Panchang cannot be worked out and you get a
422with the codeno_sunrise.
Moon and observances
/api/v1/astrology/moon?lat=51.5074&lon=-0.1278&days=45| Parameter | Where | What it does |
|---|---|---|
lat, lon | query | The place. Required |
date | query | Start day. Default: today at the place. The phase is for midday that day (for this moment if you send no date) |
days | query | How many days of observances to list, 1 to 120. Default 45 |
timezone, lang | query | As for the Panchang |
{
"date": "2026-10-06",
"lang": "en",
"place": { "lat": 51.5074, "lon": -0.1278, "timezone": "Europe/London", "utc_offset": "+01:00" },
"at": "2026-10-06T12:00:00+01:00",
"phase": { "key": "waning_crescent", "name": "Waning Crescent", "illumination": 0.195, "age_days": 25.31 },
"next_new_moon": "2026-10-10T16:51:00+01:00",
"next_full_moon": "2026-10-26T04:11:00+00:00",
"observances": [
{
"type": "ekadashi",
"tithi": { "number": 11, "name": "Ekadashi", "paksha": { "key": "krishna", "name": "Krishna" } },
"date": "2026-10-06",
"sunrise_dates": ["2026-10-06"],
"starts": "2026-10-05T21:38:00+01:00",
"ends": "2026-10-06T20:05:00+01:00",
"month": {
"amanta": { "number": 6, "name": "Bhadrapada", "adhika": false },
"purnimanta": { "number": 7, "name": "Ashvina", "adhika": false }
}
},
{ "type": "amavasya", "date": "2026-10-10", … },
{ "type": "ekadashi", "date": "2026-10-22", … },
{ "type": "purnima", "date": "2026-10-25", … }
],
"mercury_retrograde": {
"active": false,
"current": null,
"next": { "starts": "2026-10-24T08:15:00+01:00", "ends": "2026-11-13T15:53:00+00:00" }
},
"attribution": "…"
}phasenames are in English. Usekeyfor your own labels.observanceslists every Ekadashi, Purnima and Amavasya in the period.startsandendsare when the tithi begins and ends. For Purnima and Amavasya,endsis the moment of the full moon or new moon.dateis the first day on which the tithi is in force at sunrise.sunrise_dateslists all such days. Usually that is one. Sometimes a long tithi covers two sunrises, and traditions then choose by their own rule, for example Smarta and Vaishnava Ekadashi. When a tithi begins and ends between two sunrises, the list is empty anddateis the day it begins. We give you the facts. Your own tradition's rule picks the day.mercury_retrogradesays whether Mercury is moving backwards now, and gives the start and end of this period and of the next.
Birth basics
/api/v1/astrology/birthSun sign, Moon sign and birth nakshatra. Birth details are personal, so they go in the request body and never in the web address.
| Field | What it does |
|---|---|
date | Date of birth, written 1990-05-14. Required |
time | Time of birth on a 24-hour clock, written 06:30. Optional, see below |
lat, lon | Place of birth, as numbers. Required |
timezone | Time zone name. Default: worked out from the place, with its history (daylight saving, old standard times) |
lang | en, ta or hi. Default en |
curl -X POST "https://www.onebhakthi.org/api/v1/astrology/birth" \
-H "X-API-Key: ob_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "date": "1990-05-14", "time": "06:30", "lat": 13.0827, "lon": 80.2707 }'{
"lang": "en",
"birth": { "time_given": true, "timezone": "Asia/Kolkata", "utc_offset": "+05:30" },
"ayanamsha": { "name": "lahiri", "degrees": 23.7225 },
"sun_sign": {
"vedic": { "number": 1, "name": "Mesha", "western": "Aries" },
"western": { "number": 2, "name": "Taurus" }
},
"moon_sign": {
"number": 9, "name": "Dhanu", "western": "Sagittarius",
"ruler": { "key": "jupiter", "name": "Jupiter" }
},
"nakshatra": {
"number": 20, "name": "Purva Ashadha", "pada": 1,
"lord": { "key": "venus", "name": "Venus" }
},
"certain": { "moon_sign": true, "nakshatra": true, "sun_sign": true },
"attribution": "…"
}sun_sign.vedicis the sidereal sign used in Vedic astrology.sun_sign.westernis the usual Western sign.moon_signis the rashi.- The Sanskrit name is in
nameand the matching Western sign is inwestern. - No birth time? The Moon changes sign about every two and a half days, so a date alone is often enough. When it is not, we say so:
certainshows false and the response lists every possibility that day. We never guess quietly. - We use the details to work out the answer and then drop them. They are not stored, not logged, and not repeated in the response, which is never cached.
{
…
"moon_sign": { "number": 4, "name": "Karka", "western": "Cancer", … },
"certain": { "moon_sign": false, "nakshatra": false, "sun_sign": true },
"note": "No birth time was sent, so these are for midday. On this date the answer changes during the day. …",
"possible_moon_signs": [
{ "number": 4, "name": "Karka", "western": "Cancer" },
{ "number": 5, "name": "Simha", "western": "Leo" }
],
"possible_nakshatras": [ { "number": 9, "name": "Ashlesha" }, { "number": 10, "name": "Magha" } ],
"possible_padas": [1, 2, 3, 4]
}Horoscopes
/api/v1/astrology/horoscope?sign=aries&period=daily&lang=en| Parameter | Where | What it does |
|---|---|---|
sign | query | aries to pisces, or the Sanskrit name (mesha, vrishabha…), or 1 to 12, or all for every sign in one call. Required |
period | query | daily or weekly. Default daily |
lang | query | en, ta or hi. Default en |
{
"period": "daily",
"date": "2026-10-06",
"lang": "en",
"basis": "moon_sign",
"audience": "UK",
"ai_generated": true,
"disclaimer": "Written by OneBhakthi AI for guidance and enjoyment. It is not advice. Please do not use it for medical, legal or money decisions.",
"horoscope": {
"sign": {
"number": 1, "name": "Mesha", "western": "Aries",
"ruler": { "key": "mars", "name": "Mars" },
"element": "fire", "modality": "cardinal"
},
"scores": { "energy": "high", "focus": "medium", "mind_clarity": "low" },
"highlight": "…",
"text": "…",
"habit": "…",
"share_text": "…",
"windows": {
"timezone": "Europe/London",
"best": { "start": "12:26", "end": "13:11", "description": "…" },
"caution": { "start": "15:38", "end": "17:02", "description": "…" }
}
}
}- These are the readings OneBhakthi AI writes each morning, UK time. This call only reads what is already written. It never asks an AI to write anything new.
- They are for the Moon sign (rashi), the way Vedic daily readings work, and they are written for a UK audience. The clock times in
windowsare London time. - They are labelled
ai_generatedand come with a disclaimer. Please show both to your users and do not present the readings as written by a person. - Each new set is written just after midnight UTC. Until then you get the previous set, with a
note, anddate(orweek_starts) says which one it is. If nothing at all is stored you get a503with the codereading_not_ready, which is not counted against your limit. - With
sign=allthe answer has ahoroscopeslist instead of a singlehoroscope. Weekly readings carryweek_startsand anoverviewinstead ofdateandwindows.
Accuracy and sources
We checked the work, and we say how.
- Against NASA. We compared 16 tithi change times spread across 2026 with NASA JPL Horizons. The biggest difference was 47 seconds and the middle one 26 seconds. The Sun is within 2 arcseconds.
- Against Drik Panchang. We compared 90 of its daily pages for 16 places between 2024 and 2027: London, Leicester, Chennai, New Delhi, Mumbai, Colombo, Singapore, Kuala Lumpur, Dubai, Nairobi, Johannesburg, Sydney, Auckland, Toronto, New York and Los Angeles. The tithi, nakshatra, yoga and karana at sunrise had the same name every time. Sunrise, sunset, moonrise, moonset, Rahu Kalam, Yamagandam, Gulika Kalam and Abhijit Muhurta agreed to within about a minute. When a tithi, karana or nakshatra changes, ours was on average a minute later (never more than about two), and yoga agreed on average. Published panchangs differ from one another by a minute or two, so allow for that when you compare.
- Lunar months and years. The lunar month, adhika month, Shaka and Vikram year and ayana matched Drik on all 90 days. Over 110 years (1950 to 2059) the month and year sequence stays consistent, and every extra (adhika) month we tested came out right, including 2012, 2015, 2018, 2020, 2023 and 2026. The year changes with the lunar month at sunrise, so on a rare new-year day when Pratipada begins and ends between two sunrises, a published panchang may show the new year one day earlier.
- One difference on purpose. The Vedic ritu follows the Indian lunar calendar. Drik Panchang turns it around for places south of the equator. We do not.
- Not covered. Tamil Nadu's Vakya Panchangam and some printed panchangs use older table-based methods that can differ by much more. Festival dates can differ by a day between traditions. For an observance, please follow your own temple or priest.
- Ayanamsha. The official Lahiri value (23.85706 degrees at 2000). Drik Panchang prints a figure 0.007 degrees higher, a difference of about 40 seconds in Moon timings.
- Built with the open-source Astronomy Engine library by Don Cross (MIT licence), checked against NASA as above.
Coming soon
Pooja API
Pooja guides, steps and the items needed.
Festivals API
Festival dates and what each one is about.
They will use the same key, the same limits and the same sign in. Tell us what you want most on your dashboard.