Astrology API Docs

API Documentation

Welcome to the Astrology Calculation API documentation. This platform uses the astronomy-engine library to provide highly accurate NASA JPL/NOVAS planetary positions.

POST /api/astro

Calculates the Julian Day, Sun, and Moon positions for a given date and time.

Request Headers

Request Body

A JSON object with the following properties:

Example Request

{
  "year": 1990,
  "month": 1,
  "day": 1,
  "hour": 12,
  "minute": 0,
  "latitude": 28.6139,
  "longitude": 77.2090
}
        

Example Response (200 OK)

{
  "julianDay": 2447893.0004068285,
  "ayanamsa": {
    "name": "Lahiri",
    "value": 23.71358700018593
  },
  "planets": {
    "lagna": {
      "sayana": 143.5309604453243,
      "nirayana": 119.33990823020002,
      "rashi": 4,
      "nakshatra": 9,
      "nakshatra_swami": "Mercury",
      "bhav": 1
    },
    "sun": {
      "sayana": 280.7226017004455,
      "nirayana": 257.0090147002596,
      "latitude": 0.00030501865955113915,
      "rashi": 9,
      "nakshatra": 20,
      "nakshatra_swami": "Venus",
      "bhav": 6
    },
    ...
  }
}