Quick Start

Note: Make sure you already have the API Key and Access Token required to make API requests. If not, you can generate a new API Key and Access Token by signing up for a trial subscription. You will also need the Postman tool which you can get free from here.

STEP 1

Initial Setup

  1. Open Postman on your computer.

  2. Select the HTTP method as POST. We are going to use this API - /find-nivas-and-shool

  3. Copy the full API URL and paste as below


STEP 2

Add Authentication

  1. Go to the Auth tab of Postman.

  2. Since all the APIs use Basic Auth, we will use Basic Auth from the Type select box.

  3. Now, enter the Access Token.


STEP 3

Add Request Parameters / Birth Details

  1. Now, go to the Body tab of Postman.

  2. Follow the request parameters from the API doc and add them one by one as shown below:


STEP 4

Send Request

Once you have set up everything as mentioned above, you can call the API using the Send button. You will receive a response in JSON format as shown below.


Get your API keys

Your API requests are authenticated using API key and Authorization Token. Any request that doesn't include an API key or Token will return an error.

You can generate an API Access Token from your Dashboard at any time.

Make your first request

To make your first request, send an authenticated request to the find nakshatra endpoint. This will return you data for nakshatra, which is nice.

Find nakshatra.

POST https://astro.divineapi.com/indian-api/v1/find-nakshatra

Returns nakshatra details in response.

Headers

NameTypeDescription

Authorization*

String

your API Access Token

eg: Bearer {token}

Request Body

NameTypeDescription

year*

Integer

year of panchang, eg: 2023

api_key*

String

your API key

month*

Integer

month of panchang, eg: 04

day*

Integer

day of panchang, eg: 04

tzone*

Float

timezone, eg: 5.5

lat*

Float

latitude, eg: 16.70499

lon*

Float

longitude, eg: 74.24325

{
    "success": 1,
    "data": {
        "sunrise": "2023-04-04 08:52:25",
        "sunset": "2023-04-05 00:03:50",
        "nakshatras": {
            "nakshatra_list": [
                "Purva Phalguni",
                "Uttara Phalguni"
            ],
            "nakshatra_pada": [
                {
                    "nak_name": "Purva Phalguni",
                    "lord": "Venus",
                    "deity": "Bhaga",
                    "element": "Jala",
                    "symbol": "Bed Stumps",
                    "syllables": "नो, टा, टी, टू",
                    "pursuit": "Kama",
                    "gana": "Manushya",
                    "direction": "North",
                    "guna": "Rajasik",
                    "body_part": "Sexual organs , Lips, Right hand",
                    "color": "Light Brown",
                    "nak_number": 11,
                    "nak_pada": 4,
                    "end_time": "2023-04-04 09:36:25",
                    "end_time_seprated": {
                        "day": "04",
                        "month": "04",
                        "year": "2023",
                        "hour": "09",
                        "minute": "36",
                        "second": "25"
                    }
                },
                {
                    "nak_name": "Uttara Phalguni",
                    "lord": "Sun",
                    "deity": "Aryaman",
                    "element": "Agni",
                    "symbol": "A Swinging Hammock",
                    "syllables": "टे, टो, पा, पी",
                    "pursuit": "Moksha",
                    "gana": "Manushya",
                    "direction": "East",
                    "guna": "Rajasik",
                    "body_part": "Sexual organs , Left hand",
                    "color": "Bright Blue",
                    "nak_number": 12,
                    "nak_pada": 1,
                    "end_time": "2023-04-04 16:05:25",
                    "end_time_seprated": {
                        "day": "04",
                        "month": "04",
                        "year": "2023",
                        "hour": "16",
                        "minute": "05",
                        "second": "25"
                    }
                },
                {
                    "nak_name": "Uttara Phalguni",
                    "lord": "Sun",
                    "deity": "Aryaman",
                    "element": "Agni",
                    "symbol": "A Swinging Hammock",
                    "syllables": "टे, टो, पा, पी",
                    "pursuit": "Moksha",
                    "gana": "Manushya",
                    "direction": "East",
                    "guna": "Rajasik",
                    "body_part": "Sexual organs , Left hand",
                    "color": "Bright Blue",
                    "nak_number": 12,
                    "nak_pada": 2,
                    "end_time": "2023-04-04 22:32:25",
                    "end_time_seprated": {
                        "day": "04",
                        "month": "04",
                        "year": "2023",
                        "hour": "22",
                        "minute": "32",
                        "second": "25"
                    }
                },
                {
                    "nak_name": "Uttara Phalguni",
                    "lord": "Sun",
                    "deity": "Aryaman",
                    "element": "Agni",
                    "symbol": "A Swinging Hammock",
                    "syllables": "टे, टो, पा, पी",
                    "pursuit": "Moksha",
                    "gana": "Manushya",
                    "direction": "East",
                    "guna": "Rajasik",
                    "body_part": "Sexual organs , Left hand",
                    "color": "Bright Blue",
                    "nak_number": 12,
                    "nak_pada": 3,
                    "end_time": "2023-04-05 04:58:25",
                    "end_time_seprated": {
                        "day": "05",
                        "month": "04",
                        "year": "2023",
                        "hour": "04",
                        "minute": "58",
                        "second": "25"
                    }
                },
                {
                    "nak_name": "Uttara Phalguni",
                    "lord": "Sun",
                    "deity": "Aryaman",
                    "element": "Agni",
                    "symbol": "A Swinging Hammock",
                    "syllables": "टे, टो, पा, पी",
                    "pursuit": "Moksha",
                    "gana": "Manushya",
                    "direction": "East",
                    "guna": "Rajasik",
                    "body_part": "Sexual organs , Left hand",
                    "color": "Bright Blue",
                    "nak_number": 12,
                    "nak_pada": 4,
                    "end_time": ""
                }
            ]
        }
    }
}

Note: The API find-nakshatra allows users to find past and future matches based on a specified date. The response includes a list of past and future matches, each with a start and end time.

Take a look at how you might call this method via cURL, NodeJS or JavaScript jQuery AJAX:

curl -X POST \
  https://astro.divineapi.com/indian-api/v1/find-nakshatra \
  -H 'authorization: Bearer {Your API Access Token}' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -F api_key={Your API Key}
  -F day=04 \
  -F month=04 \
  -F year=2023 \
  -F lat=74.24325 \
  -F lon=16.70499 \
  -F tzone=5.5 \
  

Last updated