SEARCH ASTROLOGY API DOCS

Home
Western Astrology

Western Horoscope/western_horoscope

The western_horoscope API returns the positions and properties of celestial bodies in the sky, including the Sun, Moon, planets, and asteroids, as well as the positions of the 12 astrological houses. The response includes information such as the name of each celestial body, its position in degrees, its speed, whether it is retrograde, its astrological sign, and the house it is in.

API Endpoint : western_horoscope
Method : POST
Full URL :
https://json.astrologyapi.com/v1/western_horoscope
'placidus', 'koch', 'porphyry', 'equal', 'whole_sign', 'topocentric', 'sripati', 'horizontal', 'campanus'

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

{
	"planets": [
		{
			"name": "Sun",
			"full_degree": 275.6427,
			"norm_degree": 5.6427,
			"speed": 1.019,
			"is_retro": "false",
			"sign_id": 10,
			"sign": "Capricorn",
			"house": 2
		},
		{
			"name": "Moon",
			"full_degree": 12.271,
			"norm_degree": 12.271,
			"speed": 13.5085,
			"is_retro": "false",
			"sign_id": 1,
			"sign": "Aries",
			"house": 5
		},
		{
			"name": "Mars",
			"full_degree": 232.2381,
			"norm_degree": 22.2381,
			"speed": 0.6621,
			"is_retro": "false",
			"sign_id": 8,
			"sign": "Scorpio",
			"house": 12
		},
		{
			"name": "Mercury",
			"full_degree": 278.3033,
			"norm_degree": 8.3033,
			"speed": 1.6049,
			"is_retro": "false",
			"sign_id": 10,
			"sign": "Capricorn",
			"house": 2
		},
		{
			"name": "Jupiter",
			"full_degree": 20.033,
			"norm_degree": 20.033,
			"speed": 0.043,
			"is_retro": "false",
			"sign_id": 1,
			"sign": "Aries",
			"house": 5
		},
		{
			"name": "Venus",
			"full_degree": 307.0102,
			"norm_degree": 7.0102,
			"speed": 1.2339,
			"is_retro": "false",
			"sign_id": 11,
			"sign": "Aquarius",
			"house": 3
		},
		{
			"name": "Saturn",
			"full_degree": 264.9924,
			"norm_degree": 24.9924,
			"speed": 0.117,
			"is_retro": "false",
			"sign_id": 9,
			"sign": "Sagittarius",
			"house": 1
		},
		{
			"name": "Uranus",
			"full_degree": 267.4199,
			"norm_degree": 27.4199,
			"speed": 0.0601,
			"is_retro": "false",
			"sign_id": 9,
			"sign": "Sagittarius",
			"house": 1
		},
		{
			"name": "Neptune",
			"full_degree": 277.6325,
			"norm_degree": 7.6325,
			"speed": 0.0379,
			"is_retro": "false",
			"sign_id": 10,
			"sign": "Capricorn",
			"house": 2
		},
		{
			"name": "Pluto",
			"full_degree": 221.8913,
			"norm_degree": 11.8913,
			"speed": 0.0273,
			"is_retro": "false",
			"sign_id": 8,
			"sign": "Scorpio",
			"house": 12
		},
		{
			"name": "Node",
			"full_degree": 357.3824,
			"norm_degree": 27.3824,
			"speed": -0.053,
			"is_retro": "true",
			"sign_id": 12,
			"sign": "Pisces",
			"house": 4
		},
		{
			"name": "Chiron",
			"full_degree": 85.3981,
			"norm_degree": 25.3981,
			"speed": -0.0619,
			"is_retro": "true",
			"sign_id": 3,
			"sign": "Gemini",
			"house": 7
		},
		{
			"name": "Part of Fortune",
			"full_degree": 144.086,
			"norm_degree": 24.086,
			"speed": 0,
			"is_retro": "false",
			"sign_id": 5,
			"sign": "Leo",
			"house": 9
		}
	],
	"houses": [
		{
			"house": 1,
			"sign": "Sagittarius",
			"degree": 240.71431
		},
		{
			"house": 2,
			"sign": "Capricorn",
			"degree": 270.69055
		},
		{
			"house": 3,
			"sign": "Aquarius",
			"degree": 303.14258
		},
		{
			"house": 4,
			"sign": "Pisces",
			"degree": 336.92136
		},
		{
			"house": 5,
			"sign": "Aries",
			"degree": 8.8136
		},
		{
			"house": 6,
			"sign": "Taurus",
			"degree": 36.5582
		},
		{
			"house": 7,
			"sign": "Gemini",
			"degree": 60.71431
		},
		{
			"house": 8,
			"sign": "Cancer",
			"degree": 90.69055
		},
		{
			"house": 9,
			"sign": "Leo",
			"degree": 123.14258
		},
		{
			"house": 10,
			"sign": "Virgo",
			"degree": 156.92136
		},
		{
			"house": 11,
			"sign": "Libra",
			"degree": 188.8136
		},
		{
			"house": 12,
			"sign": "Scorpio",
			"degree": 216.5582
		}
	],
	"ascendant": 240.71431015862024,
	"midheaven": 156.92135925483103,
	"vertex": 118.53668227404134,
	"lilith": {
		"name": "Lilith",
		"full_degree": 134.6796,
		"norm_degree": 14.6796,
		"speed": 0.1113,
		"is_retro": "false",
		"sign_id": 5,
		"sign": "Leo",
		"house": 9
	},
	"aspects": [
		{
			"aspecting_planet": "Sun",
			"aspected_planet": "Mercury",
			"aspecting_planet_id": 0,
			"aspected_planet_id": 3,
			"type": "Conjunction",
			"orb": 2.66,
			"diff": 2.66
		},
		{
			"aspecting_planet": "Sun",
			"aspected_planet": "Neptune",
			"aspecting_planet_id": 0,
			"aspected_planet_id": 8,
			"type": "Conjunction",
			"orb": 1.99,
			"diff": 1.99
		},
		{
			"aspecting_planet": "Sun",
			"aspected_planet": "Midheaven",
			"aspecting_planet_id": 0,
			"aspected_planet_id": 11,
			"type": "Trine",
			"orb": 1.28,
			"diff": 118.72
		},
		{
			"aspecting_planet": "Moon",
			"aspected_planet": "Mercury",
			"aspecting_planet_id": 1,
			"aspected_planet_id": 3,
			"type": "Square",
			"orb": 3.97,
			"diff": 93.97
		},
		{
			"aspecting_planet": "Moon",
			"aspected_planet": "Venus",
			"aspecting_planet_id": 1,
			"aspected_planet_id": 5,
			"type": "Sextile",
			"orb": 5.26,
			"diff": 65.26
		},
		{
			"aspecting_planet": "Moon",
			"aspected_planet": "Neptune",
			"aspecting_planet_id": 1,
			"aspected_planet_id": 8,
			"type": "Square",
			"orb": 4.64,
			"diff": 94.64
		},
		{
			"aspecting_planet": "Mercury",
			"aspected_planet": "Neptune",
			"aspecting_planet_id": 3,
			"aspected_planet_id": 8,
			"type": "Conjunction",
			"orb": 0.67,
			"diff": 0.67
		},
		{
			"aspecting_planet": "Mercury",
			"aspected_planet": "Pluto",
			"aspecting_planet_id": 3,
			"aspected_planet_id": 9,
			"type": "Sextile",
			"orb": 3.59,
			"diff": 56.41
		},
		{
			"aspecting_planet": "Mercury",
			"aspected_planet": "Midheaven",
			"aspecting_planet_id": 3,
			"aspected_planet_id": 11,
			"type": "Trine",
			"orb": 1.38,
			"diff": 121.38
		},
		{
			"aspecting_planet": "Jupiter",
			"aspected_planet": "Saturn",
			"aspecting_planet_id": 4,
			"aspected_planet_id": 6,
			"type": "Trine",
			"orb": 4.96,
			"diff": 115.04
		},
		{
			"aspecting_planet": "Venus",
			"aspected_planet": "Pluto",
			"aspecting_planet_id": 5,
			"aspected_planet_id": 9,
			"type": "Square",
			"orb": 4.88,
			"diff": 85.12
		},
		{
			"aspecting_planet": "Saturn",
			"aspected_planet": "Uranus",
			"aspecting_planet_id": 6,
			"aspected_planet_id": 7,
			"type": "Conjunction",
			"orb": 2.43,
			"diff": 2.43
		},
		{
			"aspecting_planet": "Neptune",
			"aspected_planet": "Pluto",
			"aspecting_planet_id": 8,
			"aspected_planet_id": 9,
			"type": "Sextile",
			"orb": 4.26,
			"diff": 55.74
		},
		{
			"aspecting_planet": "Neptune",
			"aspected_planet": "Midheaven",
			"aspecting_planet_id": 8,
			"aspected_planet_id": 11,
			"type": "Trine",
			"orb": 0.71,
			"diff": 120.71
		},
		{
			"aspecting_planet": "Pluto",
			"aspected_planet": "Midheaven",
			"aspecting_planet_id": 9,
			"aspected_planet_id": 11,
			"type": "Sextile",
			"orb": 4.97,
			"diff": 64.97
		}
	]
}
POST
var api = 'western_horoscope';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
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'
},
    data:JSON.stringify(data)
});

request.then( function(resp){
    console.log(resp);
}, function(err){
    console.log(err);
});