Astrology API Reference Documentation

Basic Astro/planets

Full planetary positions including ascendant along with retrograde status and nakshatra, house, sign

API Endpoint

planets

Method & URL
Method Full URL
POST https://json.astrologyapi.com/v1/planets

Response Data

			
				[{
	"id": 0,
	"name": "Sun",
	"fullDegree": 119.36236006077748,
	"normDegree": 29.362360060777476,
	"speed": 0.9614164973040943,
	"isRetro": "false",
	"sign": "Cancer",
	"signLord": "Moon",
	"nakshatra": "Ashlesha",
	"nakshatraLord": "Mercury",
	"house": 6
}, {
	"id": 1,
	"name": "Moon",
	"fullDegree": 141.46427700686803,
	"normDegree": 21.46427700686803,
	"speed": 11.86293198461302,
	"isRetro": "false",
	"sign": "Leo",
	"signLord": "Sun",
	"nakshatra": "Purva Phalguni",
	"nakshatraLord": "Venus",
	"house": 7
}, {
	"id": 2,
	"name": "Mars",
	"fullDegree": 100.86285218276414,
	"normDegree": 10.862852182764144,
	"speed": 0.6441614668698721,
	"isRetro": "false",
	"sign": "Cancer",
	"signLord": "Moon",
	"nakshatra": "Pushya",
	"nakshatraLord": "Saturn",
	"house": 6
}, {
	"id": 3,
	"name": "Mercury",
	"fullDegree": 140.51579105369137,
	"normDegree": 20.515791053691373,
	"speed": 1.5415660153057722,
	"isRetro": "false",
	"sign": "Leo",
	"signLord": "Sun",
	"nakshatra": "Purva Phalguni",
	"nakshatraLord": "Venus",
	"house": 7
}, {
	"id": 4,
	"name": "Jupiter",
	"fullDegree": 127.03865813626372,
	"normDegree": 7.03865813626372,
	"speed": 0.21666058348340428,
	"isRetro": "false",
	"sign": "Leo",
	"signLord": "Sun",
	"nakshatra": "Magha",
	"nakshatraLord": "Ketu",
	"house": 7
}, {
	"id": 5,
	"name": "Venus",
	"fullDegree": 118.06764224279176,
	"normDegree": 28.067642242791763,
	"speed": -0.6201938056718103,
	"isRetro": "true",
	"sign": "Cancer",
	"signLord": "Moon",
	"nakshatra": "Ashlesha",
	"nakshatraLord": "Mercury",
	"house": 6
}, {
	"id": 6,
	"name": "Saturn",
	"fullDegree": 214.37388242254252,
	"normDegree": 4.373882422542522,
	"speed": 0.023249303177768656,
	"isRetro": "false",
	"sign": "Scorpio",
	"signLord": "Mars",
	"nakshatra": "Anuradha",
	"nakshatraLord": "Saturn",
	"house": 10
}, {
	"id": 7,
	"name": "Rahu",
	"fullDegree": 158.80846330342416,
	"normDegree": 8.808463303424162,
	"speed": -0.05295372555616844,
	"isRetro": "true",
	"sign": "Virgo",
	"signLord": "Mercury",
	"nakshatra": "Uttra Phalguni",
	"nakshatraLord": "Sun",
	"house": 8
}, {
	"id": 8,
	"name": "Ketu",
	"fullDegree": 338.80846330342416,
	"normDegree": 8.808463303424162,
	"speed": -0.05295372555616844,
	"isRetro": "true",
	"sign": "Pisces",
	"signLord": "Jupiter",
	"nakshatra": "Uttra Bhadrapad",
	"nakshatraLord": "Saturn",
	"house": 2
}, {
	"id": 9,
	"name": "Ascendant",
	"fullDegree": 326.3572110330986,
	"normDegree": 26.357211033098622,
	"speed": 0,
	"isRetro": false,
	"sign": "Aquarius",
	"signLord": "Saturn",
	"nakshatra": "Purva Bhadrapad",
	"nakshatraLord": "Jupiter",
	"house": 1
}]			
		
Params Data type Descriptions

day

month

year

hour

min

lat

lon

tzone

int

int

int

int

int

float

float

float

date of birth, eg: 10

month of birth, eg: 5

year of birth, eg: 1990

hour, eg: 19

minute, eg: 55

latitude, eg: 19.2056

longitude, eg: 25.2056

timezone, eg: 5.5

            
                var userId = '';
var apiKey = '';
var data = 'JSON Request Data';
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
    method: "POST",
    dataType:'json',
    headers: {
    "authorization": "Basic " + btoa(userId+":"+apiKey),
        "Content-Type":'application/json'
    },
    data:JSON.stringify(data)
});
// Returns A promiss
return( request.then( function(resp){
    return resp;
}, function(err){
    return err;
}));
}
            
		
                
                    require_once 'VedicRishiClient.php';
$userId = "";
$apiKey = "";
$data = array(
    'date' => 25,
    'month' => 12,
    'year' => 1988,
    'hour' => 4,
    'minute' => 0,
    'latitude' => 25.123,
    'longitude' => 82.34,
    'timezone' => 5.5
);
$resourceName = "astro_details";
$vedicRishi = new VedicRishiClient($userId, $apiKey);
$responseData = $vedicRishi->call($resourceName, $data['date'], $data['month'], $data['year'], $data['hour'], $data['minute'], $data['latitude'], $data['longitude'], $data['timezone']);
echo $responseData;


                

             
Download PHP Client