Choghadiya Timings

API Endpoint:

choghadiya-timings

Method:

POST

Full URL:

https://json.freeastrologyapi.com/choghadiya-timings


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/choghadiya-timings',
  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/choghadiya-timings"

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/bchoghadiya-timings',
  '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


{
  "1": {
    "name": "Amrit",
    "starts_at": "2023-03-20 06:21:37",
    "ends_at": "2023-03-20 07:52:14.500000"
  },
  "2": {
    "name": "Kaal",
    "starts_at": "2023-03-20 07:52:14.500000",
    "ends_at": "2023-03-20 09:22:52"
  },
  "3": {
    "name": "Shubh",
    "starts_at": "2023-03-20 09:22:52",
    "ends_at": "2023-03-20 10:53:29.500000"
  },
  "4": {
    "name": "Rog",
    "starts_at": "2023-03-20 10:53:29.500000",
    "ends_at": "2023-03-20 12:24:07"
  },
  "5": {
    "name": "Udveg",
    "starts_at": "2023-03-20 12:24:07",
    "ends_at": "2023-03-20 13:54:44.500000"
  },
  "6": {
    "name": "Char",
    "starts_at": "2023-03-20 13:54:44.500000",
    "ends_at": "2023-03-20 15:25:22"
  },
  "7": {
    "name": "Labh",
    "starts_at": "2023-03-20 15:25:22",
    "ends_at": "2023-03-20 16:55:59.500000"
  },
  "8": {
    "name": "Amrit",
    "starts_at": "2023-03-20 16:55:59.500000",
    "ends_at": "2023-03-20 18:26:37"
  },
  "9": {
    "name": "Char",
    "starts_at": "2023-03-20 18:26:37",
    "ends_at": "2023-03-20 19:55:53.500000"
  },
  "10": {
    "name": "Rog",
    "starts_at": "2023-03-20 19:55:53.500000",
    "ends_at": "2023-03-20 21:25:10"
  },
  "11": {
    "name": "Kaal",
    "starts_at": "2023-03-20 21:25:10",
    "ends_at": "2023-03-20 22:54:26.500000"
  },
  "12": {
    "name": "Labh",
    "starts_at": "2023-03-20 22:54:26.500000",
    "ends_at": "2023-03-21 00:23:43"
  },
  "13": {
    "name": "Udveg",
    "starts_at": "2023-03-21 00:23:43",
    "ends_at": "2023-03-21 01:52:59.500000"
  },
  "14": {
    "name": "Shubh",
    "starts_at": "2023-03-21 01:52:59.500000",
    "ends_at": "2023-03-21 03:22:16"
  },
  "15": {
    "name": "Amrit",
    "starts_at": "2023-03-21 03:22:16",
    "ends_at": "2023-03-21 04:51:32.500000"
  },
  "16": {
    "name": "Char",
    "starts_at": "2023-03-21 04:51:32.500000",
    "ends_at": "2023-03-21 06:20:49"
  }
}