KP Horary (Prashna) API
KP horary (prashna) for a number from 1 to 249
GET/v1/kp/horary
2 credits · Secret or publishable key · getKpHorary
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
number required | query | integer | The number the querent chose, 1–249. ≥ 1 · ≤ 249 |
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:
numberinteger requiredatstring (date-time) requireddivisionobject requiredstartnumber requiredendnumber requiredsignstring requiredsign_lordstring requirednakshatrastring requiredstar_lordstring requiredsub_lordstring requirednumberinteger required≥ 1 · ≤ 249
midpointnumber requiredThe longitude the horary chart is cast on (KP-New).
ruling_planetsobject or null requiredOne of:
- object
Fields
day_lordstring requiredlagnaobject requiredFields
sign_lordstring requiredstar_lordstring requiredsub_lordstring required
moonobject requiredFields
sign_lordstring requiredstar_lordstring requiredsub_lordstring required
- null
- object
sub_sub_lordstring or null requiredOne of:
- string
- null
question_groupsarray of string required
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl 'https://api.astrologics.in/v1/kp/horary?number=123&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/horary?number=123&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/horary?number=123&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/horary?number=123&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 · 591 characters
{
"data": {
"number": 123,
"at": "2026-10-02T06:00:00.000Z",
"division": {
"start": 176.111111,
"end": 177.888889,
"sign": "virgo",
"sign_lord": "mercury",
"nakshatra": "chitra",
"star_lord": "mars",
"sub_lord": "jupiter",
"number": 123,
"midpoint": 177
},
"ruling_planets": null,
"sub_sub_lord": "venus",
"question_groups": []
},
"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 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