Skip to content
POST/api/astro/planet-positions/1 credit

Planet positions

Sidereal positions of the nine grahas for a moment and place: longitude, sign, nakshatra, pada and house for each, plus the ascendant and the ayanamsa actually applied. The planets come back as a LIST in traditional order with `name` on each entry, rather than nested under a chart name and keyed by planet, so you can iterate or render a table directly. Derived from /api/astro/chart/, which requires chart_name, notation, ayanamsa and ascendant_pos on every call. Here they default to RashiChart, degree, LAHIRI and cusp - send a date and a place and nothing else. `ayanamsa` is still worth setting deliberately: it shifts every longitude in the response, and Lahiri and Raman differ by about a degree, which is enough to move a planet into a different nakshatra. All 48 ayanamsas the chart endpoint supports are accepted here.

https://api.occultapi.com/api/astro/planet-positions/
Test Request
Planet positions output rendered in an interface
This endpoint’s data rendered in a live interface. The API returns the values; the layout is yours to build.

Authentication

Send your key in the X-API-Key header. Keys are server-side credentials — never put one in browser JavaScript or a mobile app.

X-API-Key: yt_live_a1b2c3d4_…
Content-Type: application/json

Request fields

FieldTypeRequiredNotes
chart_namestringrequired
datetimestring (date-time)required

The moment to calculate for, ISO 8601. ALWAYS include an offset or a trailing Z - a value with no zone is read as Asia/Kolkata (UTC+05:30), not UTC. Same meaning as date_time, which other endpoints call the same thing by a different name.

latitudenumber (double)required

Latitude of the place, in decimal degrees. Positive is north, negative is south. Example: 26.9124 for Jaipur, 40.7128 for New York. Minutes and seconds are not accepted - convert first.

min -89.9 · max 89.9

longitudenumber (double)required

Longitude of the place, in decimal degrees. Positive is east, negative is west. Example: 75.7873 for Jaipur, -74.0060 for New York. Note the sign: a missing minus puts New York in China.

min -180 · max 180

aberrationbooleanoptional
apply_correctionbooleanoptional
ascendant_posstringoptional
cuspstartend
ayanamsastringoptional
background_colorstringoptional

Hex color for the SVG background.

chart_stylestringoptional

Diagram style when render='svg'. 'north' is the diamond layout with fixed houses and rotating signs; 'south' is the fixed-sign grid with rotating houses.

northsouth
correction_degintegeroptional

min 0

correction_directionstringoptional
addsubtract
correction_minintegeroptional

min 0 · max 59

correction_secintegeroptional

min 0 · max 59

extended_bodiesarrayoptional

Body groups to include: 'asteroids', 'planetary_moons', 'fictitious_bodies'.

label_stylestringoptional

How planets are labelled: 'english' (Su, Mo, ...), 'sanskrit' (Surya, Chandra, ...) or 'symbol' (☉, ☽, ...).

englishsanskritsymbol
line_colorstringoptional

Hex color for the chart's grid lines.

notationstringoptional
astrologicaldegree
nutationbooleanoptional
planet_colorstringoptional

Hex color for planet labels, e.g. '#111827'. Defaults to the theme's own colour.

rahustringoptional

Node type to include. 'true' returns true nodes only, 'mean' returns mean nodes only, 'both' returns both.

truemeanboth
refractionbooleanoptional
renderstringoptional

Set to 'svg' to also return a rendered chart diagram (see chart_style) and the geometry behind it. Omit this entirely and the response is unchanged.

nonesvg
show_degreesbooleanoptional

Print each body's degree within its sign next to its label.

sign_colorstringoptional

Hex color for sign numbers/abbreviations.

svg_sizeintegeroptional

Width and height of the square SVG viewBox, in pixels.

min 100 · max 2000

themestringoptional
lightdark
true_meanstringoptional
TrueMean
use_28_nakshatrasbooleanoptional

Example request

