AstrologyAPI

Personality Report

POSThttps://json.astrologyapi.com/v1/personality_report/tropical
Copy

The personality_report/tropical API provides detailed astrological insights about an individual's personality based on their birth chart. The response includes a comprehensive report with specific traits, strengths, and weaknesses, as well as a spiritual lesson and a key quality to consider.

POST/personality_report/tropical
Copy
1import requests
2import json
3
4# Your API key
5api_key = "<YOUR_API_KEY>"
6
7# API endpoint URL
8api_url = "https://json.astrologyapi.com/v1/personality_report/tropical"
9
10# Request data
11data = {
12        "day": 10,
13        "month": 5,
14        "year": 1990,
15        "hour": 19,
16        "min": 55,
17        "lat": 19.2056,
18        "lon": 25.2056,
19        "tzone": 5.5,
20        "house_type": "placidus"
21    }
22
23headers = {
24    'x-astrologyapi-key': api_key,
25    'Content-Type': 'application/json'
26    # Add 'Accept-Language': '<language_code>' if needed
27}
28
29try:
30    response = requests.post(api_url, headers=headers, json=data)
31    response.raise_for_status()  # Raise an exception for bad status codes (4xx or 5xx)
32
33    # Process the response
34    response_data = response.json()
35    print(json.dumps(response_data, indent=4))
36
37except requests.exceptions.RequestException as e:
38    print(f"Error making API request: {e}")
39    if hasattr(e, 'response') and e.response is not None:
40        try:
41            print(f"Error response: {e.response.json()}")
42        except json.JSONDecodeError:
43             print(f"Error response (non-JSON): {e.response.text}")
44
45
200Response
Copy
1{
2  "report": [
3    "You may have had trouble communicating in early life. Perhaps you suffer from feelings of inadequacy. You overcome these feelings through sheer necessity, for you have determination in achieving your goals and purposes in life. ",
4    "You will have strong likes and dislikes, and can be very reserved and dignified, though when vexed you are apt to be sharp and sarcastic if not actually cruel. Avoid pride, cultivate sympathy and endeavour to see things from others’ standpoints as well as your own. ",
5    "The position of the Moon in your horoscope will much increase the emotional nature, making you extremely sensitive. You like to be appreciated, and feel things that are said of you very keenly. You need to associate only with pure-minded and cheerful persons, or you may find yourself liable to moods often undesirable ones. ",
6    "In your heart of hearts you want a close intimate relationship with an equal. You make friends easily and give unwaveringly to them. You are capable of extreme self-sacrifice for those they love. Your greatest strengths is the ability to recover and recoup from loss. ",
7    "You constantly work for accuracy, efficiency, and precision, and you become very irritable when things are not done 'right'. You are good at conserving your energy and pacing yourself so that you do not waste or diffuse your efforts. You can be a worry-wart and a fussbudget who gets lost in too many details. ",
8    "Subjects like philosophy, religion, politics, or education interest you, and you are more concerned with theories, abstractions and concepts than with specific applications. You aim for breadth rather than depth, and often join together subjects and information that at first blush don't seem to belong together. You can become known for your innovative thinking and original theories. ",
9    "You promote peace, not war. You believe in diplomacy over force. There may be more concern to demonstrate to the world that the marriage has been successful rather than happy. ",
10    "You are probably not that demonstrative towards the ones you love. If you're artistic, you have a special ability to manifest the results of your creativity. When it comes to money, there is no sense in displaying a poverty consciousness. ",
11    "You also expect nothing less than perfection, and that's a tall order for people around you. Detailed work does not bother you and you are able to focus and concentrate on the various minutiae of any project. You may be prone to periods of depression or be prone to hypochondriac tendencies. "
12  ],
13  "spiritual_lesson": "Spiritual lesson to learn: Sociability (lighten up)",
14  "key_quality": "We think"
15}

Request Headers

Authorization

string

required

Basic Authorization via header

Accept-Language

string

Preferred language for the response content

Properties

English - en

Request Parameters

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

house_type

string

Default : placidus // koch/topocentric/poryphry/equal_house/whole_sign

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.