The Lal Kitab API returns Lal Kitab astrology for a birth date, time and place as JSON. It covers planetary positions, the Lal Kitab chart (SVG), house table, conjunctions, teva, planet types, ancestral debts (rin) with remedies, Lal Kitab dasha and the annual varshphal, in 8 Indian languages.
Verified live against the DivineAPI API on 2 October 2026.
Lal Kitab ("red book") is a school of Vedic astrology known for its own house rules and simple remedies. This repo is the developer quickstart for DivineAPI's 16 Lal Kitab endpoints, which are part of the Vedic API (140+ endpoints). Samples and responses were verified live on 2 Oct 2026.
1. Get your keys. Start the 14-day free trial (credit card required to activate the trial), then copy your API key and auth token from the dashboard.
Every request is a POST with multipart/form-data, and needs both:
- header
Authorization: Bearer YOUR_AUTH_TOKEN - form field
api_key=YOUR_API_KEY
2. curl: Lal Kitab planetary positions
curl -s -X POST "https://astroapi-3.divineapi.com/indian-api/v1/lal-kitab/planetary-positions" \
-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.5" \
-F "lan=en"3. Python (requests)
import requests
URL = "https://astroapi-3.divineapi.com/indian-api/v1/lal-kitab/planetary-positions"
AUTH_TOKEN = "YOUR_AUTH_TOKEN"
API_KEY = "YOUR_API_KEY"
fields = {
"api_key": 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",
"lan": "en",
}
resp = requests.post(
URL,
headers={"Authorization": f"Bearer {AUTH_TOKEN}"},
files={k: (None, v) for k, v in fields.items()}, # multipart/form-data
timeout=60,
)
body = resp.json()
if body.get("success") != 1: # legacy hosts return HTTP 200 even on errors
raise SystemExit(f"API error: {body.get('msg')}")
for p in body["data"]["planet_data"]:
print(f'{p["planet"]:<8} house {p["sign_no"]:<3} {p["position"]:<14} {p["benefic_malefic"]}')Output (real run):
Sun house 9 Friendly Sign Benefic
Moon house 9 Normal Benefic
Mars house 7 Normal Malefic
Mercury house 8 Normal Benefic
Venus house 7 Own Benefic
Jupiter house 10 Debilitated Malefic
Saturn house 5 Enemy Sign Malefic
Rahu house 5 Enemy Sign Malefic
Ketu house 11 Friendly Sign Benefic
Node.js (18+, built-in fetch)
const URL = "https://astroapi-3.divineapi.com/indian-api/v1/lal-kitab/planetary-positions";
const AUTH_TOKEN = "YOUR_AUTH_TOKEN";
const API_KEY = "YOUR_API_KEY";
const fields = {
api_key: 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",
lan: "en",
};
const form = new FormData();
for (const [k, v] of Object.entries(fields)) form.append(k, v);
const res = await fetch(URL, {
method: "POST",
headers: { Authorization: `Bearer ${AUTH_TOKEN}` },
body: form,
});
const body = await res.json();
if (body.success !== 1) throw new Error(`API error: ${JSON.stringify(body.msg)}`);
for (const p of body.data.planet_data) {
console.log(p.planet.padEnd(8), `house ${p.sign_no}`.padEnd(9), p.position.padEnd(14), p.benefic_malefic);
}Save it as lal-kitab.mjs and run node lal-kitab.mjs (top-level await needs an ES module).
4. PHP (cURL)
<?php
$ch = curl_init("https://astroapi-3.divineapi.com/indian-api/v1/lal-kitab/planetary-positions");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_AUTH_TOKEN"],
// An array (not a query string) makes cURL send multipart/form-data
CURLOPT_POSTFIELDS => [
"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",
"lan" => "en",
],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($body["success"] ?? 0) !== 1) {
exit("API error: " . json_encode($body["msg"] ?? $body));
}
foreach ($body["data"]["planet_data"] as $p) {
echo "{$p['planet']} house {$p['sign_no']} {$p['position']} {$p['benefic_malefic']}" . PHP_EOL;
}Runnable copies that read your credentials from environment variables are in examples/ (curl, Python, Node.js and PHP, with a .env.example).
Prefer a client library? pip install divineapi, npm install divineapi or composer require divineapi/divineapi (see SDKs and MCP).
Lal Kitab planetary positions, live response (2 Oct 2026, trimmed). soya marks a sleeping planet and kismat_jaganewala a planet that awakens fortune.
{
"success": 1,
"data": {
"planet_data": [
{
"planet": "Sun",
"sign": "Sagittarius",
"sign_no": 9,
"position": "Friendly Sign",
"soya": "Yes",
"kismat_jaganewala": "No",
"retro": "No",
"benefic_malefic": "Benefic"
},
{
"planet": "Venus",
"sign": "Libra",
"sign_no": 7,
"position": "Own",
"soya": "No",
"kismat_jaganewala": "Yes",
"retro": "No",
"benefic_malefic": "Benefic"
},
{
"planet": "Jupiter",
"sign": "Capricorn",
"sign_no": 10,
"position": "Debilitated",
"soya": "Yes",
"kismat_jaganewala": "Yes",
"retro": "No",
"benefic_malefic": "Malefic"
},
"..."
]
}
}Lal Kitab debts (/indian-api/v1/lal-kitab/debts) for the same birth, live response (trimmed). Each debt has is_valid, the afflicted planet, the conditions that matched and a list of remedies:
{
"success": 1,
"data": {
"debts": {
"pitru_rin": {
"name": "Pitru Rin",
"english_name": "Ancestral / Father's Debt",
"afflicted_planet": "Jupiter",
"is_valid": true,
"conclusion": "Your horoscope is afflicted with Pitru Rin (Debt of Ancestors).",
"matched_conditions": [
"Rahu/Ketu in H5 and Sun not in H1/H11",
"Sun/Moon/Mars in H7/H10 and Saturn not in H3/H4"
],
"karmic_meaning": "Unresolved karma or unfulfilled duties of ancestors (especially paternal), such as not performing Shraddha and other death rituals.",
"remedies": [
"Collect money from each family member and donate in a temple or serve in the temple.",
"Plant a Peepal tree or take care of one.",
"..."
],
"...": "..."
},
"matru_rin": {
"name": "Matru Rin",
"english_name": "Mother's Debt",
"afflicted_planet": "Moon",
"is_valid": false,
"conclusion": "Your horoscope is free of Matru Rin (Debt of Mother).",
"remedies": [],
"...": "..."
},
"...": "..."
}
}
}- A Lal Kitab kundli page: the chart as SVG, the planet table and the house table (pakka ghar, kismat, exalted and debilitated planets).
- A remedies feature: ancestral debts (rin) found in a chart, each with its list of Lal Kitab remedies.
- An annual (varshphal) forecast: varsha pravesh, year lord, muntha and the varshphal chart for any year.
- A Lal Kitab dasha timeline with general mahadasha and antardasha readings.
- A Hindi, Bengali, Marathi, Tamil, Telugu, Malayalam or Kannada version of any of the above with the
lanfield.
All Lal Kitab endpoints are on https://astroapi-3.divineapi.com. Each one returned success: 1 in a live test on 2 Oct 2026.
These take the standard birth fields (see Parameters).
| What it returns | Path | Docs |
|---|---|---|
| Planetary positions (sign, position, soya, benefic or malefic) | /indian-api/v1/lal-kitab/planetary-positions |
docs |
Lal Kitab chart (svg, base64_image) |
/indian-api/v1/lal-kitab/horoscope-chart |
docs |
| House table (malik, pakka ghar, kismat, soya, exalted, debilitated) | /indian-api/v1/lal-kitab/house-position |
docs |
| Conjunctions with their house, sign and reading | /indian-api/v1/lal-kitab/conjunctions |
docs |
| Teva (chart conditions) with the matched ones | /indian-api/v1/lal-kitab/teva |
docs |
| Planet types (kayam grah and others) with reasons | /indian-api/v1/lal-kitab/planet-types |
docs |
Analysis of one planet (analysis_planet, for example jupiter) |
/indian-api/v1/lal-kitab/planet-analysis |
docs |
What one house signifies (house_no, 1 to 12) |
/indian-api/v1/lal-kitab/house-signification |
docs |
| Ancestral debts (rin) with remedies | /indian-api/v1/lal-kitab/debts |
docs |
| What it returns | Path | Docs |
|---|---|---|
| Lal Kitab dasha timeline with antardashas | /indian-api/v1/lal-kitab/dasha |
docs |
General reading for a mahadasha (maha_dasha only, no birth data) |
/indian-api/v1/lal-kitab/mahadasha-content |
docs |
General reading for a mahadasha and antardasha (maha_dasha, antar_dasha, no birth data) |
/indian-api/v1/lal-kitab/antardasha-content |
docs |
These take the birth fields plus varshphal_year (for example 2026). See the varshphal docs.
| What it returns | Path | Docs |
|---|---|---|
| Varsha pravesh (start of the year), weekday, varshesh (year lord), age | /indian-api/v1/lal-kitab/varshphal/varsha-pravesh |
docs |
| Planetary positions in the annual chart | /indian-api/v1/lal-kitab/varshphal/planetary-positions |
docs |
Muntha house, sign, lord, is_auspicious and effects |
/indian-api/v1/lal-kitab/varshphal/muntha |
docs |
Varshphal chart (svg, base64_image) |
/indian-api/v1/lal-kitab/varshphal/chart |
docs |
Live varsha pravesh response for varshphal_year=2026 (complete):
{ "varshphal_year": 2026, "age": 36, "varsha_pravesh": "2026-05-24 20:10:00", "weekday": "Sunday", "varshesh": "Sun" }The standard birth fields:
| Field | Example | Notes |
|---|---|---|
api_key |
YOUR_API_KEY |
Form field, sent on every request (plus the Bearer header) |
full_name |
Rahul Kumar |
|
gender |
male |
|
day, month, year |
24, 05, 1990 |
Separate fields, not one date string |
hour, min, sec |
14, 40, 0 |
24-hour clock. sec is required: send 0 if unknown |
place |
new delhi |
Lowercase city string |
lat, lon |
28.6139, 77.2090 |
Decimal degrees |
tzone |
5.5 |
Decimal UTC offset (5.5 = IST). Never +5:30 or a zone name |
lan |
en |
Optional, default en. See Languages |
- Check
success, not the HTTP status.astroapi-3always returns HTTP 200.success: 1= OK,success: 2= validation error,success: 3= auth error; the reason is inmsg. sign_nois the house number. Lal Kitab fixes Aries in house 1, so in these responsessign_noequals the house (Jupiter:signCapricorn,sign_no10, andplanet-analysisreturnshouse: 10).- Yes/No values are strings (
"Yes","No") insoya,kismat_jaganewalaandretro. Indebts,is_validis a JSON boolean. - Long readings are structured:
teva,conjunctions,planet-analysis,house-significationand the two dasha content endpoints return their text askey_areaslists (each item has atitleand acontent), not as one long string. - Sidereal, Lahiri ayanamsa (fixed). There is no parameter to change it.
- Engine: astronomical positions come from Swiss Ephemeris, used under a commercial licence.
Set lan to one of DivineAPI's 8 Vedic language codes. DivineAPI uses its own codes, not ISO 639-1.
| Language | lan |
|---|---|
| English | en |
| Hindi | hi |
| Bengali | bn |
| Marathi | ma |
| Tamil | tm |
| Telugu | tl |
| Malayalam | ml |
| Kannada | kn |
With lan=hi the planetary positions call returns (real response, trimmed):
{ "planet": "रवि", "sign": "धनु", "sign_no": 9, "position": "मित्र राशि", "soya": "हाँ", "kismat_jaganewala": "नहीं", "retro": "नहीं", "benefic_malefic": "शुभ" }| Install / URL | |
|---|---|
| Python SDK | pip install divineapi (divineapi-python) |
| Node SDK | npm install divineapi (divineapi-node) |
| PHP SDK | composer require divineapi/divineapi (divineapi-php) |
| Model Context Protocol (MCP) server (Indian / Vedic) | https://mcp.divineapi.com/indian/mcp (setup, mcp-indian-astrology) |
The MCP server lets Claude, Cursor and other MCP clients call the kundli, panchang, dasha, dosha, Lal Kitab and matching tools directly.
Part of the Vedic plans; Lal Kitab is in Vedic Prakash. Compare plans at divineapi.com/pricing.
Does the Lal Kitab API return remedies?
Yes, with the ancestral debts. /indian-api/v1/lal-kitab/debts lists each debt (rin) with is_valid, the afflicted planet, the matched conditions and a remedies list; debts that are not present come back with is_valid: false and an empty list.
Can I get the Lal Kitab chart as an image?
Yes. /indian-api/v1/lal-kitab/horoscope-chart returns svg markup and base64_image, and /indian-api/v1/lal-kitab/varshphal/chart does the same for an annual chart.
How do I get the Lal Kitab varshphal for a year?
Add varshphal_year (for example 2026) to the birth fields and call the four varshphal/ endpoints: varsha pravesh, planetary positions, muntha and chart.
Do I need birth details for the dasha readings?
For the timeline (/lal-kitab/dasha), yes. The general readings (mahadasha-content, antardasha-content) need only maha_dasha (and antar_dasha), for example saturn and mercury.
Which languages are supported?
English and 7 Indian languages: Hindi, Bengali, Marathi, Tamil, Telugu, Malayalam and Kannada, with DivineAPI's own codes (en, hi, bn, ma, tm, tl, ml, kn).
Is there a free trial, and what does it cost? There is a 14-day free trial (credit card required to activate the trial) at divineapi.com/start-trial. Plans and prices are at divineapi.com/pricing.
| Repo | What it covers |
|---|---|
| kundli-api | Vedic birth chart (kundli): planets, divisional charts, dashas, doshas, yogas |
| kundli-matching-api | Kundli matching (gun milan): Ashtakoot, Dashakoot, Manglik for two charts |
| panchang-api | Daily panchang, choghadiya, auspicious timings, muhurat |
| astrology-api | Overview of all DivineAPI products (300+ endpoints) |
| mcp-indian-astrology | Vedic MCP server, including the Lal Kitab tools |
- Docs: developers.divineapi.com/indian-api/lal-kitab-api
- Vedic API overview: divineapi.com/indian-astrology/vedic-astrology-api
- Postman collection: documenter.getpostman.com/view/26759678/2sBYAysU8Y
- API status: status.divineapi.com
- Help centre: support.divineapi.com
DivineAPI was founded in 2021 in New Delhi, India, and is used by 600+ businesses.
Code samples in this repo are released under the MIT License. The DivineAPI name and logo belong to DivineAPI. Terms of the API service: divineapi.com/terms-service.
