AstrologyAPI

Varshaphal Harsha Bala

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

The API varshaphal_harsha_bala calculates the different types of strengths or "bala" of a person's natal chart for a particular year. The response includes the stana bala, ucchaswachetri bala, gender bala, dinratri bala, and total bala for each of the seven planets considered in Vedic astrology.

POST/varshaphal_harsha_bala
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/varshaphal_harsha_bala"
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        "varshphal_year": 1990
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  "stana_bala": [
3    0,
4    0,
5    0,
6    0,
7    0,
8    0,
9    0
10  ],
11  "ucchaswachetri_bala": [
12    0,
13    0,
14    0,
15    0,
16    0,
17    5,
18    0
19  ],
20  "gender_bala": [
21    5,
22    5,
23    5,
24    5,
25    5,
26    0,
27    5
28  ],
29  "dinratri_bala": [
30    5,
31    0,
32    5,
33    0,
34    5,
35    0,
36    0
37  ],
38  "total_bala": [
39    10,
40    5,
41    10,
42    5,
43    10,
44    5,
45    5
46  ]
47}

Request Headers

Authorization

string

required

Basic Authorization via header

Accept-Language

string

Preferred language for the response content

Properties

English - enHindi - hiMarathi - maBengali - bnTamil - taTelugu - teMalayalam - mlKannada - kn

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

varshphal_year

int

required

Varshphal year, eg: 1990

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.