Astrology API that returns Vedic (kundli, panchang), Western (natal chart), horoscope, tarot and numerology data as JSON. 300+ endpoints, 125+ white-label PDF report types and hosted MCP servers, for developers building astrology apps, sites and AI assistants.
Verified live against the DivineAPI API on 2 October 2026.
This repo is the hub for DivineAPI on GitHub: what the platform covers, one quickstart per language, and which repo to open next.
300+ endpoints across 8 domains. Calculations use Swiss Ephemeris under a commercial licence; Vedic endpoints are sidereal (Lahiri ayanamsa, fixed), Western endpoints are tropical.
| Domain | Size | Examples | Languages | Docs |
|---|---|---|---|---|
| Vedic (Indian) astrology | 140+ endpoints | Kundli, planetary positions, divisional charts, dashas, doshas, yogas, matching, Lal Kitab, panchang, festivals | 8 Indian languages | Indian API |
| Western astrology | 60+ endpoints | Planetary positions, house cusps, aspects, natal wheel chart, synastry, transits | 12 languages (text reports) | Western API |
| Horoscope and tarot | 40+ endpoints | Daily, weekly, monthly and yearly horoscopes, daily tarot, yes or no tarot | 25 languages (translator host) | Horoscope and Tarot API |
| Numerology | 15+ endpoints | Core numbers, Lo Shu grid, name number, mobile number analysis | English only | Numerology API |
| PDF reports | 125+ white-label report types | Kundli, matching, natal, numerology reports with your logo and company details | See docs | PDF Report API · samples |
1. Get credentials. Start the 14-day free trial (credit card required to activate the trial), then copy your API key and auth token from the dashboard.
2. Make a call. Every endpoint is a POST with a multipart/form-data body. Send the auth token as a Bearer header and the API key as the api_key form field. The example below returns Vedic basic details (moon sign, nakshatra, tithi and more) for a birth date, time and place.
Runnable files: examples/ (curl, Python, Node.js, PHP).
curl -s -X POST https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-F api_key=YOUR_API_KEY \
-F full_name="Rahul Kumar" -F gender=male \
-F day=24 -F month=05 -F year=1990 \
-F hour=14 -F min=40 -F sec=0 \
-F place="new delhi" -F lat=28.6139 -F lon=77.2090 -F tzone=5.5import requests
url = "https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details"
headers = {"Authorization": "Bearer YOUR_AUTH_TOKEN"}
fields = {
"api_key": "YOUR_API_KEY",
"full_name": "Rahul Kumar", "gender": "male",
"day": "24", "month": "05", "year": "1990",
"hour": "14", "min": "40", "sec": "0",
"place": "new delhi", "lat": "28.6139", "lon": "77.2090", "tzone": "5.5",
}
# files= sends multipart/form-data, which every DivineAPI endpoint expects
r = requests.post(url, headers=headers, files={k: (None, v) for k, v in fields.items()}, timeout=60)
data = r.json()
if data.get("success") != 1:
raise SystemExit(data)
print(data["data"]["moonsign"], data["data"]["nakshatra"], data["data"]["tithi"])
# Taurus Krittika AmavasyaSave as basic-astro.mjs (top-level await needs an ES module) and run node basic-astro.mjs.
const url = "https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details";
const form = new FormData();
const fields = {
api_key: "YOUR_API_KEY",
full_name: "Rahul Kumar", gender: "male",
day: "24", month: "05", year: "1990",
hour: "14", min: "40", sec: "0",
place: "new delhi", lat: "28.6139", lon: "77.2090", tzone: "5.5",
};
for (const [k, v] of Object.entries(fields)) form.append(k, v);
const res = await fetch(url, {
method: "POST",
headers: { Authorization: "Bearer YOUR_AUTH_TOKEN" },
body: form,
});
const data = await res.json();
if (data.success !== 1) throw new Error(JSON.stringify(data));
console.log(data.data.moonsign, data.data.nakshatra, data.data.tithi);
// Taurus Krittika Amavasya<?php
$url = "https://astroapi-3.divineapi.com/indian-api/v3/basic-astro-details";
$fields = [
"api_key" => "YOUR_API_KEY",
"full_name" => "Rahul Kumar", "gender" => "male",
"day" => "24", "month" => "05", "year" => "1990",
"hour" => "14", "min" => "40", "sec" => "0",
"place" => "new delhi", "lat" => "28.6139", "lon" => "77.2090", "tzone" => "5.5",
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $fields, // an array makes cURL send multipart/form-data
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_AUTH_TOKEN"],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($data["success"] ?? 0) !== 1) {
exit(print_r($data, true));
}
echo $data["data"]["moonsign"], " ", $data["data"]["nakshatra"], " ", $data["data"]["tithi"], PHP_EOL;{
"success": 1,
"data": {
"full_name": "Rahul Kumar",
"place": "new delhi",
"timezone": "5.5",
"sunrise": "1990-05-24 05:25:52",
"sunset": "1990-05-24 19:09:50",
"tithi": "Amavasya",
"paksha": "Krishna",
"sunsign": "Taurus",
"moonsign": "Taurus",
"chandramasa": "Vaishakh",
"nakshatra": "Krittika",
"vaar": "Thursday",
"varna": "Vaishya",
"yoni": "Mesha",
"gana": "Rakshasa",
"nadi": "Anta",
"yoga": "Atiganda",
"karana": "Naga",
"...": "..."
}
}| You want to build | Open |
|---|---|
| Kundli (kundali) app: birth chart, dashas, doshas | kundli-api |
| Kundli matching (gun milan) for a matrimony or wedding app | kundli-matching-api |
| Lal Kitab charts, teva, debts and varshphal | lal-kitab-api |
| Hindu calendar: panchang, muhurat, choghadiya | panchang-api |
| Festival calendar: festival dates by month, sankranti, Tamil and Malayalam calendars | hindu-festival-api |
| Western natal chart: planets, houses, aspects, wheel | birth-chart-api |
| Daily, weekly, monthly, yearly horoscopes in 25 languages | horoscope-api |
| Tarot readings with card images | tarot-api |
| Numerology: core numbers, Lo Shu grid, name and mobile number | numerology-api |
| Typed client instead of raw HTTP | divineapi-python · divineapi-node · divineapi-php |
| Astrology tools inside Claude, Cursor or another AI assistant | mcp-indian-astrology · mcp-western-astrology · mcp-horoscope-numerology |
Same auth and body format everywhere. Each of these calls was run live; the repo linked in the last column has full samples and real responses.
| Domain | Endpoint | Host | Key params | Docs | Repo |
|---|---|---|---|---|---|
| Vedic | /indian-api/v3/basic-astro-details |
astroapi-3 |
birth details (13 fields) | docs | kundli-api |
| Panchang | /indian-api/v2/find-panchang |
astroapi-1 |
day, month, year, lat, lon, tzone |
docs | panchang-api |
| Western | /western-api/v1/planetary-positions |
astroapi-4 |
birth details + house_system (P = Placidus) |
docs | birth-chart-api |
| Horoscope | /api/v5/daily-horoscope |
astroapi-5 |
sign, h_day=today, day, month, year, tzone |
docs | horoscope-api |
| Tarot | /api/v2/daily-tarot |
astroapi-5 |
api_key only |
docs | tarot-api |
| Numerology | /numerology/v1/core-numbers |
astroapi-4 |
full_name, day, month, year, gender, method |
docs | numerology-api |
Hosts are https://<host>.divineapi.com. Use the host shown for each endpoint in the docs; endpoints are not interchangeable between hosts.
| Language | Install | Repo |
|---|---|---|
| Python | pip install divineapi |
divineapi-python |
| Node.js / TypeScript | npm install divineapi |
divineapi-node |
| PHP | composer require divineapi/divineapi |
divineapi-php |
More in the docs: SDKs and libraries.
Hosted Model Context Protocol servers (streamable HTTP). Authenticate with the X-Divine-Api-Key and X-Divine-Auth-Token headers.
| Server | URL | Repo |
|---|---|---|
| Indian / Vedic astrology | https://mcp.divineapi.com/indian/mcp |
mcp-indian-astrology |
| Western astrology | https://mcp.divineapi.com/western/mcp |
mcp-western-astrology |
| Horoscope, tarot and numerology | https://mcp.divineapi.com/horoscope/mcp |
mcp-horoscope-numerology |
Example for Cursor (.cursor/mcp.json):
{
"mcpServers": {
"divineapi-indian": {
"url": "https://mcp.divineapi.com/indian/mcp",
"headers": {
"X-Divine-Api-Key": "YOUR_API_KEY",
"X-Divine-Auth-Token": "YOUR_AUTH_TOKEN"
}
}
}
}Setup for Claude Desktop and VS Code: developers.divineapi.com/mcp.
Set the language with the lan form field (default en). DivineAPI uses its own language codes, not ISO 639-1: send ma for Marathi, tm for Tamil and tl for Telugu (the ISO codes mr and te are rejected, and ta means Filipino, not Tamil).
| Product | Languages | Codes |
|---|---|---|
| Vedic | 8 Indian languages | en English, hi Hindi, bn Bengali, ma Marathi, tm Tamil, tl Telugu, ml Malayalam, kn Kannada |
| Western (text reports) | 12 | en, hi, ja, ru, pt, es, fr, de, it, nl, pl, tr |
| Horoscope and tarot | 25, through the translator host astroapi-5-translator.divineapi.com |
en, hi, zh, ja, ar, ru, pt, es, fr, de, it, nl, pl, tr, uk, hu, gr Greek, bn, ma, tm, tl, ml, kn, ta Filipino, bah Indonesian |
| Numerology | English only | en |
Translator replies can take 25 to 35 seconds, so set your HTTP timeout to at least 60 seconds for those calls.
- Check the body, not only the status. Hosts
astroapi-1toastroapi-5return HTTP 200 even on errors:success: 1is OK,2is a validation error,3is an auth error ({"success":3,"msg":"Invalid authorization token!"}). Hostsastroapi-7,astroapi-8andpdfreturn real 4xx codes withstatus: "error"and anerror_code. tzoneis a decimal offset (5.5for India,-4for New York in summer), not+5:30and not a zone name. It is not adjusted for daylight saving, so send the offset that applied at the birth moment.secis required on birth endpoints. Send0if the second is unknown.placein lowercase (new delhi).latandlondrive the calculation.- Dates are three fields:
day,month,year. - Horoscope periods are keywords:
h_day=today|tomorrow|yesterday, andcurrent|prev|nextfor week, month and year.
Each product has its own plans on divineapi.com: Vedic (Vedic Sampoorna, Vedic Ananta, Vedic Prakash), Western (Western Nova, Western Atlas, Western Lumen), Horoscope (Horoscope Starter, Horoscope Pro), Tarot (Tarot Basic, Tarot Essentials, Tarot Gold) and Numerology (Numerology API), plus single-tool plans and white-label PDF reports. Compare what each plan includes at divineapi.com/pricing.
Is there a free trial? Yes, a 14-day free trial (credit card required to activate the trial): divineapi.com/start-trial. Plans and prices are at divineapi.com/pricing.
Which ayanamsa do the Vedic endpoints use? Lahiri, fixed. Western endpoints are tropical.
Which house systems are available for Western charts?
25 house systems through the house_system field; Placidus (P) is the default.
Can I get the chart as an image? Yes, as SVG and base64. Western has a natal wheel chart endpoint and Vedic has divisional chart endpoints (D1, D9, D10 and more, north or south style); see the Western and Indian docs.
Can I generate branded PDF reports? Yes, 125+ white-label PDF report types with your company name, logo and footer. See real samples and the PDF Report API docs.
Is there a Postman collection or OpenAPI spec? Postman: documenter.getpostman.com/view/26759678/2sBYAysU8Y. OpenAPI and the full reference: developers.divineapi.com.
- Docs: developers.divineapi.com
- Changelog: developers.divineapi.com/changelog
- Status: status.divineapi.com
- Help center: support.divineapi.com
- Website: divineapi.com
Terms of the API service: divineapi.com/terms-service.
Code samples in this repository are released under the MIT License (see LICENSE). The DivineAPI name and logo are trademarks of DivineAPI.
