Khavedamsa(D40) Chart Info

API Endpoint:

d40-chart-info

Method:

POST

Full URL:

https://json.freeastrologyapi.com/d40-chart-info


Request data
Parameter Data type Description Constraints Required
year Integer Year number, eg: 2023 Valid year Number Yes
month Integer Month number,with no leading zero eg: 7 or 8 Valid month number Yes
date Integer Day number,with no leading zero eg: 5 or 6 Valid date number Yes
hours Integer Hours number,with no leading zero eg: 1 or 2 Valid hours number Yes
minutes Integer Minutes number,with no leading zero eg: 0 or 1 Valid minutes number Yes
seconds Integer Seconds number,with no leading zero eg: 0 or 1 Valid seconds number Yes
latitude Float Latitude number, in the range from -90 to 90 Valid latitude Yes
longitude Float Longitude number, in the range from -180 to 180 Valid longitude Yes
timezone Float Timezone of birth location, eg: 5.5 Valid timezone Yes
config Object Contains optional configuration values Optional No
observation_point String Either "topocentric" or "geocentric" Optional No
ayanamsha String Either "sayana" or "lahiri" Optional No


Sample Code


    
        $curl = curl_init();

        curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://json.freeastrologyapi.com/d40-chart-info',
        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/d40-chart-info"

        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/d40-chart-info',
        '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

    
        {
            "statusCode": 200,
            "output": {
                "0": {
                    "name": "Ascendant",
                    "isRetro": "false",
                    "current_sign": 7,
                    "house_number": 1
                },
                "1": {
                    "name": "Sun",
                    "isRetro": "false",
                    "current_sign": 5,
                    "house_number": 11
                },
                "2": {
                    "name": "Moon",
                    "isRetro": "false",
                    "current_sign": 3,
                    "house_number": 9
                },
                "3": {
                    "name": "Mars",
                    "isRetro": "false",
                    "current_sign": 10,
                    "house_number": 4
                },
                "4": {
                    "name": "Mercury",
                    "isRetro": "false",
                    "current_sign": 12,
                    "house_number": 6
                },
                "5": {
                    "name": "Jupiter",
                    "isRetro": "false",
                    "current_sign": 9,
                    "house_number": 3
                },
                "6": {
                    "name": "Venus",
                    "isRetro": "false",
                    "current_sign": 2,
                    "house_number": 8
                },
                "7": {
                    "name": "Saturn",
                    "isRetro": "false",
                    "current_sign": 4,
                    "house_number": 10
                },
                "8": {
                    "name": "Rahu",
                    "isRetro": "true",
                    "current_sign": 11,
                    "house_number": 5
                },
                "9": {
                    "name": "Ketu",
                    "isRetro": "true",
                    "current_sign": 11,
                    "house_number": 5
                },
                "10": {
                    "name": "Uranus",
                    "isRetro": "true",
                    "current_sign": 2,
                    "house_number": 8
                },
                "11": {
                    "name": "Neptune",
                    "isRetro": "true",
                    "current_sign": 8,
                    "house_number": 2
                },
                "12": {
                    "name": "Pluto",
                    "isRetro": "true",
                    "current_sign": 3,
                    "house_number": 9
                }
            }
        }