Copy page
Copy page as Markdown for LLMs
Retrieve detailed Eclipse insights, including the astrological impact, timing, and influence of Solar and Lunar eclipses based on the native’s birth details.
These language codes are supported by this API. Use them by passing the lan parameter in the request body.
| Code | Language |
|---|---|
| en | English |
| hi | Hindi |
| pt | Portuguese |
| fr | French |
| de | German |
| ja | Japanese |
| tr | Turkish |
| ru | Russian |
| it | Italian |
| es | Spanish |
| nl | Dutch |
| pl | Polish |
POST https://astroapi-8.divineapi.com/western-api/v1/eclipseReturns Eclipse details in the response.
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Your API Access Token (Bearer {token}) |
| Key | Type | Example Value | Description |
|---|---|---|---|
| api_key* | Text | your API Key | Your Divine API key |
| full_name* | Text | Rahul Kumar | Person's full name |
| day* | Text | 24 | Birth day |
| month* | Text | 05 | Birth month |
| year* | Text | 2023 | Birth year |
| hour* | Text | 14 | Birth hour |
| min* | Text | 40 | Birth minute |
| sec* | Text | 43 | Birth second |
| gender* | Text | male | Gender |
| place* | Text | New Delhi, India | Birth place |
| lat* | Text | 28.7041 | Latitude |
| lon* | Text | 77.1025 | Longitude |
| tzone* | Text | 5.5 | Timezone in decimal format |
{
"status": "success",
"code": 200,
"message": "Request successful",
"data": [
{
"eclipse": "Lunar",
"datetime": "2023-05-05 12:04:00",
"orb": 11.37
}
]
}Below are example implementations in various programming environments.
curl --location 'https://astroapi-8.divineapi.com/western-api/v1/eclipse' \
--header 'Authorization: Bearer your API Access Token' \
--form 'api_key="your API Key"' \
--form 'full_name="Rahul Kumar"' \
--form 'day="24"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'hour="14"' \
--form 'min="40"' \
--form 'sec="43"' \
--form 'gender="male"' \
--form 'place="New Delhi, India"' \
--form 'lat="28.7041"' \
--form 'lon="77.1025"' \
--form 'tzone="5.5"'var request = require('request');
var options = {
'method': 'POST',
'url': 'https://astroapi-8.divineapi.com/western-api/v1/eclipse',
'headers': {
'Authorization': 'Bearer your API Access Token'
},
formData: {
'api_key': 'your API Key',
'full_name': 'Rahul Kumar',
'day': '24',
'month': '05',
'year': '2023',
'hour': '14',
'min': '40',
'sec': '43',
'gender': 'male',
'place': 'New Delhi, India',
'lat': '28.7041',
'lon': '77.1025',
'tzone': '5.5'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var form = new FormData();
form.append("api_key", "your API Key");
form.append("full_name", "Rahul Kumar");
form.append("day", "24");
form.append("month", "05");
form.append("year", "2023");
form.append("hour", "14");
form.append("min", "40");
form.append("sec", "43");
form.append("gender", "male");
form.append("place", "New Delhi, India");
form.append("lat", "28.7041");
form.append("lon", "77.1025");
form.append("tzone", "5.5");
var settings = {
"url": "https://astroapi-8.divineapi.com/western-api/v1/eclipse",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer your API Access Token"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});import requests
url = "https://astroapi-8.divineapi.com/western-api/v1/eclipse"
payload = {'api_key': 'your API Key',
'full_name': 'Rahul Kumar',
'day': '24',
'month': '05',
'year': '2023',
'hour': '14',
'min': '40',
'sec': '43',
'gender': 'male',
'place': 'New Delhi, India',
'lat': '28.7041',
'lon': '77.1025',
'tzone': '5.5'}
files=[
]
headers = {
'Authorization': 'Bearer your API Access Token'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Use Authorization: Bearer {Your Auth Token} and {Your API Key} securely; never expose them in client-side code.
Provide date, time, and coordinates in correct numeric formats; use decimal timezone values (e.g., 5.5).
Check HTTP status codes, log responses, and handle 4xx/5xx errors appropriately.
Default language is lan=en.
Test all endpoints via Postman first and always use HTTPS for secure communication.