The response includes the dosha (malefic influence) of planets like Sun, Mars, Saturn, and Rahu for Ascendant, Moon, and Venus along with their dosha units and the final score of Papasamyam calculation.
Accept-Language: enGuide:These languages are supported by this API. You can use them by passing Accept-Language header with a value of the language code.
{
"ascendant": {
"total": 16,
"dosha": [
{
"planet": "SUN",
"position": 10,
"doshaUnits": 0
},
{
"planet": "MARS",
"position": 11,
"doshaUnits": 0
},
{
"planet": "SATURN",
"position": 7,
"doshaUnits": 15
},
{
"planet": "RAHU",
"position": 12,
"doshaUnits": 1
}
]
},
"moon": {
"total": 7,
"dosha": [
{
"planet": "SUN",
"position": 12,
"doshaUnits": 2
},
{
"planet": "MARS",
"position": 1,
"doshaUnits": 9
},
{
"planet": "SATURN",
"position": 9,
"doshaUnits": 0
},
{
"planet": "RAHU",
"position": 2,
"doshaUnits": 3
}
]
},
"venus": {
"total": 3.5,
"dosha": [
{
"planet": "SUN",
"position": 12,
"doshaUnits": 2
},
{
"planet": "MARS",
"position": 1,
"doshaUnits": 9
},
{
"planet": "SATURN",
"position": 9,
"doshaUnits": 0
},
{
"planet": "RAHU",
"position": 2,
"doshaUnits": 3
}
]
},
"final": 26.5
}var api = 'papasamyam_details';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var language = '<Your Language>' // By default it is set to en
var data = {
m_day: 6,
m_month: 1,
m_year: 2000,
m_hour: 7,
m_min: 45,
m_lat: 19.132,
m_lon: 72.342,
m_tzone: 5.5,
f_day: 6,
f_month: 1,
f_year: 2000,
f_hour: 7,
f_min: 45,
f_lat: 19.132,
f_lon: 72.342,
f_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);
});