POST

Planets - Rasi Chart

Calculate planetary positions for a specific date, time, and geographical location using Vedic astrology calculations. Retrieve the longitudes, zodiac signs, Nakshatras, and other planetary details needed for birth charts, horoscope analysis, and astrology applications.

/planets
Method
POST
Format
JSON
Auth
API Key
Credits
1

Overview

The Planets API calculates the planetary positions for a given date, time, and geographical location using Vedic astrology calculations. It provides the celestial longitudes of the planets, their zodiac sign placements, and retrograde status, helping developers generate planetary data for a Rasi chart (birth chart).

The API returns details for the Ascendant, Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu, and outer planets such as Uranus, Neptune, and Pluto. The response includes the full zodiacal longitude, degree within the current sign, zodiac sign number, and retrograde status where applicable. This information can be used to display planetary placements and support further astrological calculations.

This endpoint is useful for building Vedic astrology applications, birth chart generators, horoscope analysis tools, and planetary position calculators. To calculate planetary positions, provide the year, month, date, time, latitude, longitude, and timezone. You can also configure the observation point as geocentric or topocentric and select a supported Ayanamsha setting, such as Lahiri or Sayana. The API returns the results in JSON format for easy integration into web applications, mobile apps, and astrology software.

For more extended information on planets, please check planets/extended end point.

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": 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"
        }
    }

Response Examples

Example responses returned by this API.

English Response
{
    "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"
            }
        }
    ]
}
Telugu
{
    "statusCode": 200,
    "input": {
        "year": 1984,
        "month": 1,
        "date": 1,
        "hours": 9,
        "minutes": 30,
        "seconds": 0,
        "latitude": 1,
        "longitude": 1,
        "timezone": 5.5,
        "config": {
            "observation_point": "topocentric",
            "ayanamsha": "lahiri",
            "langugage": "te"
        }
    },
    "output": [
        {
            "0": {
                "name": "Ascendant",
                "fullDegree": 228.4614062991648,
                "normDegree": 18.461406299164793,
                "isRetro": "false",
                "current_sign": 8
            },
            "1": {
                "name": "Sun",
                "fullDegree": 256.2914085789166,
                "normDegree": 16.291408578916617,
                "isRetro": "false",
                "current_sign": 9,
                "house_number": 2
            },
            "2": {
                "name": "Moon",
                "fullDegree": 233.5308558811789,
                "normDegree": 23.530855881178894,
                "isRetro": "false",
                "current_sign": 8,
                "house_number": 1
            },
            "3": {
                "name": "Mars",
                "fullDegree": 181.12605467161887,
                "normDegree": 1.1260546716188742,
                "isRetro": "false",
                "current_sign": 7,
                "house_number": 12
            },
            "4": {
                "name": "Mercury",
                "fullDegree": 254.2620076925015,
                "normDegree": 14.262007692501498,
                "isRetro": "true",
                "current_sign": 9,
                "house_number": 2
            },
            "5": {
                "name": "Jupiter",
                "fullDegree": 242.32685927942092,
                "normDegree": 2.3268592794209155,
                "isRetro": "false",
                "current_sign": 9,
                "house_number": 2
            },
            "6": {
                "name": "Venus",
                "fullDegree": 216.48158128283987,
                "normDegree": 6.481581282839869,
                "isRetro": "false",
                "current_sign": 8,
                "house_number": 1
            },
            "7": {
                "name": "Saturn",
                "fullDegree": 200.30978383825627,
                "normDegree": 20.309783838256266,
                "isRetro": "false",
                "current_sign": 7,
                "house_number": 12
            },
            "8": {
                "name": "Rahu",
                "fullDegree": 50.89458124869137,
                "normDegree": 20.894581248691367,
                "isRetro": "true",
                "current_sign": 2,
                "house_number": 7
            },
            "9": {
                "name": "Ketu",
                "fullDegree": 230.89458124869137,
                "normDegree": 20.894581248691367,
                "isRetro": "true",
                "current_sign": 8,
                "house_number": 1
            },
            "10": {
                "name": "Uranus",
                "fullDegree": 227.52647194859819,
                "normDegree": 17.526471948598186,
                "isRetro": "false",
                "current_sign": 8,
                "house_number": 1
            },
            "11": {
                "name": "Neptune",
                "fullDegree": 245.73591208862499,
                "normDegree": 5.7359120886249855,
                "isRetro": "false",
                "current_sign": 9,
                "house_number": 2
            },
            "12": {
                "name": "Pluto",
                "fullDegree": 188.14860479913895,
                "normDegree": 8.148604799138951,
                "isRetro": "false",
                "current_sign": 7,
                "house_number": 12
            },
            "13": {
                "name": "ayanamsa",
                "value": 23.62947729003994
            },
            "debug": {
                "observation_point": "topocentric",
                "ayanamsa": "lahiri"
            }
        },
        {
            "Ascendant": {
                "current_sign": 8,
                "fullDegree": 228.4614062991648,
                "normDegree": 18.461406299164793,
                "isRetro": "false"
            },
            "Sun": {
                "current_sign": 9,
                "house_number": 2,
                "fullDegree": 256.2914085789166,
                "normDegree": 16.291408578916617,
                "isRetro": "false"
            },
            "Moon": {
                "current_sign": 8,
                "house_number": 1,
                "fullDegree": 233.5308558811789,
                "normDegree": 23.530855881178894,
                "isRetro": "false"
            },
            "Mars": {
                "current_sign": 7,
                "house_number": 12,
                "fullDegree": 181.12605467161887,
                "normDegree": 1.1260546716188742,
                "isRetro": "false"
            },
            "Mercury": {
                "current_sign": 9,
                "house_number": 2,
                "fullDegree": 254.2620076925015,
                "normDegree": 14.262007692501498,
                "isRetro": "true"
            },
            "Jupiter": {
                "current_sign": 9,
                "house_number": 2,
                "fullDegree": 242.32685927942092,
                "normDegree": 2.3268592794209155,
                "isRetro": "false"
            },
            "Venus": {
                "current_sign": 8,
                "house_number": 1,
                "fullDegree": 216.48158128283987,
                "normDegree": 6.481581282839869,
                "isRetro": "false"
            },
            "Saturn": {
                "current_sign": 7,
                "house_number": 12,
                "fullDegree": 200.30978383825627,
                "normDegree": 20.309783838256266,
                "isRetro": "false"
            },
            "Rahu": {
                "current_sign": 2,
                "house_number": 7,
                "fullDegree": 50.89458124869137,
                "normDegree": 20.894581248691367,
                "isRetro": "true"
            },
            "Ketu": {
                "current_sign": 8,
                "house_number": 1,
                "fullDegree": 230.89458124869137,
                "normDegree": 20.894581248691367,
                "isRetro": "true"
            },
            "Uranus": {
                "current_sign": 8,
                "house_number": 1,
                "fullDegree": 227.52647194859819,
                "normDegree": 17.526471948598186,
                "isRetro": "false"
            },
            "Neptune": {
                "current_sign": 9,
                "house_number": 2,
                "fullDegree": 245.73591208862499,
                "normDegree": 5.7359120886249855,
                "isRetro": "false"
            },
            "Pluto": {
                "current_sign": 7,
                "house_number": 12,
                "fullDegree": 188.14860479913895,
                "normDegree": 8.148604799138951,
                "isRetro": "false"
            }
        }
    ]
}

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/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,
        "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/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,
    "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/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,
        "config": {
        "observation_point": "topocentric",
        "ayanamsha": "lahiri"
        }
    })

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