KP Ruling Planets API
The seven KP ruling planets at a moment and place
GET/v1/kp/ruling-planets
1 credit · Secret or publishable key · getKpRulingPlanets
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
datetime required | query | string (date-time) | The moment, ISO 8601 with a zone (e.g. 2026-10-02T06:00:00Z). |
lat required | query | number | ≥ -90 · ≤ 90 |
lon required | query | number | ≥ -180 · ≤ 180 |
Response
JSON { data, meta, warnings }, where data is:
atstring (date-time) requiredday_lordstring requiredlagnaobject requiredsign_lordstring requiredstar_lordstring requiredsub_lordstring required
moonobject requiredsign_lordstring requiredstar_lordstring requiredsub_lordstring required
localobject requireddatestring (date) requirede.g.
"1990-08-13"timestring requiredoffset_hoursnumber required
weekdayobject requirednamestring requiredlordstring required
lagna_signstring or null requiredOne of:
- string
- null
moon_signstring or null requiredOne of:
- string
- null
nakshatraobject or null requiredOne of:
- object
Fields
namestring requiredlordstring requiredpadainteger required≥ 1 · ≤ 4
- null
- object
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl 'https://api.astrologics.in/v1/kp/ruling-planets?datetime=2026-10-02T06:00:00Z&lat=28.6139&lon=77.209' \
-H 'Authorization: Bearer al_test_YOUR_KEY'
Node.js
const res = await fetch("https://api.astrologics.in/v1/kp/ruling-planets?datetime=2026-10-02T06:00:00Z&lat=28.6139&lon=77.209", {
headers: { Authorization: "Bearer al_test_YOUR_KEY" },
});
console.log(JSON.stringify(await res.json(), null, 2));Python
import json
import urllib.error
import urllib.request
req = urllib.request.Request(
"https://api.astrologics.in/v1/kp/ruling-planets?datetime=2026-10-02T06:00:00Z&lat=28.6139&lon=77.209",
method="GET",
headers={"Authorization": "Bearer al_test_YOUR_KEY"},
)
try:
with urllib.request.urlopen(req) as res:
print(json.dumps(json.load(res), indent=2, ensure_ascii=False))
except urllib.error.HTTPError as err:
print(err.code, err.read().decode())PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/kp/ruling-planets?datetime=2026-10-02T06:00:00Z&lat=28.6139&lon=77.209');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY'],
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;Example response
200 OK · 779 characters
{
"data": {
"at": "2026-10-02T06:00:00.000Z",
"day_lord": "venus",
"lagna": {
"sign_lord": "mars",
"star_lord": "mercury",
"sub_lord": "sun"
},
"moon": {
"sign_lord": "venus",
"star_lord": "mars",
"sub_lord": "jupiter"
},
"local": {
"date": "2026-10-02",
"time": "11:30",
"offset_hours": 5.5
},
"weekday": {
"name": "friday",
"lord": "venus"
},
"lagna_sign": "scorpio",
"moon_sign": "taurus",
"nakshatra": {
"name": "mrigashira",
"lord": "mars",
"pada": 2
}
},
"meta": {
"request_id": "req_example",
"api_version": "v1",
"engine_version": "2026.10.10",
"mode": "live",
"credits_charged": 1
},
"warnings": []
}Try it
More in KP
- KP Chart API (Star, Sub and Sub-Sub Lords): KP chart: cusps and planets with star, sub and sub-sub lords
- KP Significators API: KP 4-step significators and house groups
- KP Horary (Prashna) API: KP horary (prashna) for a number from 1 to 249
- KP Sub Lord Changes API: When each planet changes sign, star lord or sub lord over a range
- KP Ruling Planet Intervals API: The seven KP ruling planets over a window, as intervals