# 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.

Source: https://astronode.dev/solutions/planetary-positions-api · Updated: 2026-12-05

## The endpoints

*Planet position endpoints and their plans*

| Endpoint | Request | Plan | What it gives you |
| --- | --- | --- | --- |
| [Planet Positions (Sidereal)](https://astronode.dev/capabilities/vedic/planets) | `POST /v1/planets` | Free | Sidereal (Lahiri) longitudes with sign, nakshatra and pada, house, retrograde |
| [Western Natal Planets](https://astronode.dev/capabilities/western/western-natal-planets) | `POST /v1/western/natal/planets` | Hobby | Tropical longitudes and latitudes with sign, house (your choice of system), retrograde |
| [KP Planet Positions](https://astronode.dev/capabilities/kp/kp-planet-position) | `POST /v1/kp/planet-position` | Hobby | Sidereal (KP-Newcomb) longitudes with the KP lord chain |
| [Transit Events (Gochar)](https://astronode.dev/capabilities/vedic/transits-events) | `POST /v1/transits/events` | Hobby | When 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](https://astronode.dev/data/ayanamsa-1900-2100).

## 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](https://astronode.dev/accuracy) 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](https://astronode.dev/guides/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.

## Related pages

- [Accuracy against NASA JPL Horizons](https://astronode.dev/accuracy)
- [Tropical to sidereal converter](https://astronode.dev/tools/tropical-to-sidereal)
- [Self-hosting an ephemeris library instead](https://astronode.dev/compare/self-hosting)
- [Pricing and plans](https://astronode.dev/pricing)
