New Numerology API
Docs menu
Download

KP astrology API reference

Updated

The KP endpoint of API for Astrology (apiforastrology.com), POST /v1/kp, reads a chart the KP (Krishnamurti Paddhati) way. You send a birth date, time and place. You get Placidus house cusps and the sign, star and sub lords of every planet and cusp. Each house also lists its significators (the planets that give its results).

POST /v1/kp always uses the Krishnamurti ayanamsa, whatever you send in ayanamsa. The ayanamsa guide shows how far it sits from Lahiri on a real chart. A sub lord rules one of the nine parts of a nakshatra. KP reads it as the deciding factor. The house numbers come from Placidus cusps, so do not mix them with house numbers from other endpoints. The endpoint refuses places beyond 66 degrees north or south. Always send hour and minute: they are optional, and they default to 0 (midnight).

Krishnamurti Paddhati (KP) is a school of its own. It uses its own ayanamsa (the starting point of the zodiac) and Placidus house cusps (the points where houses begin). Each planet and cusp gets its sign, star and sub lords, and each house gets its significators (the planets that deliver its results). KP is the only part of this API that uses Placidus cusps. Everywhere else houses are whole signs.

1 endpoint. Paths are relative to https://apiforastrology.com/api/astrology. Send your API key in the Authorization: Bearer header (see authentication). No key yet? Get a key. To send test requests from the browser, open the interactive reference.

Overview: Kundli and birth charts.

Krishnamurti Paddhati: cusps, sub lords, significators

POST /v1/kp

Returns the birth chart as Krishnamurti Paddhati (KP) reads it. KP uses its own ayanamsa (the Krishnamurti value, about 6 arcminutes below Lahiri) and Placidus house cusps. The ayanamsa field in the request is ignored here, and the response names the ayanamsa it used.

Placidus is used here only. KP is defined on Placidus cusps, so this endpoint uses them. Every other endpoint keeps whole-sign houses, and a house number here is not a house number anywhere else.

Sub lords. Each nakshatra (one of 27 lunar mansions) is divided into nine subs. Their sizes follow the Vimshottari dasha years, starting from the nakshatra's own lord. Six subs cross a sign boundary, so the zodiac holds 249 pieces, numbered in sub_number. The service checks on every start that they cover the zodiac exactly. Each sub is divided the same way again for the sub-sub lord.

Houses and significators. A planet is in the house from its cusp up to the next cusp. For each house, significators.by_house gives the four KP levels, strongest first. First come planets in the star of an occupant (a planet in the house), then the occupants. Then come planets in the star of the cusp lord (the lord of the sign on the cusp), and last the cusp lord. by_planet gives the same thing from each planet's side. The levels are not scored.

Ruling planets are for the birth moment. They are the day lord (the day runs sunrise to sunrise) and the sign, star and sub lords of the ascendant and the Moon. For ruling planets at the time a question is asked, use POST /v1/prashna/kp.

