AstrologyAPI

Use access token to call astrology api.

Learn More

Basic Panchang for sunrise

POSThttps://json.astrologyapi.com/v1/basic_panchang/sunrise
Copy

The bacis_panchang/sunrise API provides information about the sunrise time along with other details such as the day, tithi, yog, nakshatra, and karan. The response includes the time of the sunrise and sunset for the given day.

POST/basic_panchang/sunrise
Copy
1curl --location 'https://json.astrologyapi.com/v1/basic_panchang/sunrise' \
2  --header 'Content-Type: application/json' \
3  --header 'x-astrologyapi-key: <YOUR_ACCESS_TOKEN>' \
4  --data '{
5    "day": 10,
6    "month": 5,
7    "year": 1990,
8    "hour": 19,
9    "min": 55,
10    "lat": 19.2056,
11    "lon": 25.2056,
12    "tzone": 5.5
13}'
14
200Response
Copy
1{
2  "day": "Tuesday",
3  "tithi": "Krishna Dashami",
4  "nakshatra": "Ashwini",
5  "yog": "Atigand",
6  "karan": "Vanija",
7  "sunrise": "05:10:07",
8  "sunset": "18:54:25",
9  "vedic_sunrise": "05:14:15",
10  "vedic_sunset": "18:50:17"
11}

Request Headers

x-astrologyapi-key

string

required

API Access Token to authenticate requests. Send your access token in this custom header.

Accept-Language

string

Preferred language for the response content

Properties

English - enHindi - hiMarathi - maBengali - bnTamil - taTelugu - teMalayalam - mlKannada - kn

Request Body (JSON)

day

int

required

Date of birth, eg: 10

month

int

required

Month of birth, eg: 5

year

int

required

Year of birth, eg: 1990

hour

int

required

Hour of birth, eg: 19

min

int

required

Minute of birth, eg: 55

lat

float

required

Latitude, eg: 19.2056

lon

float

required

Longitude, eg: 25.2056

tzone

float

required

Timezone, eg: 5.5

Request Description

1. Panchang at specified date and time
Here, following APIs are used and date and time along with latitude, longitude and timezone are expected -

Errors

400
Bad Request

Something is wrong with your request format or parameters.

401
Unauthorized

Your API key is missing or invalid.

403
Forbidden

You don't have permission to access this specific resource.

404
Not Found

The API endpoint you're trying to reach doesn't exist.

500
Internal Server Error

Our server is having a temporary glitch.