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 Panchak Rahita API

The Find Panchak Rahita API helps you determine time intervals that are free from, or affected by, various types of Panchak (such as Mrityu, Agni, Raja, Chora, Roga), based on Indian Astrology. This is especially useful for scheduling activities where Panchak dosha is traditionally avoided, such as house-related rituals, travel, or sensitive tasks.


Step-by-Step Find Panchak Rahita API Postman Testing Integration

You can follow the official guide to test this API using Postman:

Step by Step Find Panchak Rahita API Postman Testing Integration
https://support.divineapi.com/indian-astrology-apis/testing-panchang-api-find-panchak-rahita-api-using-postman


Supported Language Codes

You can get the response in multiple Indian languages by passing the lan parameter.

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

Note: If lan is not provided, the API defaults to en.


API Endpoint

POST https://astroapi-3.divineapi.com/indian-api/v1/panchak-rahita

This endpoint returns a list of Panchak intervals for the given date and location, with start and end timestamps and the type of Panchak.


Headers

NameTypeDescription
Authorization*StringYour API Access Token. Example: Bearer {token}

Request Body

NameTypeRequiredDescription
api_keyStringYesYour DivineAPI key.
dayIntegerYesDay of Panchang. Example: 24.
monthIntegerYesMonth of Panchang. Example: 05.
yearIntegerYesYear of Panchang. Example: 2023.
placeStringNoPlace name. Example: New Delhi.
latFloatYesLatitude of the place. Example: 28.6139.
lonFloatYesLongitude of the place. Example: 77.2090.
tzoneFloatYesTimezone offset. Example: 5.5. See the timezone guide at https://developers.divineapi.com/divine-api/understanding-time-zones-a-comprehensive-guide
lanStringNoResponse language code. Default is en.

200: OK Panchak Rahita fetched successfully

{
    "success": 1,
    "data": {
        "date": "2023-05-24",
        "sunrise": "2023-05-24 05:25:56",
        "sunset": "2023-05-24 19:10:28",
        "panchak_rahita": [
            {
                "panchak": "Good Panchak",
                "start_time": "2023-05-24 05:25:56",
                "end_time": "2023-05-24 06:54:56"
            },
            {
                "panchak": "Mrityu Panchak",
                "start_time": "2023-05-24 06:55:56",
                "end_time": "2023-05-24 09:09:56"
            },
            {
                "panchak": "Agni Panchak",
                "start_time": "2023-05-24 09:10:56",
                "end_time": "2023-05-24 11:29:56"
            },
            {
                "panchak": "Good Panchak",
                "start_time": "2023-05-24 11:30:56",
                "end_time": "2023-05-24 13:47:56"
            },
            {
                "panchak": "Raja Panchak",
                "start_time": "2023-05-24 13:48:56",
                "end_time": "2023-05-24 15:05:44"
            },
            {
                "panchak": "Good Panchak",
                "start_time": "2023-05-24 15:06:44",
                "end_time": "2023-05-24 16:03:56"
            },
            {
                "panchak": "Chora Panchak",
                "start_time": "2023-05-24 16:04:56",
                "end_time": "2023-05-24 18:22:56"
            },
            {
                "panchak": "Good Panchak",
                "start_time": "2023-05-24 18:23:56",
                "end_time": "2023-05-24 20:41:56"
            },
            {
                "panchak": "Roga Panchak",
                "start_time": "2023-05-24 20:42:56",
                "end_time": "2023-05-24 22:45:56"
            },
            {
                "panchak": "Good Panchak",
                "start_time": "2023-05-24 22:46:56",
                "end_time": "2023-05-25 00:27:56"
            },
            {
                "panchak": "Mrityu Panchak",
                "start_time": "2023-05-25 00:28:56",
                "end_time": "2023-05-25 01:55:56"
            },
            {
                "panchak": "Agni Panchak",
                "start_time": "2023-05-25 01:56:56",
                "end_time": "2023-05-25 03:00:44"
            },
            {
                "panchak": "Good Panchak",
                "start_time": "2023-05-25 03:01:44",
                "end_time": "2023-05-25 03:20:56"
            },
            {
                "panchak": "Mrityu Panchak",
                "start_time": "2023-05-25 03:21:56",
                "end_time": "2023-05-25 04:55:56"
            },
            {
                "panchak": "Agni Panchak",
                "start_time": "2023-05-25 04:56:56",
                "end_time": "2023-05-25 05:25:35"
            }
        ]
    }
}

Response Field Details

success
Indicates if the API call was successful. 1 means success.

data.date
Date for which the Panchak calculation is done.

data.sunrise / data.sunset
Location-specific sunrise and sunset times used for the Panchang computation.

data.panchak_rahita
An ordered list of time blocks during the day, each with:

panchak: The type of Panchak (for example, Good Panchak, Mrityu Panchak, Agni Panchak, Raja Panchak, Chora Panchak, Roga Panchak).

start_time: Start datetime of that Panchak influence.

end_time: End datetime of that Panchak influence.

This lets you filter or highlight time intervals that are suitable (often those marked as “Good Panchak”) and avoid the sensitive ones (like “Mrityu Panchak” or “Agni Panchak”) in your application.


Usage Notes

Both Authorization and api_key are required; the request will fail without either.

Accurate geolocation (lat, lon) and tzone are essential because Panchak timing is time and location dependent.

You can present only the non-dosha (Good Panchak) intervals to end users if your app’s purpose is to recommend safe windows.


Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-3.divineapi.com/indian-api/v1/panchak-rahita' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FzdHJvYXBpLTEuZGl2aW5lYXBpLmNvbS9hcGkvYXV0aC1hcGktcmVmcmVzaC10b2tlbiIsImlhdCI6MTY5OTI1NDAzOSwibmJmIjoxNjk5MjU0MjYxLCJqdGkiOiJBTG1OQ3BweW5aUHg2dnZGIiwic3ViIjoiMTM1MCJ9.TQM3mTq7FRt21uKMtXyPT5polqUsbzW5YRMwTHb587Q' \
--form 'api_key="861dc9bd7f4e7dd3cccd534d0ae2a2e9"' \
--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/panchak-rahita',
  '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/panchak-rahita",
  "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/panchak-rahita"

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)
st(url, headers=headers, data=payload)
print(response.text)

Implementation Recommendations

If your UI is meant for end users, highlight only the intervals where panchak is “Good Panchak”.

If your product is for astrologers or advanced users, display the full list, since each Panchak type has different implications.

Combine this API with daily Panchang, Tithi, Nakshatra, and Auspicious/ Inauspicious Timings APIs for a complete muhurta advisory system.