Part of Fortune. part_of_fortune is ascendant + Moon - Sun, with its sign, star, sub and sub-sub lords and its KP house. KP uses this one formula for day and night births. Some other schools reverse it at night (ascendant + Sun - Moon). For a night birth that point is given in other_formula and sources_agree is false. It is not used, and the Part of Fortune is not counted as a significator. See not_computed and rulebook section KP (the API's rule reference).

Cost: Each successful request counts as 1 call toward your monthly calls.

Required inputs

NameInWhat it is
yearbodyYear of birth, from 1850 to 2149 (the range the planetary data covers).
monthbodyMonth of birth, from 1 (January) to 12 (December).
daybodyDay of the month, from 1 to 31.
latitudebodyLatitude of the birth place in degrees, negative for south. Text in a local number format, such as "40,7128", is also accepted.
longitudebodyLongitude of the birth place in degrees east of Greenwich, negative for west, so places in the Americas are negative. Text in a local number format is also accepted.
timezonebodyTime zone of the birth place. Either an IANA time zone name, such as America/New_York, America/Chicago or Europe/London. Or a fixed offset from UTC in hours, such as -5 or 5.5.
Optional inputs (7), with their defaults
NameInWhat it does
langqueryLanguage for the names in the response, such as planets, signs, nakshatras (lunar mansions), tithis (lunar days), months and festivals. The default is en (English); GET /v1/meta lists the others. Each translated value comes with its English original in a matching <field>_en field; use the English value as a key in your code. Codes (such as result or kaal) and object keys always stay in English. Any name not yet translated stays in English and is listed in localization.untranslated.
hourbodyHour of birth on the local clock at the birth place, from 0 to 23 (24-hour clock). Default 0.
minutebodyMinute of birth, from 0 to 59. Default 0.
secondbodySecond of birth, from 0 to 59. Default 0.
timezone_foldbodyOnly needed for a local time that happens twice, on the night the clocks go back. In the US since 2007, that is 1:00 to 1:59 AM on the first Sunday in November. 0 picks the first occurrence (before the change) and 1 the second. Without it, such a time is rejected, not guessed. A wrong guess would quietly move the chart by an hour. A local time that never happens, because the clocks jumped forward over it, is also rejected; check the birth time, or send the UTC offset that was in force.
ayanamsabodyThe ayanamsa: the offset between the tropical zodiac (used in Western astrology) and the sidereal zodiac (used in Vedic astrology). lahiri (the default) is the Lahiri, or Chitrapaksha, ayanamsa used by the Government of India. kp is the Krishnamurti ayanamsa used in KP astrology, about 6 arcminutes less. raman is B. V. Raman's, about 1 degree 27 arcminutes less. Also: yukteshwar (Sri Yukteshwar's, about 1 degree 23 arcminutes less), jn_bhasin (J. N. Bhasin's, about 1 degree 6 arcminutes less), ushashashi (about 3 degrees 48 arcminutes less) and fagan_bradley (the Western sidereal zodiac, about 53 arcminutes more). true_chitra keeps the star Spica (Chitra) at exactly 180 degrees, so it follows the star itself; it is within about a minute of arc of Lahiri. The chosen ayanamsa is also used for the transits, sade sati and forecasts read against this chart.
nodebodyHow to calculate Rahu and Ketu, the lunar nodes (the two points where the Moon's orbit crosses the Sun's path). Use true for the actual position (the default) or mean for the averaged position.

Main response fields

  • ayanamsa (object): holds name, value, degree_dms, lahiri_minus_kp.
  • house_system (string)
  • cusps (array of objects): each item holds cusp, longitude, degree_in_sign, degree_dms, sign, sign_number, sign_lord, nakshatra, star_lord, sub_lord, sub_sub_lord, sub_number.
  • planets (array of objects): each item holds graha, longitude, degree_in_sign, degree_dms, sign, sign_number, sign_lord, nakshatra, star_lord, sub_lord, sub_sub_lord, sub_number.
  • significators (object): holds by_house, by_planet, levels.
  • ruling_planets (object): holds day_lord, lagna_sign_lord, lagna_star_lord, lagna_sub_lord, moon_sign_lord, moon_star_lord, moon_sub_lord, grahas, for, at.
  • part_of_fortune (object): holds point, longitude, degree_in_sign, degree_dms, sign, sign_number, sign_lord, nakshatra, star_lord, sub_lord, sub_sub_lord, sub_number.
  • not_computed (object): holds significator_grading, node_agency, ruling_planets_now, horary_numbers.
  • meta (object): holds ayanamsa, ayanamsa_value, julian_day, ephemeris, node, timezone.
# John Doe, born Aug 15, 1990, 10:30 AM, New York
curl -X POST "https://apiforastrology.com/api/astrology/v1/kp" \
  -H "Authorization: Bearer $ASTROLOGY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":1990,"month":8,"day":15,"hour":10,"minute":30,"second":0,"latitude":40.7128,"longitude":-74.006,"timezone":"America/New_York"}'
