POST

Ashtamsa(D8) Chart Info

Generate Ashtamsa (D8) divisional chart information using birth date, time, and geographical coordinates. Retrieve the Ascendant and planetary placements by zodiac sign and house to support traditional Vedic astrology interpretations using the D8 chart.

/d8-chart-info
Method
POST
Format
JSON
Auth
API Key
Credits
1

Overview

The Ashtamsa (D8) Chart Info API calculates planetary placements in the Ashtamsa divisional chart using a person's birth date, time, and geographical location. In traditional Vedic astrology, the D8 chart is used for specialized astrological interpretations and provides an additional perspective alongside the main birth chart (D1).

The API returns the Ascendant and planetary placements in the D8 chart, including each body's zodiac sign number, house number, and retrograde status. The response includes the Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu, Uranus, Neptune, and Pluto. Developers can use this information to display Ashtamsa chart placements and support further Vedic astrology analysis.

To calculate Ashtamsa chart information, provide the birth year, month, date, time, latitude, longitude, and timezone. Optional configuration settings allow you to select the Ayanamsha, such as Lahiri or Sayana, and choose a geocentric or topocentric observation point. The API returns the chart information in JSON format for integration into websites, mobile applications, and Vedic astrology software.

Request Parameters

Parameter Type Required Description Example
year
integer Yes Year number, eg: 2023 2023
month
integer Yes Month number,with no leading zero 7
date
integer Yes Day number,with no leading zero 5
hours
integer Yes Hours number,with no leading zero 1
minutes
integer Yes Minutes number,with no leading zero 1
seconds
integer Yes Seconds number, with no leading zero 0
latitude
float Yes Latitude number, in the range from -90 to 90 12.86
longitude
float Yes Longitude number, in the range from -180 to 180 123.5
timezone
float Yes Timezone of birth location, eg: 5.5 5.5
📦 config
object No Contains optional configuration values
ayanamsha
string No Either "tropical" or "sayana" or "lahiri" Either "tropical" or "sayana" or "lahiri"
language
string No Valid 2 letter ISO 639-1 language code Either "en" For English or "te" for Telugu or "hi" for Hindi or "ta" for Tamil or "kn" for Kannada or "ml" for Malayalam or "or" for Odia or "gu" for Gujarati or "pa" for Punjabi or "bn" for Bengali or "mr" for Marathi or "as" for Assamese or "ur" for Urdu or "ne" for Nepali
observation_point
string No Geocentric positions are calculated with respect to the center of Earth. Topocentric positions are calculated with respect to the actual given place Either "topocentric" or "geocentric"

Supported Languages

This API endpoint supports the following languages. Use the corresponding 2-letter language code in the language parameter when making your request.

Language Code
English en
Telugu te
Hindi hi
Tamil ta
Kannada kn
Malayalam ml
Odia or
Gujarati gu
Punjabi pa
Bengali bn
Marathi mr
Assamese as
Urdu ur
Nepali ne
Example

To request the response in Telugu, use te as the language code:

{
    "language": "te"
}

Request Example

{
    "year": 1987,
    "month": 4,
    "date": 7,
    "hours": 0,
    "minutes": 7,
    "seconds": 0,
    "latitude": 17.385,
    "longitude": 78.4867,
    "timezone": 5.5,
    "config": {
        "observation_point": "topocentric", 
        "ayanamsha": "lahiri",
        "language": "te"
    }
}

Response Examples

Example responses returned by this API.

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

Code Examples

Use the following examples to integrate this API into your application.

PHP Code

        $curl = curl_init();

        curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://json.freeastrologyapi.com/d8-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;
    
Python Code

        import requests
        import json

        url = "https://json.freeastrologyapi.com/d8-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)
    
Node JS Code

        var request = require('request');
        var options = {
        'method': 'POST',
        'url': 'https://json.freeastrologyapi.com/d8-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);
        });