curl -X POST https://api.occultapi.com/api/astro/planet-positions/ \
  -H "X-API-Key: $OCCULT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"datetime":"2026-09-01T06:00:00+05:30","timezone_as_float":5.5,"latitude":26.9124,"longitude":75.7873,"ayanamsa":"LAHIRI"}'

Response

{
  "data": {
    "planets": [
      {
        "name": "sun",
        "longitude": 134.381,
        "latitude": 0,
        "nakshatra": "Poorva Phalguni",
        "pada": 1,
        "kakshya": "sun",
        "zodiac_name": "Leo",
        "house": 1
      },
      {
        "name": "moon",
        "longitude": 1.478,
        "latitude": 4.37,
        "nakshatra": "Ashwini",
        "pada": 1,
        "kakshya": "saturn",
        "zodiac_name": "Aries",
        "house": 9
      },
      {
        "name": "mars",
        "longitude": 79.175,
        "latitude": 0.535,
        "nakshatra": "Aardra",
        "pada": 4,
        "kakshya": "Mercury",
        "zodiac_name": "Gemini",
        "house": 11
      },
      {
        "name": "mercury",
        "longitude": 138.508,
        "latitude": 1.574,
        "nakshatra": "Poorva Phalguni",
        "pada": 2,
        "kakshya": "venus",
        "zodiac_name": "Leo",
        "house": 1
      },
      {
        "name": "jupiter",
        "longitude": 109.472,
        "latitude": 0.529,
        "nakshatra": "Aasresha",
        "pada": 1,
        "kakshya": "Mercury",
        "zodiac_name": "Cancer",
        "house": 12
      },
      {
        "name": "venus",
        "longitude": 178.956,
        "latitude": -3.391,
        "nakshatra": "Chitra",
        "pada": 2,
        "kakshya": "ascendant",
        "zodiac_name": "Virgo",
        "house": 2
      },
      {
        "name": "saturn",
        "longitude": 349.447,
        "latitude": -2.651,
        "nakshatra": "Revati",
        "pada": 1,
        "kakshya": "Mercury",
        "zodiac_name": "Pisces",
        "house": 8
      },
      {
        "name": "northtruenode",
        "longitude": 305.566,
        "latitude": 0,
        "nakshatra": "Dhanishtha",
        "pada": 4,
        "kakshya": "jupiter",
        "zodiac_name": "Aquarius",
        "house": 7
      },
      {
        "name": "southtruenode",
        "longitude": 125.56599999999996,
        "latitude": 0,
        "nakshatra": "Makha",
        "pada": 2,
        "kakshya": "jupiter",
        "zodiac_name": "Leo",
        "house": 1
      },
      {
        "name": "uranus",
        "longitude": 41.424,
        "latitude": -0.154,
        "nakshatra": "Rohini",
        "pada": 1,
        "kakshya": "sun",
        "zodiac_name": "Taurus",
        "house": 10
      },
      {
        "name": "neptune",
        "longitude": 339.433,
        "latitude": -1.412,
        "nakshatra": "Uttaraabhaadra",
        "pada": 2,
        "kakshya": "mars",
        "zodiac_name": "Pisces",
        "house": 8
      },
      {
        "name": "pluto",
        "longitude": 279.279,
        "latitude": -4.3,
        "nakshatra": "Uttaraashaadha",
        "pada": 4,
        "kakshya": "mars",
        "zodiac_name": "Capricorn",
        "house": 6
      }
    ],
    "ascendant": {
      "longitude": 132.1878846274937,
      "zodiac_name": "Leo",
      "nakshatra": "Makha",
      "pada": 4
    },
    "ayanamsa": {
      "name": "LAHIRI",
      "corrected": false,
      "value_degrees": 24.229599,
      "formatted": "24°13'47\""
    }
  },
  "status": 200,
  "is_error": false,
  "message": "successful"
}

Captured from a real call using the exact request above. Results sit under data.

Errors

Metering errors return { "error": "…", "message": "<code>", "is_error": true }. Show error to people and branch on message. See the error reference.