Muhurta — Auspicious Timing
Finds and ranks auspicious time windows for a specific event type. Scores each Choghadiya period using Choghadiya quality, Yoga, Vara (weekday), and Tithi. Returns top N ranked windows. Supported events: marriage, travel, business, griha_pravesh, naming_ceremony.
Endpoint
POST /v1/astro/muhurta
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| event_type | string | Yes | Type of event. One of: marriage, travel, business, griha_pravesh, naming_ceremony |
| from_date | string | Yes | Start date in YYYY-MM-DD format (inclusive) |
| to_date | string | Yes | End date in YYYY-MM-DD format (inclusive). Maximum 30 days from from_date. |
| latitude | number | Yes | Location latitude |
| longitude | number | Yes | Location longitude |
| timezone | string | Yes | IANA timezone string e.g. Asia/Kolkata |
| ayanamsa | string | No | lahiri | raman | kp | tropical |
| top_n | integer | No | Number of top windows to return (1-20) |
Example request
- curl
- Python
- TypeScript
curl -X POST "https://api.asterwise.com/v1/astro/muhurta" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"event_type":"marriage","from_date":"2026-01-01","to_date":"2026-01-07","latitude":28.6139,"longitude":77.209,"timezone":"Asia/Kolkata"}'
import asterwise
from asterwise.api.astrology_api import AstrologyApi
from asterwise.models.muhurta_request import MuhurtaRequest
configuration = asterwise.Configuration(
host="https://api.asterwise.com",
access_token="YOUR_API_KEY",
)
request = MuhurtaRequest(
event_type="marriage",
from_date="2026-01-01",
to_date="2026-01-07",
latitude=28.6139,
longitude=77.209,
timezone="Asia/Kolkata",
)
with asterwise.ApiClient(configuration) as client:
api = AstrologyApi(client)
result = api.muhurta(muhurta_request=request)
print(result)
import { createClient, createConfig, muhurta } from 'asterwise';
const client = createClient(createConfig({
baseUrl: 'https://api.asterwise.com',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
}));
const result = await muhurta({
client,
body: {
"event_type": "marriage",
"from_date": "2026-01-01",
"to_date": "2026-01-07",
"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.event_type | string | |
| data.from_date | string | |
| data.to_date | string | |
| data.timezone | string | |
| data.ayanamsa | string | |
| data.total_windows_evaluated | integer | |
| data.top_windows | array[object] | |
| data.top_windows[].date | string | |
| data.top_windows[].start | string | |
| data.top_windows[].end | string | |
| data.top_windows[].score | integer | |
| data.top_windows[].choghadiya | string | |
| data.top_windows[].choghadiya_type | string | |
| data.top_windows[].yoga | string | |
| data.top_windows[].vara | string | |
| data.top_windows[].vara_number | integer | |
| data.top_windows[].tithi | string | |
| data.top_windows[].tithi_number | integer | |
| data.top_windows[].reason | string | |
| data.top_windows[].is_rahu_kaal | boolean | |
| data.top_windows[].is_abhijit | boolean | |
| data.top_windows[].is_amrita_siddhi | boolean | |
| data.top_windows[].is_sarvartha_siddhi | boolean |
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 |