API reference › KP

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

NameInTypeNotes
number requiredqueryintegerThe number the querent chose, 1–249. ≥ 1 · ≤ 249
datetime requiredquerystring (date-time)The moment, ISO 8601 with a zone (e.g. 2026-10-02T06:00:00Z).
lat requiredquerynumber ≥ -90 · ≤ 90
lon requiredquerynumber ≥ -180 · ≤ 180

Response

JSON { data, meta, warnings }, where data is:

  • number integer required
  • at string (date-time) required
  • division object required
    • start number required
    • end number required
    • sign string required
    • sign_lord string required
    • nakshatra string required
    • star_lord string required
    • sub_lord string required
    • number integer required

      ≥ 1 · ≤ 249

    • midpoint number required

      The longitude the horary chart is cast on (KP-New).

  • ruling_planets object or null required

    One of:

    1. object
      Fields
      • day_lord string required
      • lagna object required
        Fields
        • sign_lord string required
        • star_lord string required
        • sub_lord string required
      • moon object required
        Fields
        • sign_lord string required
        • star_lord string required
        • sub_lord string required
    2. null
  • sub_sub_lord string or null required

    One of:

    1. string
    2. null
  • question_groups array 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

Leave empty to use the shared demo key (limited). Test keys only: never charged. Kept in this browser tab and sent through this site to the API. Create one

More in KP

Get a free API key KP product page