← Solutions

Planetary positions API: tropical and sidereal longitudes for any moment

Send a date, a time, the UTC offset and a place; get the Sun, Moon and planets with longitude, sign, house and retrograde flag. Choose tropical or sidereal by choosing the endpoint.

Updated

The endpoints

Planet position endpoints and their plans
EndpointRequestPlanWhat it gives you
Planet Positions (Sidereal)POST /v1/planetsFreeSidereal (Lahiri) longitudes with sign, nakshatra and pada, house, retrograde
Western Natal PlanetsPOST /v1/western/natal/planetsHobbyTropical longitudes and latitudes with sign, house (your choice of system), retrograde
KP Planet PositionsPOST /v1/kp/planet-positionHobbySidereal (KP-Newcomb) longitudes with the KP lord chain
Transit Events (Gochar)POST /v1/transits/eventsHobbyWhen planets change sign, station or go combust over a date range

One moment, both zodiacs

Tropical, 5 December 2026, 12:00 UT, London:

http
POST /v1/western/natal/planets

{
  "date": "2026-12-05",
  "time": "12:00",
  "tz_offset_minutes": 0,
  "lat": 51.5072,
  "lng": -0.1276
}

Recorded response (data; long lists cut):

json
{
  "planets": [
    {
      "planet": "Sun",
      "longitude": 253.3554221398639,
      "latitude": -0.00008603887135810727,
      "sign": "Sagittarius",
      "degree_in_sign": 13.35542213986389,
      "retrograde": false,
      "house": 9
    },
    {
      "planet": "Moon",
      "longitude": 213.85243810195416,
      "latitude": -4.737795892353409,
      "sign": "Scorpio",
      "degree_in_sign": 3.852438101954135,
      "retrograde": false,
      "house": 8
    },
    {
      "planet": "Mercury",
      "longitude": 238.70866097925136,
      "latitude": 1.0187785299887302,
      "sign": "Scorpio",
      "degree_in_sign": 28.708660979251363,
      "retrograde": false,
      "house": 9
    }
  ],
  "meta": {
    "zodiac": "tropical",
    "house_system": "placidus",
    "aspect_set": "ptolemaic",
    "orb_set": "standard",
    "engine_version": "1.2.1"
  }
}

Sidereal, same moment and place:

http
POST /v1/planets

{
  "date": "2026-12-05",
  "time": "12:00",
  "tz_offset_minutes": 0,
  "lat": 51.5072,
  "lng": -0.1276
}

Recorded response (data; long lists cut):

json
{
  "planets": [
    {
      "name": "Sun",
      "longitude": 229.1197006234183,
      "sign": "Scorpio",
      "degree_in_sign": 19.11970062341834,
      "nakshatra": "Jyeshtha",
      "nakshatra_pada": 1,
      "retrograde": false,
      "house": 10
    },
    {
      "name": "Moon",
      "longitude": 189.61671658550856,
      "sign": "Libra",
      "degree_in_sign": 9.616716585508584,
      "nakshatra": "Swati",
      "nakshatra_pada": 1,
      "retrograde": false,
      "house": 9
    },
    {
      "name": "Mars",
      "longitude": 129.30723443505264,
      "sign": "Leo",
      "degree_in_sign": 9.307234435052637,
      "nakshatra": "Magha",
      "nakshatra_pada": 3,
      "retrograde": false,
      "house": 7
    }
  ],
  "meta": {
    "ayanamsa": "lahiri",
    "house_system": "whole_sign",
    "engine_version": "1.2.1"
  }
}

The Sun is at 253.3554° tropical (Sagittarius) and 229.1197° sidereal (Scorpio): a difference of 24.2357°, which is the Lahiri ayanamsa on that date. Every body shifts by the same amount, so a planet near the end of a sign moves into the previous sign. See the ayanamsa table.

How accurate

Positions come from Swiss Ephemeris with its full data files. A test in CI compares them with NASA JPL Horizons; the accuracy page has every comparison, as a table and a CSV.

Getting the input right

  • time is local clock time and tz_offset_minutes the offset in force at that moment. The API does not look up time zones. See birth time and time zones.
  • Planet longitudes barely depend on the place; houses and the ascendant depend on it heavily.
  • Outer bodies and the nodes: /v1/western/natal/planets adds Uranus, Neptune, Pluto, Chiron and the nodes; the sidereal endpoint returns the nine Vedic grahas.

Questions

Is there an ephemeris API?
Yes. POST /v1/western/natal/planets returns tropical planet positions and POST /v1/planets sidereal ones, for any date, time and place, computed by Swiss Ephemeris.
How accurate are the positions?
They are checked in CI against NASA JPL Horizons; the full comparison is on the accuracy page.
How do I get sidereal positions?
Use POST /v1/planets (Lahiri) or POST /v1/kp/planet-position (KP-Newcomb). The difference from tropical is the ayanamsa, about 24.2° in 2026.