The planet_panchang API returns the position and information about the celestial bodies in the solar system, including their degrees, signs, and nakshatras. The response includes details of the Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu, and the Ascendant.
1. Panchang at specified date and time
Here, following APIs are used and date and time along with latitude, longitude and timezone are expected -
Params | Data type | Descriptions |
day required month required year required hour required min required lat required lon required tzone required | 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 |
[
{
"id": 0,
"name": "Sun",
"fullDegree": 252.09460460591438,
"normDegree": 12.094604605914384,
"speed": 1.0193591661518109,
"isRetro": "false",
"sign": "Sagittarius",
"signLord": "Jupiter",
"nakshatra": "Mool",
"nakshatra_lord": "Ketu",
"nakshatra_pad": 4,
"house": 8
},
{
"id": 1,
"name": "Moon",
"fullDegree": 270.5122653639715,
"normDegree": 0.512265363971494,
"speed": 11.825128877575814,
"isRetro": "false",
"sign": "Capricorn",
"signLord": "Saturn",
"nakshatra": "Uttra Shadha",
"nakshatra_lord": "Sun",
"nakshatra_pad": 2,
"house": 9
},
{
"id": 2,
"name": "Mars",
"fullDegree": 188.3815319262027,
"normDegree": 8.381531926202712,
"speed": 0.5887946253305186,
"isRetro": "false",
"sign": "Libra",
"signLord": "Venus",
"nakshatra": "Swati",
"nakshatra_lord": "Rahu",
"nakshatra_pad": 1,
"house": 6
},
{
"id": 3,
"name": "Mercury",
"fullDegree": 253.0225800960178,
"normDegree": 13.022580096017805,
"speed": 1.5996369506881676,
"isRetro": "false",
"sign": "Sagittarius",
"signLord": "Jupiter",
"nakshatra": "Mool",
"nakshatra_lord": "Ketu",
"nakshatra_pad": 4,
"house": 8
},
{
"id": 4,
"name": "Jupiter",
"fullDegree": 38.72221374275588,
"normDegree": 8.722213742755883,
"speed": -0.09338056617041195,
"isRetro": "true",
"sign": "Taurus",
"signLord": "Venus",
"nakshatra": "Krittika",
"nakshatra_lord": "Sun",
"nakshatra_pad": 4,
"house": 1
},
{
"id": 5,
"name": "Venus",
"fullDegree": 297.99666783266633,
"normDegree": 27.996667832666333,
"speed": 1.1216268488510852,
"isRetro": "false",
"sign": "Capricorn",
"signLord": "Saturn",
"nakshatra": "Dhanishtha",
"nakshatra_lord": "Mars",
"nakshatra_pad": 2,
"house": 9
},
{
"id": 6,
"name": "Saturn",
"fullDegree": 30.93943500416237,
"normDegree": 0.9394350041623696,
"speed": -0.05047862107117041,
"isRetro": "true",
"sign": "Taurus",
"signLord": "Venus",
"nakshatra": "Krittika",
"nakshatra_lord": "Sun",
"nakshatra_pad": 2,
"house": 1
},
{
"id": 7,
"name": "Rahu",
"fullDegree": 82.06172359607255,
"normDegree": 22.061723596072554,
"speed": -0.052992016996976136,
"isRetro": "true",
"sign": "Gemini",
"signLord": "Mercury",
"nakshatra": "Punarvasu",
"nakshatra_lord": "Jupiter",
"nakshatra_pad": 1,
"house": 2
},
{
"id": 8,
"name": "Ketu",
"fullDegree": 262.06172359607257,
"normDegree": 22.061723596072568,
"speed": -0.052992016996976136,
"isRetro": "true",
"sign": "Sagittarius",
"signLord": "Jupiter",
"nakshatra": "Purva Shadha",
"nakshatra_lord": "Venus",
"nakshatra_pad": 3,
"house": 8
},
{
"id": 9,
"name": "Ascendant",
"fullDegree": 47.8718183438523,
"normDegree": 17.871818343852297,
"speed": 0,
"isRetro": false,
"sign": "Taurus",
"signLord": "Venus",
"nakshatra": "Rohini",
"nakshatra_lord": "Moon",
"nakshatra_pad": 3,
"house": 1
}
]
var api = 'planet_panchang';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var language = '<Your Language>' // By default it is set to en
var data = {
day: 6,
month: 1,
year: 2000,
hour: 7,
min: 45,
lat: 19.132,
lon: 72.342,
tzone: 5.5,
};
var auth = "Basic " + new Buffer(userId + ":" + apiKey).toString("base64");
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
method: "POST",
dataType:'json',
headers: {
"authorization": auth,
"Content-Type":'application/json',
"Accept-Language": language
},
data:JSON.stringify(data)
});
request.then( function(resp){
console.log(resp);
}, function(err){
console.log(err);
});