Complete Panchang

API Endpoint:

complete-panchang

Method:

POST

Full URL:

https://json.freeastrologyapi.com/complete-panchang


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"


Sample Code



$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://json.freeastrologyapi.com/complete-panchang',
  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,
    "config": {
        "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/complete-panchang"

payload = json.dumps({
  "year": 2022,
  "month": 8,
  "date": 11,
  "hours": 6,
  "minutes": 0,
  "seconds": 0,
  "latitude": 17.38333,
  "longitude": 78.4666,
  "timezone": 5.5,
  "config": {
    "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/complete-panchang',
  '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,
    "config": {
      "observation_point": "topocentric",
      "ayanamsha": "lahiri"
    }
  })

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



Response data


{
   "sun_rise":"6:21:37",
   "sun_set":"18:26:37",
   "weekday":{
      "weekday_number":1,
      "weekday_name":"Monday",
      "vedic_weekday_number":7,
      "vedic_weekday_name":"Sunday"
   },
   "lunar_month":{
      "lunar_month_number":12,
      "lunar_month_name":"Phalgunam",
      "lunar_month_full_name":"Phalgunam",
      "adhika":0,
      "nija":0,
      "kshaya":0
   },
   "ritu":{
      "number":1,
      "name":"Vasant (Spring)"
   },
   "aayanam":"Uttarayanam",
   "tithi":{
      "number":29,
      "name":"Chaturdashi",
      "paksha":"krishna",
      "completes_at":"2023-03-21 00:28:30",
      "left_precentage":88.55
   },
   "nakshatra":{
      "number":24,
      "name":"Satabisha",
      "starts_at":"2023-03-19 20:49:58",
      "ends_at":"2023-03-20 18:24:01",
      "left_percentage":57.428099228422795
   },
   "yoga":{
      "1":{
         "number":22,
         "name":"Saadhya",
         "completion":"2023-03-20 15:07:54",
         "yoga_left_percentage":45.156916437536054
      },
      "2":{
         "number":23,
         "name":"Subha",
         "completion":"2023-03-21 11:29:51"
      }
   },
   "karana":{
      "1":{
         "number":57,
         "name":"Vishti",
         "karana_left_percentage":77.10951559846606,
         "completion":"2023-03-20 14:01:24"
      },
      "2":{
         "number":58,
         "name":"Sakuna",
         "completion":"2023-03-21 00:28:32"
      },
      "3":{
         "number":59,
         "name":"Chatushapada",
         "completion":"2023-03-21 10:59:46"
      }
   },
   "year":{
      "status":"success",
      "timestamp":"2023-03-21 21:36:27",
      "saka_salivahana_number":1944,
      "saka_salivahana_name_number":36,
      "saka_salivahana_year_name":"SubhaKritu",
      "vikram_chaitradi_number":2079,
      "vikram_chaitradi_name_number":50,
      "vikram_chaitradi_year_name":"Nala"
   }
}