Sample response
{
  "ayanamsa": {
    "name": "Krishnamurti (KP)",
    "value": 23.6292203,
    "degree_dms": "23 : 37 : 45",
    "lahiri_minus_kp": 0.0968524
  },
  "house_system": "Placidus",
  "cusps": [
    {
      "cusp": 1,
      "longitude": 170.0310074,
      "degree_in_sign": 20.0310074,
      "degree_dms": "20 : 01 : 52",
      "sign": "Virgo",
      "sign_number": 6,
      "sign_lord": "Mercury",
      "nakshatra": "Hast",
      "star_lord": "Moon",
      "sub_lord": "Ketu",
      "sub_sub_lord": "Rahu",
      "sub_number": 118
    },
    {
      "cusp": 2,
      "longitude": 197.1046796,
      "degree_in_sign": 17.1046796,
      "degree_dms": "17 : 06 : 17",
      "sign": "Libra",
      "sign_number": 7,
      "sign_lord": "Venus",
      "nakshatra": "Swati",
      "star_lord": "Rahu",
      "sub_lord": "Venus",
      "sub_sub_lord": "Mercury",
      "sub_number": 135
    },
    {
      "cusp": 3,
      "longitude": 228.2508656,
      "degree_in_sign": 18.2508656,
      "degree_dms": "18 : 15 : 03",
      "sign": "Scorpio",
      "sign_number": 8,
      "sign_lord": "Mars",
      "nakshatra": "Jyeshtha",
      "star_lord": "Mercury",
      "sub_lord": "Mercury",
      "sub_sub_lord": "Jupiter",
      "sub_number": 158
    }
  ],
  "planets": [
    {
      "graha": "Sun",
      "longitude": 118.8721933,
      "degree_in_sign": 28.8721933,
      "degree_dms": "28 : 52 : 20",
      "sign": "Cancer",
      "sign_number": 4,
      "sign_lord": "Moon",
      "nakshatra": "Ashlesha",
      "star_lord": "Mercury",
      "sub_lord": "Saturn",
      "sub_sub_lord": "Venus",
      "sub_number": 83,
      "house": 11,
      "retrograde": false
    },
    {
      "graha": "Moon",
      "longitude": 54.6718876,
      "degree_in_sign": 24.6718876,
      "degree_dms": "24 : 40 : 19",
      "sign": "Taurus",
      "sign_number": 2,
      "sign_lord": "Venus",
      "nakshatra": "Mrigashira",
      "star_lord": "Mars",
      "sub_lord": "Rahu",
      "sub_sub_lord": "Jupiter",
      "sub_number": 39,
      "house": 9,
      "retrograde": false
    },
    {
      "graha": "Mars",
      "longitude": 27.8117852,
      "degree_in_sign": 27.8117852,
      "degree_dms": "27 : 48 : 42",
      "sign": "Aries",
      "sign_number": 1,
      "sign_lord": "Mars",
      "nakshatra": "Krittika",
      "star_lord": "Sun",
      "sub_lord": "Moon",
      "sub_sub_lord": "Saturn",
      "sub_number": 20,
      "house": 8,
      "retrograde": false
    }
  ],
  "significators": {
    "by_house": {
      "1": {
        "in_star_of_occupants": [],
        "occupants": [],
        "in_star_of_cusp_lord": [
          "Sun"
        ],
        "cusp_lord": "Mercury"
      },
      "2": {
        "in_star_of_occupants": [],
        "occupants": [],
        "in_star_of_cusp_lord": [
          "Mercury",
          "Saturn"
        ],
        "cusp_lord": "Venus"
      },
      "3": {
        "in_star_of_occupants": [],
        "occupants": [],
        "in_star_of_cusp_lord": [
          "Moon"
        ],
        "cusp_lord": "Mars"
      },
      "4": {
        "in_star_of_occupants": [
          "Jupiter",
          "Venus",
          "Ketu"
        ],
        "occupants": [
          "Saturn",
          "Rahu"
        ],
        "in_star_of_cusp_lord": [],
        "cusp_lord": "Jupiter"
      },
      "5": {
        "in_star_of_occupants": [],
        "occupants": [],
        "in_star_of_cusp_lord": [
          "Jupiter",
          "Venus",
          "Ketu"
        ],
        "cusp_lord": "Saturn"
      },
      "6": {
        "in_star_of_occupants": [],
        "occupants": [],
        "in_star_of_cusp_lord": [
          "Jupiter",
          "Venus",
          "Ketu"
        ],
        "cusp_lord": "Saturn"
      },
      "7": {
        "in_star_of_occupants": [],
        "occupants": [],
        "in_star_of_cusp_lord": [],
        "cusp_lord": "Jupiter"
      },
      "8": {
        "in_star_of_occupants": [
          "Moon"
        ],
        "occupants": [
          "Mars"
        ],
        "in_star_of_cusp_lord": [
          "Moon"
        ],
        "cusp_lord": "Mars"
      },
      "9": {
        "in_star_of_occupants": [
          "Rahu"
        ],
        "occupants": [
          "Moon"
        ],
        "in_star_of_cusp_lord": [
          "Mercury",
          "Saturn"
        ],
        "cusp_lord": "Venus"
      },
      "10": {
        "in_star_of_occupants": [
          "Mercury",
          "Saturn"
        ],
        "occupants": [
          "Jupiter",
          "Venus",
          "Ketu"
        ],
        "in_star_of_cusp_lord": [
          "Sun"
        ],
        "cusp_lord": "Mercury"
      },
      "11": {
        "in_star_of_occupants": [
          "Mars"
        ],
        "occupants": [
          "Sun"
        ],
        "in_star_of_cusp_lord": [
          "Rahu"
        ],
        "cusp_lord": "Moon"
      },
      "12": {
        "in_star_of_occupants": [
          "Sun"
        ],
        "occupants": [
          "Mercury"
        ],
        "in_star_of_cusp_lord": [
          "Mars"
        ],
        "cusp_lord": "Sun"
      }
    },
    "by_planet": {
      "Sun": {
        "in_star_of_occupants": [
          12
        ],
        "occupants": [
          11
        ],
        "in_star_of_cusp_lord": [
          1,
          10
        ],
        "cusp_lord": [
          12
        ],
        "all": [
          1,
          10,
          11
        ]
      },
      "Moon": {
        "in_star_of_occupants": [
          8
        ],
        "occupants": [
          9
        ],
        "in_star_of_cusp_lord": [
          3,
          8
        ],
        "cusp_lord": [
          11
        ],
        "all": [
          3,
          8,
          9
        ]
      },
      "Mars": {
        "in_star_of_occupants": [
          11
        ],
        "occupants": [
          8
        ],
        "in_star_of_cusp_lord": [
          12
        ],
        "cusp_lord": [
          3,
          8
        ],
        "all": [
          3,
          8,
          11
        ]
      },
      "Mercury": {
        "in_star_of_occupants": [
          10
        ],
        "occupants": [
          12
        ],
        "in_star_of_cusp_lord": [
          2,
          9
        ],
        "cusp_lord": [
          1,
          10
        ],
        "all": [
          1,
          2,
          9
        ]
      },
      "Jupiter": {
        "in_star_of_occupants": [
          4
        ],
        "occupants": [
          10
        ],
        "in_star_of_cusp_lord": [
          5,
          6
        ],
        "cusp_lord": [
          4,
          7
        ],
        "all": [
          4,
          5,
          6
        ]
      },
      "Venus": {
        "in_star_of_occupants": [
          4
        ],
        "occupants": [
          10
        ],
        "in_star_of_cusp_lord": [
          5,
          6
        ],
        "cusp_lord": [
          2,
          9
        ],
        "all": [
          2,
          4,
          5
        ]
      },
      "Saturn": {
        "in_star_of_occupants": [
          10
        ],
        "occupants": [
          4
        ],
        "in_star_of_cusp_lord": [
          2,
          9
        ],
        "cusp_lord": [
          5,
          6
        ],
        "all": [
          2,
          4,
          5
        ]
      },
      "Rahu": {
        "in_star_of_occupants": [
          9
        ],
        "occupants": [
          4
        ],
        "in_star_of_cusp_lord": [
          11
        ],
        "cusp_lord": [],
        "all": [
          4,
          9,
          11
        ]
      },
      "Ketu": {
        "in_star_of_occupants": [
          4
        ],
        "occupants": [
          10
        ],
        "in_star_of_cusp_lord": [
          5,
          6
        ],
        "cusp_lord": [],
        "all": [
          4,
          5,
          6
        ]
      }
    },
    "levels": [
      "in_star_of_occupants",
      "occupants",
      "in_star_of_cusp_lord"
    ]
  },
  "ruling_planets": {
    "day_lord": "Mercury",
    "lagna_sign_lord": "Mercury",
    "lagna_star_lord": "Moon",
    "lagna_sub_lord": "Ketu",
    "moon_sign_lord": "Venus",
    "moon_star_lord": "Mars",
    "moon_sub_lord": "Rahu",
    "grahas": [
      "Mercury",
      "Moon",
      "Ketu"
    ],
    "for": "birth moment",
    "at": "1990-08-15T10:30:00"
  },
  "part_of_fortune": {
    "point": "part_of_fortune",
    "longitude": 105.8307017,
    "degree_in_sign": 15.8307017,
    "degree_dms": "15 : 49 : 51",
    "sign": "Cancer",
    "sign_number": 4,
    "sign_lord": "Moon",
    "nakshatra": "Pushya",
    "star_lord": "Saturn",
    "sub_lord": "Jupiter",
    "sub_sub_lord": "Venus",
    "sub_number": 74,
    "house": 10,
    "formula": "ascendant + moon - sun",
    "sun_above_horizon": true,
    "sources_agree": true,
    "other_formula": {
      "formula": "ascendant + sun - moon",
      "used_by": "Western and Tajik practice, for night births only",
      "applies_here": false
    }
  },
  "not_computed": {
    "significator_grading": "KP software often grades each house a planet signifies from \"very strong\" to \"weak\". The weights behind those grades differ between programs and none comes from Krishnamurti, so the four levels are returned as lists and not scored.",
    "node_agency": "In KP, Rahu and Ketu also give the results of the sign lord and of planets joined with or aspecting them. Sources differ on which associations count, so the nodes are listed only where they themselves occupy a house or sit in a star.",
    "ruling_planets_now": "The ruling planets here are for the birth moment only. For the moment a question is asked, use `POST /v1/prashna/kp`.",
    "horary_numbers": "This route takes no horary number (a number from 1 to 249 chosen by the person asking). `sub_number` only says which of the 249 pieces a point falls in. For a horary number, use `POST /v1/prashna/kp`."
  },
  "meta": {
    "ayanamsa": "krishnamurti",
    "ayanamsa_value": 23.6292203,
    "julian_day": 2448119.10483,
    "ephemeris": "JPL DE440s",
    "node": "true",
    "timezone": {
      "source": "zone",
      "offset_hours": -4,
      "zone": "America/New_York",
      "abbreviation": "EDT",
      "dst": true,
      "dst_hours": 1,
      "ambiguous_resolved_by_fold": null,
      "note": "read from the IANA tz database at this instant, so daylight saving and historical offset changes are included"
    }
  }
}

Example from a real call for John Doe, born Aug 15, 1990, 10:30 AM, New York. Long lists and texts are shortened.

Parameters, schemas and a test request in the interactive reference. Feature: Kundli and birth charts.

How we check the numbers

Every answer here starts from planet positions worked out from NASA JPL planet data (DE440). We test them against NASA JPL Horizons, NASA's planet position service. On 25,571 positions from 1850 to 2149, the Sun and planets agree within 0.001 arc seconds. The Moon agrees within 0.011. On 2,000 random birth charts, the rising sign agrees with Swiss Ephemeris within 0.004 arc seconds. An arc second is 1/3,600 of a degree. A practicing astrologer reviews the rules behind these answers. See how we test accuracy.

Terms in this group

From the blog