Copy page
Copy page as Markdown for LLMs
The Find Surya Nakshatra API returns the Sun’s Nakshatra (constellation) and its pada for a given date, time, and location, as per Indian Astrology. This is useful for daily panchang modules, horoscope generators, and astrology dashboards that need to show the solar nakshatra active on a specific day.
For a visual walkthrough on how to test this API using Postman, refer to the official guide:
Step by Step Surya Nakshatra API Postman Testing Integration
https://support.divineapi.com/indian-astrology-apis/testing-panchang-api-find-surya-nakshatra-api-using-postman
This API supports multiple Indian languages. You can get the response in a specific language by sending the lan field in the 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: Pass lan in the request body to switch languages. Default is en.
POST https://astroapi-1.divineapi.com/indian-api/v2/find-surya-nakshatra
This endpoint returns Surya (Sun) Nakshatra details for the given date and location.
| Name | Type | Description |
|---|---|---|
| Authorization | String | Your API Access Token. Example: Bearer {token} |
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes | Your Divine 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 offset, e.g. 5.5. See: https://developers.divineapi.com/divine-api/understanding-time-zones-a-comprehensive-guide |
| lan | String | No | Language code from the supported list. Default is en. |
{
"success": 1,
"data": {
"sunrise": "2025-07-23 05:58:11",
"sunset": "2025-07-23 20:46:48",
"nakshatras": {
"nakshatra_list": [
"Pushya"
],
"nakshatra_pada": [
{
"nak_name": "Pushya",
"lord": "Saturn",
"deity": "Brihaspati",
"element": "Jala",
"symbol": "Cow's Udder",
"syllables": "हु, हे, हो, ड",
"pursuit": "Dharma",
"gana": "Dev",
"direction": "East",
"guna": "Sattavik",
"body_part": "Mouth, Face, connections to facial expressions, Bones, Joints, Elbows",
"color": "Red/Black",
"nak_number": 8,
"nak_pada": 1,
"end_time": "2025-07-23 07:38:11",
"end_time_seprated": {
"day": "23",
"month": "07",
"year": "2025",
"hour": "07",
"minute": "38",
"second": "11"
}
},
{
"nak_name": "Pushya",
"lord": "Saturn",
"deity": "Brihaspati",
"element": "Jala",
"symbol": "Cow's Udder",
"syllables": "हु, हे, हो, ड",
"pursuit": "Dharma",
"gana": "Dev",
"direction": "East",
"guna": "Sattavik",
"body_part": "Mouth, Face, connections to facial expressions, Bones, Joints, Elbows",
"color": "Red/Black",
"nak_number": 8,
"nak_pada": 2,
"end_time": ""
}
]
}
}
}Below are example implementations in various programming environments.
curl --location 'https://astroapi-1.divineapi.com/indian-api/v2/find-surya-nakshatra' \
--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"'
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://astroapi-1.divineapi.com/indian-api/v2/find-surya-nakshatra',
'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);
});
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-1.divineapi.com/indian-api/v2/find-surya-nakshatra",
"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-1.divineapi.com/indian-api/v2/find-surya-nakshatra"
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)
Always send both Authorization: Bearer {Your Auth Token} and api_key in the same request.
Make sure latitude, longitude, and timezone match the user/location for correct Surya Nakshatra calculation.
The API returns the list of Surya Nakshatra and individual padas with rich metadata (deity, lord, element, guna, direction, body part, color).
Use the lan parameter to localize the output.
All requests must be made over HTTPS.