ayanamsha provides different types of ayanamshas (methods of calculating the shift between the tropical and sidereal zodiacs) for a given longitude in degrees, returning the ayanamsha value in degrees and its formatted representation in hours, minutes, and seconds.
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 |
[
{
"type": "LAHIRI",
"degree": 24.101234311094515,
"formatted": "24:06:04"
},
{
"type": "KP",
"degree": 24.00465040376008,
"formatted": "24:00:16"
},
{
"type": "YUKTESHWAR",
"degree": 22.72298340376011,
"formatted": "22:43:22"
},
{
"type": "RAMAN",
"degree": 22.65520140376009,
"formatted": "22:39:18"
},
{
"type": "JN_BHASIN",
"degree": 23.006317403760136,
"formatted": "23:00:22"
},
{
"type": "FAGAN_BRADLEY",
"degree": 24.984592033135584,
"formatted": "24:59:04"
}
]
var api = 'ayanamsha';
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);
});