Hora API
The Hora API is part of the Muhurat Finder suite and returns the planetary horas for a specific date, as per Vedic astrology. For the requested day it lists the day and night horas, each ruled by a planet, with its nature and precise start and end times.
Supported Language Codes
This API supports multiple languages. You can get the response in a different language by passing the lan field in the request body.
Reference Article:
https://support.divineapi.com/general-api-support/translating-an-indian-vedic-apis-into-a-different-language
| Code | Language |
|---|---|
| en | English |
| hi | Hindi |
| bn | Bengali |
| ma | Marathi |
| tm | Tamil |
| tl | Telugu |
| ml | Malayalam |
| kn | Kannada |
Guide: If lan is not sent, the default response language is en.
API Endpoint
POST https://astroapi-3.divineapi.com/indian-api/v1/muhurat/hora
This endpoint returns the planetary horas for the given date, for both the day and the night.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization | String | Your API Access Token. Example: Bearer {token} |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes | Your API key. |
| day | Integer | Yes | Day of Panchang, e.g. 24. |
| month | Integer | Yes | Month of Panchang, e.g. 05. |
| year | Integer | Yes | Year of Panchang, e.g. 2023. |
| place | String | No | Place name, e.g. New Delhi. |
| lat | Float | Yes | Latitude, e.g. 28.6139. |
| lon | Float | Yes | Longitude, e.g. 77.2090. |
| tzone | Float | Yes | Timezone, e.g. 5.5. See: https://developers.divineapi.com/divine-api/understanding-time-zones-a-comprehensive-guide |
| lan | String | No | Language code as per supported list. Default is en. |
200: OK Horas fetched successfully
{
"success": 1,
"data": {
"muhurat_type": "hora",
"date": "2023-05-24",
"weekday": "Wednesday",
"sunrise": "2023-05-24 05:26",
"sunset": "2023-05-24 19:09",
"day_horas": [
{
"position": 1,
"planet": "Mercury",
"nature": "Quick",
"hora_start": "2023-05-24 05:26",
"hora_end": "2023-05-24 06:34"
},
{
"position": 2,
"planet": "Moon",
"nature": "Gentle",
"hora_start": "2023-05-24 06:34",
"hora_end": "2023-05-24 07:43"
},
{
"position": 3,
"planet": "Saturn",
"nature": "Sluggish",
"hora_start": "2023-05-24 07:43",
"hora_end": "2023-05-24 08:52"
},
{
"position": 4,
"planet": "Jupiter",
"nature": "Fruitful",
"hora_start": "2023-05-24 08:52",
"hora_end": "2023-05-24 10:00"
},
{
"position": 5,
"planet": "Mars",
"nature": "Aggressive",
"hora_start": "2023-05-24 10:00",
"hora_end": "2023-05-24 11:09"
},
{
"position": 6,
"planet": "Sun",
"nature": "Vigorous",
"hora_start": "2023-05-24 11:09",
"hora_end": "2023-05-24 12:18"
},
{
"position": 7,
"planet": "Venus",
"nature": "Beneficial",
"hora_start": "2023-05-24 12:18",
"hora_end": "2023-05-24 13:26"
},
{
"position": 8,
"planet": "Mercury",
"nature": "Quick",
"hora_start": "2023-05-24 13:26",
"hora_end": "2023-05-24 14:35"
},
{
"position": 9,
"planet": "Moon",
"nature": "Gentle",
"hora_start": "2023-05-24 14:35",
"hora_end": "2023-05-24 15:44"
},
{
"position": 10,
"planet": "Saturn",
"nature": "Sluggish",
"hora_start": "2023-05-24 15:44",
"hora_end": "2023-05-24 16:52"
},
{
"position": 11,
"planet": "Jupiter",
"nature": "Fruitful",
"hora_start": "2023-05-24 16:52",
"hora_end": "2023-05-24 18:01"
},
{
"position": 12,
"planet": "Mars",
"nature": "Aggressive",
"hora_start": "2023-05-24 18:01",
"hora_end": "2023-05-24 19:09"
}
],
"night_horas": [
{
"position": 1,
"planet": "Sun",
"nature": "Vigorous",
"hora_start": "2023-05-24 19:09",
"hora_end": "2023-05-24 20:01"
},
{
"position": 2,
"planet": "Venus",
"nature": "Beneficial",
"hora_start": "2023-05-24 20:01",
"hora_end": "2023-05-24 20:52"
},
{
"position": 3,
"planet": "Mercury",
"nature": "Quick",
"hora_start": "2023-05-24 20:52",
"hora_end": "2023-05-24 21:43"
},
{
"position": 4,
"planet": "Moon",
"nature": "Gentle",
"hora_start": "2023-05-24 21:43",
"hora_end": "2023-05-24 22:35"
},
{
"position": 5,
"planet": "Saturn",
"nature": "Sluggish",
"hora_start": "2023-05-24 22:35",
"hora_end": "2023-05-24 23:26"
},
{
"position": 6,
"planet": "Jupiter",
"nature": "Fruitful",
"hora_start": "2023-05-24 23:26",
"hora_end": "2023-05-25 00:17"
},
{
"position": 7,
"planet": "Mars",
"nature": "Aggressive",
"hora_start": "2023-05-25 00:17",
"hora_end": "2023-05-25 01:09"
},
{
"position": 8,
"planet": "Sun",
"nature": "Vigorous",
"hora_start": "2023-05-25 01:09",
"hora_end": "2023-05-25 02:00"
},
{
"position": 9,
"planet": "Venus",
"nature": "Beneficial",
"hora_start": "2023-05-25 02:00",
"hora_end": "2023-05-25 02:51"
},
{
"position": 10,
"planet": "Mercury",
"nature": "Quick",
"hora_start": "2023-05-25 02:51",
"hora_end": "2023-05-25 03:43"
},
{
"position": 11,
"planet": "Moon",
"nature": "Gentle",
"hora_start": "2023-05-25 03:43",
"hora_end": "2023-05-25 04:34"
},
{
"position": 12,
"planet": "Saturn",
"nature": "Sluggish",
"hora_start": "2023-05-25 04:34",
"hora_end": "2023-05-25 05:25"
}
]
}
}Notes on Response Fields
muhurat_type: The muhurat type, here hora.
date, weekday, sunrise and sunset: The day being analysed and its sunrise and sunset reference times.
day_horas and night_horas: The planetary horas for the day and the night. Each hora includes its position, ruling planet, the nature of the hora, and its hora_start and hora_end times.
Example Code Implementations
Below are example implementations in various programming environments.
cURL
curl --location 'https://astroapi-3.divineapi.com/indian-api/v1/muhurat/hora' \
--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/muhurat/hora',
'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/muhurat/hora",
"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/muhurat/hora"
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 send both Authorization: Bearer {Your Auth Token} and api_key in every request.
Make sure lat, lon, and tzone match the user’s actual location, since auspicious timings are location-specific.
Some fields may return empty arrays ([]) for certain dates; handle this gracefully in your UI.
Always use HTTPS for secure communication.
Use the lan parameter to localize the auspicious timing labels for your target audience.