AstrologyAPI

Friendship Report

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

The friendship_report/tropical API provides a brief report on the dynamics of a friendship between two individuals. It offers insights and advice on their personalities, communication styles, potential challenges, and ways to overcome them.

POST/friendship_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/friendship_report/tropical"
9
10# Request data
11data = {
12        "p_day": 10,
13        "p_month": 5,
14        "p_year": 1990,
15        "p_hour": 11,
16        "p_min": 55,
17        "p_lat": 19.2056,
18        "p_lon": 25.2056,
19        "p_tzone": 5.5,
20        "s_day": 10,
21        "s_month": 5,
22        "s_year": 1990,
23        "s_hour": 11,
24        "s_min": 55,
25        "s_lat": 19.2056,
26        "s_lon": 25.2056,
27        "s_tzone": 5.5
28    }
29
30headers = {
31    'x-astrologyapi-key': api_key,
32    'Content-Type': 'application/json'
33    # Add 'Accept-Language': '<language_code>' if needed
34}
35
36try:
37    response = requests.post(api_url, headers=headers, json=data)
38    response.raise_for_status()  # Raise an exception for bad status codes (4xx or 5xx)
39
40    # Process the response
41    response_data = response.json()
42    print(json.dumps(response_data, indent=4))
43
44except requests.exceptions.RequestException as e:
45    print(f"Error making API request: {e}")
46    if hasattr(e, 'response') and e.response is not None:
47        try:
48            print(f"Error response: {e.response.json()}")
49        except json.JSONDecodeError:
50             print(f"Error response (non-JSON): {e.response.text}")
51
52
200Response
Copy
1{
2  "friendship_report": [
3    "At first this can manifest as criticism of their efforts. You feel that you're being helpful and offering practical advice, but to your buddy it feels as if you don't like their work at all, nor do you have faith that they will be successful in these endeavors. You'll send out disapproving signals which your buddy will pick up immediately. So stop trying to push the relationship in a direction it may or may not naturally take; lighten up, and concentrate on nothing more than enjoying your friend's company.",
4    "You naturally take a practical view of life; you trust in the things that you can see, touch, feel and otherwise count on in a tangible way. You believe in hard work and responsibility, and anything more abstract than that seems out-and-out silly to you. But there's a whole other side of things  the intangible, the instinctive, even the psychic  and your pal will have a good grasp on these concepts.",
5    "It's up to you which of those possibilities comes true.",
6    "There is a very real and deep sense of support and understanding that will exist between you almost from the start. You'll instinctively respond to your friend in a positive way, and they'll feel as if they're completely accepted and well-liked by you. There will be an open flow of communication that runs between you  and it won't necessarily always be verbal.",
7    "Your highly energetic interactions will be fast-paced and fun, and you'll both have a great time ribbing and challenging each other. Just try to be sensitive when you're pushing too hard, or giving advice that simply doesn't apply to the person your friend is or the ambitions they hold.",
8    "You'll bring out each other's best qualities and support each other in being your kindest, most generous selves. You'll be able to talk openly with each other about anything that comes up in your lives and you'll understand each other well. Through this openness you share, you'll grow to understand yourselves better, which will aid in your careers, your personal relationships and all other areas of your lives.",
9    "The two of you will be able to join forces and accomplish almost anything you'll put your minds to. Together you'll blast away whatever stands in your way and come through unscathed on the other side. This strength and determination could be put to good use in a variety of ways. You'll meet problems creatively and head-on, which will be a great influence for your friendship  but it could also be turned outward, for the good of the rest of the world. Any humanitarian urges that you two might share will find action through this aspect's influence. Your deepest spiritual beliefs could also find expression in this friendship. Basically, what you choose to do is up to the two of you. You'll work as a creative team, and together you could move mountains!",
10    "There will be a serious mismatch in your energies that will sometimes create friction between you, but at other times things could be really exciting. Your friend will sometimes irritate you and sometimes attract you. In fact, you're likely to find them to be pretty offensive, but as much as you may not like it, they'll also turn you on."
11  ]
12}

Request Headers

Authorization

string

required

Basic Authorization via header

Accept-Language

string

Preferred language for the response content

Properties

English - en

Request Parameters

p_day

int

required

Day of birth, eg: 10

p_month

int

required

Month of birth, eg: 5

p_year

int

required

Year of birth, eg: 1990

p_hour

int

required

Hour of birth, eg: 11

p_min

int

required

Minute of birth, eg: 55

p_lat

float

required

Latitude, eg: 19.2056

p_lon

float

required

Longitude, eg: 25.2056

p_tzone

float

required

Timezone, eg: 5.5

s_day

int

required

Day of birth, eg: 10

s_month

int

required

Month of birth, eg: 5

s_year

int

required

Year of birth, eg: 1990

s_hour

int

required

Hour of birth, eg: 11

s_min

int

required

Minute of birth, eg: 55

s_lat

float

required

Latitude, eg: 19.2056

s_lon

float

required

Longitude, eg: 25.2056

s_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.