search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Find Inauspicious Timings API

The Find Inauspicious Timings API helps identify periods considered unfavorable in Vedic astrology, allowing users to plan important activities by avoiding these sensitive windows. It provides detailed information about planetary influences such as Rahu Kaal, Yamaganda, Gulika Kaal, and other yoga's that traditionally signify caution. The timings are calculated precisely based on the user’s location and time-zone.


Step-by-Step Find Inauspicious Timings API Postman Testing Integration

For a complete, illustrated walkthrough on testing this API via Postman, refer to the official documentation:

Step by Step Find Inauspicious Timings API Postman Testing Integration
https://support.divineapi.com/indian-astrology-apis/testing-panchang-api-find-inauspicious-timings-api-using-postman


Supported Language Codes

You can retrieve the response in multiple Indian languages by passing the lan parameter in the request body.

Reference Article:
https://support.divineapi.com/general-api-support/translating-an-indian-vedic-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada

Guide:
If the lan field is not specified, the API response defaults to English (en).


API Endpoint

POST https://astroapi-3.divineapi.com/indian-api/v1/inauspicious-timings

This endpoint returns start and end times of inauspicious periods for the provided date and location.


Headers

NameTypeDescription
AuthorizationStringYour API Access Token. Example: Bearer {token}

Request Body

NameTypeRequiredDescription
api_keyStringYesYour Divine API key.
dayIntegerYesDay of Panchang, e.g., 24.
monthIntegerYesMonth of Panchang, e.g., 05.
yearIntegerYesYear of Panchang, e.g., 2023.
placeStringNoLocation name, e.g., New Delhi.
latFloatYesLatitude, e.g., 28.6139.
lonFloatYesLongitude, e.g., 77.2090.
tzoneFloatYesTimezone offset, e.g., 5.5. Refer: https://developers.divineapi.com/divine-api/understanding-time-zones-a-comprehensive-guide
lanStringNoLanguage code as per the supported list. Default is en.

200: OK Inauspicious Timings fetched successfully 

{
    "success": 1,
    "data": {
        "date": "2023-05-24",
        "sunrise": "2024-05-01 05:25:56",
        "sunset": "2023-05-24 19:10:28",
        "rahu_kaal": {
            "start_time": "2023-05-24 12:18:12",
            "end_time": "2023-05-24 14:01:16"
        },
        "gulkai_kaal": {
            "start_time": "2023-05-24 10:35:08",
            "end_time": "2023-05-24 12:18:12"
        },
        "yamaganda": {
            "start_time": "2023-05-24 07:09:00",
            "end_time": "2023-05-24 08:52:04"
        },
        "baana": [
            {
                "sign": "Roga",
                "start_time": "2023-05-24 05:25:56",
                "end_time": "2023-05-24 20:00:56"
            }
        ],
        "panchaka": [],
        "varjyam": {
            "start_time": "2023-05-25 00:01:44",
            "end_time": "2023-05-25 01:47:21"
        },
        "dur_muhurtam": [
            {
                "start_time": "2023-05-24 11:50:56",
                "end_time": "2023-05-24 12:45:56"
            }
        ],
        "hutashana_yoga": [],
        "visha_yoga": [],
        "yamaghata_yoga": [],
        "dagdha_yoga": [],
        "samvartaka_yoga": [],
        "kakracha_yoga": [],
        "mrityu_yoga": [],
        "vidaal_yoga": [],
        "aadal_yoga": {
            "start_time": "2023-05-24 15:06:44",
            "end_time": "2023-05-25 05:25:35"
        },
        "vidaal_yoga_detailed": [],
        "aadal_yoga_detailed": [
            {
                "start_time": "2023-05-24 15:06:44",
                "end_time": "2023-05-25 05:25:35"
            }
        ]
    }
}

Notes on Response Fields

rahu_kaal: A daily inauspicious period ruled by Rahu, typically avoided for auspicious tasks.

gulkai_kaal: Period linked to Gulika, considered unfavorable for new beginnings.

yamaganda: Duration influenced by Yama, symbolizing obstacles or difficulties.

baana: Represents specific influences (e.g., Roga indicates health issues) active during a defined period.

varjyam: Period of void influence, avoided for starting anything significant.

dur_muhurtam: Known as “bad muhurta,” signifying short intervals of inauspicious time during the day.

aadal_yoga and vidaal_yoga: Represent special planetary yogas linked to challenging outcomes; both detailed and summary versions are available.

Other yogas (like visha, yamaghata, mrityu, etc.) may appear as empty arrays depending on the date and planetary alignments.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-3.divineapi.com/indian-api/v1/inauspicious-timings' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'day="24"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'place="New Delhi"' \
--form 'lat="28.6139"' \
--form 'lon="77.2090"' \
--form 'tzone="5.5"' \
--form 'lan="en"'

Node.js

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-3.divineapi.com/indian-api/v1/inauspicious-timings',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': '{Your API Key}',
    'day': '24',
    'month': '05',
    'year': '2023',
    'Place': 'New Delhi',
    'lat': '28.6139',
    'lon': '77.2090',
    'tzone': '5.5',
    'lan': 'en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});


JavaScript (jQuery AJAX)

var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("day", "24");
form.append("month", "05");
form.append("year", "2023");
form.append("Place", "New Delhi");
form.append("lat", "28.6139");
form.append("lon", "77.2090");
form.append("tzone", "5.5");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-3.divineapi.com/indian-api/v1/inauspicious-timings",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {Your Auth Token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-3.divineapi.com/indian-api/v1/inauspicious-timings"

payload = {'api_key': '{Your API Key}',
'day': '24',
'month': '05',
'year': '2023',
'Place': 'New Delhi',
'lat': '28.6139',
'lon': '77.2090',
'tzone': '5.5',
'lan': 'en'}

headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Best Practices

Always include both the Authorization header (Bearer Token) and api_key in each request.

Provide accurate lat, lon, and tzone values to ensure correct local calculations.

Some yogas may not occur daily; handle empty arrays ([]) gracefully in your application.

Responses are sensitive to the local sunrise and sunset; inaccurate data may affect results.

Use HTTPS to maintain secure communication with the API.

For localization, set the lan parameter to return results in supported regional languages.