AstrologyAPI

Use access token to call astrology api.

Learn More

ayanamsha

POSThttps://json.astrologyapi.com/v1/ayanamsha
Copy

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.

POST/ayanamsha
Copy
1curl --location 'https://json.astrologyapi.com/v1/ayanamsha' \
2  --header 'Content-Type: application/json' \
3  --header 'x-astrologyapi-key: <YOUR_ACCESS_TOKEN>' \
4  --data '{
5    "day": 10,
6    "month": 5,
7    "year": 1990,
8    "hour": 19,
9    "min": 55,
10    "lat": 19.2056,
11    "lon": 25.2056,
12    "tzone": 5.5
13}'
14
200Response
Copy
1[
2  {
3    "type": "LAHIRI",
4    "degree": 24.101234311094515,
5    "formatted": "24:06:04"
6  },
7  {
8    "type": "KP",
9    "degree": 24.00465040376008,
10    "formatted": "24:00:16"
11  },
12  {
13    "type": "YUKTESHWAR",
14    "degree": 22.72298340376011,
15    "formatted": "22:43:22"
16  },
17  {
18    "type": "RAMAN",
19    "degree": 22.65520140376009,
20    "formatted": "22:39:18"
21  },
22  {
23    "type": "JN_BHASIN",
24    "degree": 23.006317403760136,
25    "formatted": "23:00:22"
26  },
27  {
28    "type": "FAGAN_BRADLEY",
29    "degree": 24.984592033135584,
30    "formatted": "24:59:04"
31  }
32]

Request Headers

x-astrologyapi-key

string

required

API Access Token to authenticate requests. Send your access token in this custom header.

Accept-Language

string

Preferred language for the response content

Properties

English - en

Request Body (JSON)

day

int

required

Date of birth, eg: 10

month

int

required

Month of birth, eg: 5

year

int

required

Year of birth, eg: 1990

hour

int

required

Hour of birth, eg: 19

min

int

required

Minute of birth, eg: 55

lat

float

required

Latitude, eg: 19.2056

lon

float

required

Longitude, eg: 25.2056

tzone

float

required

Timezone, eg: 5.5

Errors

400
Bad Request

Something is wrong with your request format or parameters.

401
Unauthorized

Your API key is missing or invalid.

403
Forbidden

You don't have permission to access this specific resource.

404
Not Found

The API endpoint you're trying to reach doesn't exist.

500
Internal Server Error

Our server is having a temporary glitch.