AstrologyAPI

Kal Sarpa Dosha

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

The kalsarpa_details API provides information about the presence and type of KalSarpa Dosha in a horoscope and its effects. The response includes details such as the type of KalSarpa Dosha present, the house in which it is located, and its effects on various aspects of the native's life such as belief in religion, hurdles in life, career, foreign travel, health, family, and legal matters.

POST/kalsarpa_details
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/kalsarpa_details"
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    }
21
22headers = {
23    'x-astrologyapi-key': api_key,
24    'Content-Type': 'application/json'
25    # Add 'Accept-Language': '<language_code>' if needed
26}
27
28try:
29    response = requests.post(api_url, headers=headers, json=data)
30    response.raise_for_status()  # Raise an exception for bad status codes (4xx or 5xx)
31
32    # Process the response
33    response_data = response.json()
34    print(json.dumps(response_data, indent=4))
35
36except requests.exceptions.RequestException as e:
37    print(f"Error making API request: {e}")
38    if hasattr(e, 'response') and e.response is not None:
39        try:
40            print(f"Error response: {e.response.json()}")
41        except json.JSONDecodeError:
42             print(f"Error response (non-JSON): {e.response.text}")
43
44
200Response
Copy
1{
2  "present": true,
3  "type": "Full Ascending",
4  "one_line": "You have ascending kalsarpa dosha direction, which is treated as powerful. The KalSarpa Dosha is having full effect in your horoscope.",
5  "name": "Ghatak",
6  "report": {
7    "house_id": 10,
8    "report": "<p>In your horoscope the Ghaatak Kaal Sarp Yog is present. Due to this reason the native lives away from his parents since birth. The native does not get the bliss of parents. The native suffers due to the separation from grandfather/grandmother (paternal or maternal). The married life is painful and disturbed. The children of the native may remain ill causing anxiety and loss to him. The family life remains disturbed; peace and happiness remain absent. His near relatives do not regard him in high esteem.</p>\n\n<p>There are hurdles in life and native has to struggle for moving ahead. The native could suffer due to suspension in job. In spite of hard work the native does not get good results in his business or job. The native may have conflicts with partners in business or there may be loss in partnership.</p>\n\n<p>The enemies of the native hatch conspiracies against him and try to cause harm. The friends of the native try to deceive him again and again. Due to Kaal Sarp Yog the native suffers from state and has differences with government officials. The position of the native is like a king sometimes or like a pauper sometimes.</p>\n\n<p>Due to Kaal Sarp Yog the native suffers from diseases or injury that cause loss of money and the native may suffer due to debts. The worries and mental unrest do not leave the native due to one reason or other. However the native also gets a miraculous time in life when he gets acclaim.</p>"
9  }
10}

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

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.