Astrology API Reference Documentation

KP Astrology/kp_planets

API Endpoint

kp_planets

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

Response Data

			
				[ { planet_id: 0,
   planet_name: 'Sun',
   degree: 246.76361165149436,
   is_retro: false,
   norm_degree: 6.763611651494358,
   formatted_degree: '6:45:49',
   house: 6,
   sign: 'Sagittarius',
   sign_lord: 'Jupiter',
   nakshatra: 'Mool',
   nakshatra_lord: 'Ketu',
   charan: 3,
   sub_lord: 'Rahu',
   sub_sub_lord: 'Ketu' },
 { planet_id: 1,
   planet_name: 'Moon',
   degree: 306.8238046588141,
   is_retro: false,
   norm_degree: 6.823804658814083,
   formatted_degree: '6:49:25',
   house: 8,
   sign: 'Aquarius',
   sign_lord: 'Saturn',
   nakshatra: 'Shatbhisha',
   nakshatra_lord: 'Rahu',
   charan: 1,
   sub_lord: 'Rahu',
   sub_sub_lord: 'Rahu' },
 { planet_id: 2,
   planet_name: 'Mars',
   degree: 34.67852565607345,
   is_retro: true,
   norm_degree: 4.678525656073447,
   formatted_degree: '4:40:42',
   house: 11,
   sign: 'Taurus',
   sign_lord: 'Venus',
   nakshatra: 'Krittika',
   nakshatra_lord: 'Sun',
   charan: 3,
   sub_lord: 'Saturn',
   sub_sub_lord: 'Rahu' },
 { planet_id: 3,
   planet_name: 'Mercury',
   degree: 250.79078808466778,
   is_retro: true,
   norm_degree: 10.790788084667781,
   formatted_degree: '10:47:26',
   house: 6,
   sign: 'Sagittarius',
   sign_lord: 'Jupiter',
   nakshatra: 'Mool',
   nakshatra_lord: 'Ketu',
   charan: 4,
   sub_lord: 'Saturn',
   sub_sub_lord: 'Mars' },
 { planet_id: 4,
   planet_name: 'Jupiter',
   degree: 109.04260531506988,
   is_retro: true,
   norm_degree: 19.042605315069878,
   formatted_degree: '19:2:33',
   house: 1,
   sign: 'Cancer',
   sign_lord: 'Moon',
   nakshatra: 'Ashlesha',
   nakshatra_lord: 'Mercury',
   charan: 1,
   sub_lord: 'Ketu',
   sub_sub_lord: 'Jupiter' },
 { planet_id: 5,
   planet_name: 'Venus',
   degree: 259.21749293616995,
   is_retro: false,
   norm_degree: 19.217492936169947,
   formatted_degree: '19:13:2',
   house: 6,
   sign: 'Sagittarius',
   sign_lord: 'Jupiter',
   nakshatra: 'Purva Shadha',
   nakshatra_lord: 'Venus',
   charan: 2,
   sub_lord: 'Rahu',
   sub_sub_lord: 'Mercury' },
 { planet_id: 6,
   planet_name: 'Saturn',
   degree: 270.8566286942386,
   is_retro: false,
   norm_degree: 0.8566286942386228,
   formatted_degree: '0:51:23',
   house: 7,
   sign: 'Capricorn',
   sign_lord: 'Saturn',
   nakshatra: 'Uttra Shadha',
   nakshatra_lord: 'Sun',
   charan: 2,
   sub_lord: 'Rahu',
   sub_sub_lord: 'Sun' },
 { planet_id: 7,
   planet_name: 'Rahu',
   degree: 275.8958110200098,
   is_retro: true,
   norm_degree: 5.8958110200097735,
   formatted_degree: '5:53:44',
   house: 7,
   sign: 'Capricorn',
   sign_lord: 'Saturn',
   nakshatra: 'Uttra Shadha',
   nakshatra_lord: 'Sun',
   charan: 3,
   sub_lord: 'Mercury',
   sub_sub_lord: 'Sun' },
 { planet_id: 8,
   planet_name: 'Ketu',
   degree: 95.89581102000977,
   is_retro: true,
   norm_degree: 5.8958110200097735,
   formatted_degree: '5:53:44',
   house: 1,
   sign: 'Cancer',
   sign_lord: 'Moon',
   nakshatra: 'Pushya',
   nakshatra_lord: 'Saturn',
   charan: 1,
   sub_lord: 'Mercury',
   sub_sub_lord: 'Venus' } ]			
		
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