search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Month Surya Nakshatra List

The Month Surya Nakshatra List API provides Surya (Sun) Nakshatra transitions for a given period based on precise astronomical calculations.


Endpoint

POST https://astroapi-8.divineapi.com/indian-api/v1/month-surya-nakshatra-list

Returns Surya Nakshatra details for the specified date and month context.


Headers

NameTypeDescription
Authorization*Stringyour API Access Token, e.g., Bearer {token}

Request Body

NameTypeDescription
api_key*StringYour API key
day*IntegerDay, e.g., 24
month*IntegerMonth number, e.g., 05
year*IntegerYear, e.g., 2023
place*StringPlace name, e.g., New Delhi
lat*FloatLatitude, e.g., 28.6139
lon*FloatLongitude, e.g., 77.2090
tzone*FloatTimezone, e.g., 5.5
lan*StringLanguage code  en

200: OK Month Surya Nakshatra List fetched successfully

{
    "status": "success",
    "code": 200,
    "message": "Request successful",
    "data": [
        {
            "nakshatra_no": 2,
            "nakshatra": "Bharani",
            "start_time": "2023-04-28 06:41:00",
            "end_time": "2023-05-12 00:54:00"
        },
        {
            "nakshatra_no": 3,
            "nakshatra": "Krittika",
            "start_time": "2023-05-12 00:54:00",
            "end_time": "2023-05-25 21:00:00"
        },
        {
            "nakshatra_no": 4,
            "nakshatra": "Rohini",
            "start_time": "2023-05-25 21:00:00",
            "end_time": "2023-06-08 18:54:00"
        }
    ]
}

Example Implementations

Below are sample integrations for common platforms.


cURL

curl --location 'https://astroapi-8.divineapi.com/indian-api/v1/month-surya-nakshatra-list' \
--header 'Authorization: Bearer {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"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-8.divineapi.com/indian-api/v1/month-surya-nakshatra-list',
  'headers': {
    'Authorization': 'Bearer {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-8.divineapi.com/indian-api/v1/month-surya-nakshatra-list",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {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-8.divineapi.com/indian-api/v1/month-surya-nakshatra-list"

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'}
files=[

]
headers = {
  'Authorization': 'Bearer {token}'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

Implementation Notes

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.

Default language is lan=en if not explicitly provided.

Test via Postman before production use and always use HTTPS for secure communication.