SEARCH ASTROLOGY API DOCS

Home
Indian Astrology

Basic Ashtakvarga/planet_ashtak/:planet_name

The API planet_ashtak/:planet_name takes a planet name as input and returns the ashtak varga type, planet name, sign, and sign ID along with the ashtak points of each zodiac sign. The response includes the number of points each planet has in each sign and the total number of points in each sign.

API Endpoint : planet_ashtak/:planet_name
Method : POST
Full URL :
https://json.astrologyapi.com/v1/planet_ashtak/:planet_name
Here planet name means for which planet you want data.
Planet name's are as follow:-
sun, moon, mars, mercury, jupiter, venus, saturn , ascendant

Request Data

ParamsData typeDescriptions

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

Response Data

{
	"ashtak_varga": {
		"type": "Bhinnashtak",
		"planet": "Sun",
		"sign": "virgo",
		"sign_id": 6
	},
	"ashtak_points": {
		"aries": {
			"sun": 0,
			"moon": 0,
			"mars": 1,
			"mercury": 0,
			"jupiter": 0,
			"venus": 0,
			"saturn": 0,
			"ascendant": 0,
			"total": 1
		},
		"taurus": {
			"sun": 1,
			"moon": 1,
			"mars": 0,
			"mercury": 1,
			"jupiter": 1,
			"venus": 0,
			"saturn": 1,
			"ascendant": 1,
			"total": 6
		},
		"gemini": {
			"sun": 0,
			"moon": 0,
			"mars": 1,
			"mercury": 1,
			"jupiter": 0,
			"venus": 0,
			"saturn": 1,
			"ascendant": 1,
			"total": 4
		},
		"cancer": {
			"sun": 0,
			"moon": 0,
			"mars": 0,
			"mercury": 0,
			"jupiter": 0,
			"venus": 0,
			"saturn": 1,
			"ascendant": 1,
			"total": 2
		},
		"leo": {
			"sun": 1,
			"moon": 1,
			"mars": 0,
			"mercury": 0,
			"jupiter": 0,
			"venus": 1,
			"saturn": 1,
			"ascendant": 0,
			"total": 4
		},
		"virgo": {
			"sun": 1,
			"moon": 0,
			"mars": 1,
			"mercury": 1,
			"jupiter": 0,
			"venus": 1,
			"saturn": 1,
			"ascendant": 0,
			"total": 5
		},
		"libra": {
			"sun": 1,
			"moon": 0,
			"mars": 1,
			"mercury": 1,
			"jupiter": 0,
			"venus": 0,
			"saturn": 0,
			"ascendant": 1,
			"total": 4
		},
		"scorpio": {
			"sun": 1,
			"moon": 0,
			"mars": 1,
			"mercury": 1,
			"jupiter": 1,
			"venus": 0,
			"saturn": 1,
			"ascendant": 1,
			"total": 6
		},
		"sagittarius": {
			"sun": 1,
			"moon": 1,
			"mars": 1,
			"mercury": 1,
			"jupiter": 1,
			"venus": 0,
			"saturn": 1,
			"ascendant": 0,
			"total": 6
		},
		"capricorn": {
			"sun": 0,
			"moon": 1,
			"mars": 1,
			"mercury": 0,
			"jupiter": 0,
			"venus": 0,
			"saturn": 0,
			"ascendant": 1,
			"total": 3
		},
		"aquarius": {
			"sun": 1,
			"moon": 0,
			"mars": 0,
			"mercury": 0,
			"jupiter": 0,
			"venus": 1,
			"saturn": 1,
			"ascendant": 0,
			"total": 3
		},
		"pisces": {
			"sun": 1,
			"moon": 0,
			"mars": 1,
			"mercury": 1,
			"jupiter": 1,
			"venus": 0,
			"saturn": 0,
			"ascendant": 0,
			"total": 4
		}
	}
}
POST
var api = 'planet_ashtak/:planet_name';
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);
});