Planets - Rasi Chart

API Endpoint:

planets

Method:

POST

Full URL:

https://json.freeastrologyapi.com/planets


Request data
Parameter Data type Description
year Integer Year number, eg: 2023
month Integer Month number,with no leading zero eg: 7 or 8
date Integer Day number,with no leading zero eg: 5 or 6
hours Integer hours number,with no leading zero eg: 1 or 2
minutes Integer minutes number,with no leading zero eg: 0 or 1
seconds Integer seconds number,with no leading zero eg: 0 or 1
latitude float latitude number, in the range from -90 to 90
longitude float longitude number, in the range from -180 to 180
timezone float Timezone of birth location, eg: 5.5
observation_point String Either "topocentric" or "geocentric"
ayanamsha String Either "sayana" or "lahiri"


Sample Code



$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://json.freeastrologyapi.com/planets',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "year": 2022,
    "month": 8,
    "date": 11,
    "hours": 6,
    "minutes": 0,
    "seconds": 0,
    "latitude": 17.38333,
    "longitude": 78.4666,
    "timezone": 5.5,
    "settings": {
        "observation_point": "topocentric",
        "ayanamsha": "lahiri"
    }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'x-api-key: YOUR_API_KEY_HERE'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
  

import requests
import json

url = "https://json.freeastrologyapi.com/planets"

payload = json.dumps({
  "year": 2022,
  "month": 8,
  "date": 11,
  "hours": 6,
  "minutes": 0,
  "seconds": 0,
  "latitude": 17.38333,
  "longitude": 78.4666,
  "timezone": 5.5,
  "settings": {
    "observation_point": "topocentric",
    "ayanamsha": "lahiri"
  }
})
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'YOUR_API_KEY_HERE'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)


var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://json.freeastrologyapi.com/planets',
  'headers': {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY_HERE'
  },
  body: JSON.stringify({
    "year": 2022,
    "month": 8,
    "date": 11,
    "hours": 6,
    "minutes": 0,
    "seconds": 0,
    "latitude": 17.38333,
    "longitude": 78.4666,
    "timezone": 5.5,
    "settings": {
      "observation_point": "topocentric",
      "ayanamsha": "lahiri"
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});



Response data


{
    "statusCode": 200,
    "input": {
        "year": 2022,
        "month": 8,
        "date": 11,
        "hours": 16,
        "minutes": 30,
        "seconds": 0,
        "latitude": 17.38333,
        "longitude": 78.4666,
        "timezone": 5.5,
        "config": {
            "observation_point": "topocentric",
            "ayanamsha": "lahiri"
        }
    },
    "output": [
        {
            "0": {
                "name": "Ascendant",
                "fullDegree": 260.15231949660466,
                "normDegree": 20.15231949660466,
                "isRetro": "false",
                "current_sign": 9
            },
            "1": {
                "name": "Sun",
                "fullDegree": 114.60861229742005,
                "normDegree": 24.608612297420052,
                "isRetro": "false",
                "current_sign": 4
            },
            "2": {
                "name": "Moon",
                "fullDegree": 285.033591796012,
                "normDegree": 15.03359179601199,
                "isRetro": "false",
                "current_sign": 10
            },
            "3": {
                "name": "Mars",
                "fullDegree": 30.51014898802912,
                "normDegree": 0.510148988029119,
                "isRetro": "false",
                "current_sign": 2
            },
            "4": {
                "name": "Mercury",
                "fullDegree": 137.2368977501939,
                "normDegree": 17.23689775019389,
                "isRetro": "false",
                "current_sign": 5
            },
            "5": {
                "name": "Jupiter",
                "fullDegree": 344.25277484744237,
                "normDegree": 14.252774847442367,
                "isRetro": "true",
                "current_sign": 12
            },
            "6": {
                "name": "Venus",
                "fullDegree": 95.45879340497692,
                "normDegree": 5.458793404976916,
                "isRetro": "false",
                "current_sign": 4
            },
            "7": {
                "name": "Saturn",
                "fullDegree": 297.966845952626,
                "normDegree": 27.966845952625988,
                "isRetro": "true",
                "current_sign": 10
            },
            "8": {
                "name": "Rahu",
                "fullDegree": 23.585811806879523,
                "normDegree": 23.585811806879523,
                "isRetro": "true",
                "current_sign": 1
            },
            "9": {
                "name": "Ketu",
                "fullDegree": 203.58581180687952,
                "normDegree": 23.58581180687952,
                "isRetro": "true",
                "current_sign": 7
            },
            "10": {
                "name": "Uranus",
                "fullDegree": 24.70916691303532,
                "normDegree": 24.70916691303532,
                "isRetro": "false",
                "current_sign": 1
            },
            "11": {
                "name": "Neptune",
                "fullDegree": 330.7897522887296,
                "normDegree": 0.7897522887295736,
                "isRetro": "true",
                "current_sign": 12
            },
            "12": {
                "name": "Pluto",
                "fullDegree": 272.6477453110886,
                "normDegree": 2.647745311088613,
                "isRetro": "true",
                "current_sign": 10
            },
            "13": {
                "name": "ayanamsa",
                "value": 24.168807418791342
            },
            "debug": {
                "observation_point": "topocentric",
                "ayanamsa": "lahiri"
            }
        },
        {
            "Ascendant": {
                "current_sign": 9,
                "fullDegree": 260.15231949660466,
                "normDegree": 20.15231949660466,
                "isRetro": "false"
            },
            "Sun": {
                "current_sign": 4,
                "fullDegree": 114.60861229742005,
                "normDegree": 24.608612297420052,
                "isRetro": "false"
            },
            "Moon": {
                "current_sign": 10,
                "fullDegree": 285.033591796012,
                "normDegree": 15.03359179601199,
                "isRetro": "false"
            },
            "Mars": {
                "current_sign": 2,
                "fullDegree": 30.51014898802912,
                "normDegree": 0.510148988029119,
                "isRetro": "false"
            },
            "Mercury": {
                "current_sign": 5,
                "fullDegree": 137.2368977501939,
                "normDegree": 17.23689775019389,
                "isRetro": "false"
            },
            "Jupiter": {
                "current_sign": 12,
                "fullDegree": 344.25277484744237,
                "normDegree": 14.252774847442367,
                "isRetro": "true"
            },
            "Venus": {
                "current_sign": 4,
                "fullDegree": 95.45879340497692,
                "normDegree": 5.458793404976916,
                "isRetro": "false"
            },
            "Saturn": {
                "current_sign": 10,
                "fullDegree": 297.966845952626,
                "normDegree": 27.966845952625988,
                "isRetro": "true"
            },
            "Rahu": {
                "current_sign": 1,
                "fullDegree": 23.585811806879523,
                "normDegree": 23.585811806879523,
                "isRetro": "true"
            },
            "Ketu": {
                "current_sign": 7,
                "fullDegree": 203.58581180687952,
                "normDegree": 23.58581180687952,
                "isRetro": "true"
            },
            "Uranus": {
                "current_sign": 1,
                "fullDegree": 24.70916691303532,
                "normDegree": 24.70916691303532,
                "isRetro": "false"
            },
            "Neptune": {
                "current_sign": 12,
                "fullDegree": 330.7897522887296,
                "normDegree": 0.7897522887295736,
                "isRetro": "true"
            },
            "Pluto": {
                "current_sign": 10,
                "fullDegree": 272.6477453110886,
                "normDegree": 2.647745311088613,
                "isRetro": "true"
            }
        }
    ]
}