Rahu Kaal, Gulika Kaal, Yamaganda Kaal
Calculate the three inauspicious time periods for a given date and location. Rahu Kaal, Gulika Kaal (Mandi), and Yamaganda Kaal are avoided for starting auspicious activities. All three are based on dividing the day into 8 equal parts from sunrise to sunset.
Endpoint
POST /v1/astro/panchanga/rahu-kaal
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| date | string | Yes | Date in YYYY-MM-DD format |
| location | string | null | No | City name. Example: 'Mumbai' |
| latitude | number | null | No | |
| longitude | number | null | No | |
| timezone | string | null | No | IANA timezone string |
Example request
- curl
- Python
- TypeScript
curl -X POST "https://api.asterwise.com/v1/astro/panchanga/rahu-kaal" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"1990-05-15","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"}'
import asterwise
from asterwise.api.astrology_api import AstrologyApi
from asterwise.models.panchanga_ext_request import PanchangaExtRequest
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
request = PanchangaExtRequest(
date="1990-05-15",
latitude=28.6139,
longitude=77.209,
timezone="Asia/Kolkata",
)
with asterwise.ApiClient(configuration) as client:
api = AstrologyApi(client)
result = api.panchanga_rahu_kaal(panchanga_ext_request=request)
print(result)
import { createClient, createConfig, panchangaRahuKaal } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await panchangaRahuKaal({
client,
body: {
"date": "1990-05-15",
"latitude": 28.6139,
"longitude": 77.209,
"timezone": "Asia/Kolkata"
},
});
console.log(result.data);
Example response
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | True if the request succeeded |
| message | string | Human-readable status message |
| data | object | |
| data.date | string | Date for which Rahu Kaal is calculated (YYYY-MM-DD). |
| data.sunrise | string | Sunrise time in HH:MM local time. |
| data.sunset | string | Sunset time in HH:MM local time. |
| data.rahu_kaal | object | |
| data.rahu_kaal.start | string | Period start time in HH:MM local time. |
| data.rahu_kaal.end | string | Period end time in HH:MM local time. |
| data.rahu_kaal.duration_minutes | integer | Duration of the period in minutes. |
| data.rahu_kaal.is_active | boolean | True if this period is currently active. |
| data.gulika_kaal | object | |
| data.gulika_kaal.start | string | Period start time in HH:MM local time. |
| data.gulika_kaal.end | string | Period end time in HH:MM local time. |
| data.gulika_kaal.duration_minutes | integer | Duration of the period in minutes. |
| data.gulika_kaal.is_active | boolean | True if this period is currently active. |
| data.yamaganda_kaal | object | |
| data.yamaganda_kaal.start | string | Period start time in HH:MM local time. |
| data.yamaganda_kaal.end | string | Period end time in HH:MM local time. |
| data.yamaganda_kaal.duration_minutes | integer | Duration of the period in minutes. |
| data.yamaganda_kaal.is_active | boolean | True if this period is currently active. |
Errors
| Code | Description | Reference |
|---|---|---|
| authentication_failed | Missing or invalid API key. | authentication_failed |
| ephemeris_unavailable | Upstream ephemeris service error. | ephemeris_unavailable |
| insufficient_tier | API key tier does not include this endpoint. | insufficient_tier |
| internal_error | Unexpected server error. | internal_error |
| ip_rate_limit_exceeded | Too many requests in a short window. | ip_rate_limit_exceeded |
| payload_too_large | Request body exceeds the size limit. | payload_too_large |
| resource_not_found | Referenced resource was not found. | resource_not_found |
| validation_error | Request body failed schema validation. | validation_error |