KP Sub Lord Changes API
When each planet changes sign, star lord or sub lord over a range
POST/v1/kp/changes
2 credits · Secret key (test or live) · getKpChanges
Times are UTC, to the minute, on the KP-New ayanamsa our KP chart uses. At most 366 days, or 31 with the Moon.
Request body
fromstring (date) requirede.g.
"1990-08-13"tostring (date) requiredInclusive. At most 366 days after from, or 31 with the Moon.
e.g.
"1990-08-13"planetsarray of string
No other fields are accepted.
Response
JSON { data, meta, warnings }, where data is:
ayanamsastring requiredfromstring (date) requirede.g.
"1990-08-13"tostring (date) requirede.g.
"1990-08-13"countinteger requiredchangesarray of object requiredatstring (date-time) requiredplanetstring requiredchangedarray of string requiredfromobject requiredFields
signstring requiredstar_lordstring requiredsub_lordstring required
toobject requiredFields
signstring requiredstar_lordstring requiredsub_lordstring required
retrogradeboolean required
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl -X POST 'https://api.astrologics.in/v1/kp/changes' \
-H 'Authorization: Bearer al_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"from":"2026-11-01","to":"2026-11-07","planets":["sun","mars"]}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/kp/changes", {
method: "POST",
headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"from": "2026-11-01",
"to": "2026-11-07",
"planets": [
"sun",
"mars"
]
}),
});
console.log(JSON.stringify(await res.json(), null, 2));Python
import json
import urllib.error
import urllib.request
body = {
"from": "2026-11-01",
"to": "2026-11-07",
"planets": [
"sun",
"mars",
],
}
req = urllib.request.Request(
"https://api.astrologics.in/v1/kp/changes",
method="POST",
headers={"Authorization": "Bearer al_test_YOUR_KEY", "Content-Type": "application/json"},
data=json.dumps(body).encode(),
)
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/changes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"from":"2026-11-01","to":"2026-11-07","planets":["sun","mars"]}',
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;Example response
200 OK · 3,525 characters
{
"data": {
"ayanamsa": "kp_new",
"from": "2026-11-01",
"to": "2026-11-07",
"count": 8,
"changes": [
{
"at": "2026-11-01T00:18:00.000Z",
"planet": "sun",
"changed": [
"sub_lord"
],
"from": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "mercury"
},
"to": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "ketu"
},
"retrograde": false
},
{
"at": "2026-11-01T18:58:00.000Z",
"planet": "sun",
"changed": [
"sub_lord"
],
"from": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "ketu"
},
"to": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "venus"
},
"retrograde": false
},
{
"at": "2026-11-04T00:14:00.000Z",
"planet": "sun",
"changed": [
"sub_lord"
],
"from": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "venus"
},
"to": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "sun"
},
"retrograde": false
},
{
"at": "2026-11-04T06:43:00.000Z",
"planet": "mars",
"changed": [
"sub_lord"
],
"from": {
"sign": "cancer",
"star_lord": "mercury",
"sub_lord": "rahu"
},
"to": {
"sign": "cancer",
"star_lord": "mercury",
"sub_lord": "jupiter"
},
"retrograde": false
},
{
"at": "2026-11-04T16:12:00.000Z",
"planet": "sun",
"changed": [
"sub_lord"
],
"from": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "sun"
},
"to": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "moon"
},
"retrograde": false
},
{
"at": "2026-11-05T18:48:00.000Z",
"planet": "sun",
"changed": [
"sub_lord"
],
"from": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "moon"
},
"to": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "mars"
},
"retrograde": false
},
{
"at": "2026-11-06T13:25:00.000Z",
"planet": "sun",
"changed": [
"star_lord",
"sub_lord"
],
"from": {
"sign": "libra",
"star_lord": "rahu",
"sub_lord": "mars"
},
"to": {
"sign": "libra",
"star_lord": "jupiter",
"sub_lord": "jupiter"
},
"retrograde": false
},
{
"at": "2026-11-07T22:30:00.000Z",
"planet": "mars",
"changed": [
"sub_lord"
],
"from": {
"sign": "cancer",
"star_lord": "mercury",
"sub_lord": "jupiter"
},
"to": {
"sign": "cancer",
"star_lord": "mercury",
"sub_lord": "saturn"
},
"retrograde": false
}
]
},
"meta": {
"request_id": "req_example",
"api_version": "v1",
"engine_version": "2026.10.10",
"mode": "live",
"credits_charged": 2
},
"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 Ruling Planets API: The seven KP ruling planets at a moment and place
- KP Horary (Prashna) API: KP horary (prashna) for a number from 1 to 249
- KP Ruling Planet Intervals API: The seven KP ruling planets over a window, as intervals