Copy page
Copy page as Markdown for LLMs
The Month Sunrise-Sunset List API provides day-wise sunrise and sunset timings for an entire month based on geographic location.
POST https://astroapi-8.divineapi.com/indian-api/v1/month-sunrise-sunset-list
Returns sunrise and sunset details for all days of the selected month.
| Name | Type | Description |
|---|---|---|
| Authorization* | String | your API Access Token, e.g., Bearer {token} |
| Name | Type | Description |
|---|---|---|
| api_key* | String | Your API key |
| month* | Integer | Month number, e.g., 05 |
| year* | Integer | Year, e.g., 2023 |
| place | String | Place name, e.g., New Delhi |
| lat* | Float | Latitude, e.g., 28.6139 |
| lon* | Float | Longitude, e.g., 77.2090 |
| tzone* | Float | Timezone, e.g., 5.5 |
{
"status": "success",
"code": 200,
"message": "Request successful",
"data": [
{
"date": "2023-05-01",
"sunrise": "2023-05-01 05:40:58",
"sunset": "2023-05-01 18:56:05"
},
{
"date": "2023-05-02",
"sunrise": "2023-05-02 05:40:07",
"sunset": "2023-05-02 18:56:41"
},
{
"date": "2023-05-03",
"sunrise": "2023-05-03 05:39:17",
"sunset": "2023-05-03 18:57:17"
},
{
"date": "2023-05-04",
"sunrise": "2023-05-04 05:38:29",
"sunset": "2023-05-04 18:57:53"
},
{
"date": "2023-05-05",
"sunrise": "2023-05-05 05:37:41",
"sunset": "2023-05-05 18:58:30"
},
{
"date": "2023-05-06",
"sunrise": "2023-05-06 05:36:55",
"sunset": "2023-05-06 18:59:06"
},
{
"date": "2023-05-07",
"sunrise": "2023-05-07 05:36:09",
"sunset": "2023-05-07 18:59:43"
},
{
"date": "2023-05-08",
"sunrise": "2023-05-08 05:35:25",
"sunset": "2023-05-08 19:00:19"
},
{
"date": "2023-05-09",
"sunrise": "2023-05-09 05:34:42",
"sunset": "2023-05-09 19:00:56"
},
{
"date": "2023-05-10",
"sunrise": "2023-05-10 05:33:59",
"sunset": "2023-05-10 19:01:32"
},
{
"date": "2023-05-11",
"sunrise": "2023-05-11 05:33:19",
"sunset": "2023-05-11 19:02:09"
},
{
"date": "2023-05-12",
"sunrise": "2023-05-12 05:32:39",
"sunset": "2023-05-12 19:02:45"
},
{
"date": "2023-05-13",
"sunrise": "2023-05-13 05:32:00",
"sunset": "2023-05-13 19:03:22"
},
{
"date": "2023-05-14",
"sunrise": "2023-05-14 05:31:23",
"sunset": "2023-05-14 19:03:58"
},
{
"date": "2023-05-15",
"sunrise": "2023-05-15 05:30:47",
"sunset": "2023-05-15 19:04:34"
},
{
"date": "2023-05-16",
"sunrise": "2023-05-16 05:30:12",
"sunset": "2023-05-16 19:05:11"
},
{
"date": "2023-05-16",
"sunrise": "2023-05-17 05:29:38",
"sunset": "2023-05-17 19:05:47"
},
{
"date": "2023-05-17",
"sunrise": "2023-05-18 05:29:06",
"sunset": "2023-05-18 19:06:23"
},
{
"date": "2023-05-18",
"sunrise": "2023-05-19 05:28:35",
"sunset": "2023-05-19 19:06:59"
},
{
"date": "2023-05-19",
"sunrise": "2023-05-20 05:28:05",
"sunset": "2023-05-20 19:07:34"
},
{
"date": "2023-05-20",
"sunrise": "2023-05-21 05:27:37",
"sunset": "2023-05-21 19:08:10"
},
{
"date": "2023-05-21",
"sunrise": "2023-05-22 05:27:10",
"sunset": "2023-05-22 19:08:45"
},
{
"date": "2023-05-22",
"sunrise": "2023-05-23 05:26:44",
"sunset": "2023-05-23 19:09:20"
},
{
"date": "2023-05-23",
"sunrise": "2023-05-24 05:26:20",
"sunset": "2023-05-24 19:09:54"
},
{
"date": "2023-05-24",
"sunrise": "2023-05-25 05:25:56",
"sunset": "2023-05-25 19:10:28"
},
{
"date": "2023-05-25",
"sunrise": "2023-05-26 05:25:35",
"sunset": "2023-05-26 19:11:02"
},
{
"date": "2023-05-26",
"sunrise": "2023-05-27 05:25:14",
"sunset": "2023-05-27 19:11:35"
},
{
"date": "2023-05-27",
"sunrise": "2023-05-28 05:24:55",
"sunset": "2023-05-28 19:12:08"
},
{
"date": "2023-05-28",
"sunrise": "2023-05-29 05:24:37",
"sunset": "2023-05-29 19:12:41"
},
{
"date": "2023-05-29",
"sunrise": "2023-05-30 05:24:21",
"sunset": "2023-05-30 19:13:13"
},
{
"date": "2023-05-30",
"sunrise": "2023-05-31 05:24:06",
"sunset": "2023-05-31 19:13:44"
},
{
"date": "2023-05-31",
"sunrise": "2023-06-01 05:23:52",
"sunset": "2023-06-01 19:14:15"
}
]
}Below are example implementations in various programming environments.
curl --location 'https://astroapi-8.divineapi.com/indian-api/v1/month-sunrise-sunset-list' \
--header 'Authorization: Bearer Your auth token' \
--form 'api_key="Your API key"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'place="New Delhi"' \
--form 'lat="28.6139"' \
--form 'lon="77.2090"' \
--form 'tzone="5.5"'var request = require('request');
var options = {
'method': 'POST',
'url': 'https://astroapi-8.divineapi.com/indian-api/v1/month-sunrise-sunset-list',
'headers': {
'Authorization': 'Bearer Your auth token'
},
formData: {
'api_key': 'Your API key',
'month': '05',
'year': '2023',
'place': 'New Delhi',
'lat': '28.6139',
'lon': '77.2090',
'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("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");
var settings = {
"url": "https://astroapi-8.divineapi.com/indian-api/v1/month-sunrise-sunset-list",
"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);
});import requests
url = "https://astroapi-8.divineapi.com/indian-api/v1/month-sunrise-sunset-list"
payload = {'api_key': 'Your API key',
'month': '05',
'year': '2023',
'place': 'New Delhi',
'lat': '28.6139',
'lon': '77.2090',
'tzone': '5.5'}
files=[
]
headers = {
'Authorization': 'Bearer Your auth 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 gracefully.
Test via Postman before production use and always use HTTPS for secure communication.