1. Securing Your API Key
To start, you need an API key. Head over to https://divineapi.com/ and register to initiate your 7-day trial.
- Select the APIs you are interested in; you can change these selections at any time. You can add or remove APIs in the future.
- Click on checkout, fill out the sign-up form, and enter your payment details on the next page.
Your trial will begin immediately. You won't be charged during the trial period, and you can cancel anytime without incurring any charges.
- After logging in, your API key will be visible on your dashboard on the API Key page ( https://divineapi.com/api-keys)
2. Importing the Postman Collection
Import our Postman collection to facilitate your API testing:
- After logging into your Postman account:
- Open This link: https://documenter.getpostman.com/view/27195761/2sA3Qs8rfV
- Click “Run in Postman” and then select “Run in Web”.
- Select your workspace and then select ‘import’.
3. Configuring Your API Request
Once the collection is imported:
- Locate the "Planetary Position" API request.
- Ensure the method is set to POST.
- Use this request URL: https://astroapi-4.divineapi.com/western-api/v1/planetary-positions
4. Setting Request Parameters
This API call necessitates only your API key. To find your API key.
- Go to your DivineAPI dashboard > API Key page.
- Click on “Copy” next to the API key
Notice the difference between the key, and the Access Token.
Go back to Postman to set the parameters.
- Navigate to “Authorization”, select “Bearer Token” in the Auth type, and then add the token from your Divine API profile.
- Navigate to 'Body', select 'form_data', and then add:
- api_key: “<Your_API_Key>” - Your unique API subscription identifier.
- full_name: “Your name” - Enter name.
- day: “24” - Enter the date of birth.
- month: “05” - Enter the month of birth.
- year: "2023" - The year of interest.
- hour: “14” - Enter the hour.
- min: “40” - Enter the minute.
- sec: “43” - Enter the second.
- gender: “male” - Enter the gender.
- place: "New Delhi" - The name of the city.
- lat: "28.6139" - Latitude for location-specific details.
- lon: "77.2090" - Longitude for accurate location insights.
- tzone: "5.5" - Timezone offset from UTC.
- lan: “en” - Enter the language.
- house_system: “P” - Enter the House system code, default - P (Placidus)
- Please ensure that the bearer token is exactly the same as in your profile, with no changes in spacing or formatting.
Use translator for other language:
Update translator: https://divineapi.com/translator
en For English
hi For Hindi
pt For Portuguese
fr For French
es For Spanish
ru For Russian
de For German
nl For Dutch
it For Italian
pl For Polish
ar For Arabic
ja For Japanese
zh For Chinese
5. How to change the House System Code
To follow the instructions for selecting and applying a house system code in the Divine API, here’s a step-by-step guide.
Navigate to the API Documentation:
- Go to the Western API section within your Divine API documentation.
Select the House System Code:
- Under Western API, click the dropdown of Natal Astrology.
- In this section, you’ll find a dropdown list labeled House System Codes. Expand this list to view the available house system codes, such as "P" for Placidus, "K" for Koch, and so on.
Choose the Appropriate House System:
- Review the list and select the house system code that suits your requirements.
- For example, if you prefer the Placidus system, use code P.
Enter the Code in Postman:
- In Postman, open the Body tab for the API request you are configuring.
- Find the house_system parameter, and input the selected code (e.g., "P" for Placidus) in the Text field next to it.
By following these steps, you can apply the desired house system code in your API request. The default system is Placidus (P) unless specified otherwise.
6. Making the Request
Hit the 'Send' button to submit your request.
7. Deciphering the Response
The API's response will be structured as follows:
{
{
"success": 1,
"data": [
{
"name": "Ascendant",
"full_degree": "185.8173362",
"sign": "Libra",
"sign_no": 7,
"longitude": "5:49:2",
"speed": "317.9267283",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 1,
"element": "Air",
"modality": "Cardinal"
},
{
"name": "Sun",
"full_degree": "62.9674392",
"sign": "Gemini",
"sign_no": 3,
"longitude": "2:58:3",
"speed": "0.9614362",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Air",
"modality": "Mutable"
},
{
"name": "Moon",
"full_degree": "117.3009018",
"sign": "Cancer",
"sign_no": 4,
"longitude": "27:18:3",
"speed": "12.0107618",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 10,
"element": "Water",
"modality": "Cardinal"
},
{
"name": "Mars",
"full_degree": "122.1365708",
"sign": "Leo",
"sign_no": 5,
"longitude": "2:8:12",
"speed": "0.5736332",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 10,
"element": "Fire",
"modality": "Fixed"
},
{
"name": "Mercury",
"full_degree": "39.0266329",
"sign": "Taurus",
"sign_no": 2,
"longitude": "9:1:36",
"speed": "0.6655789",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Earth",
"modality": "Fixed"
},
{
"name": "Venus",
"full_degree": "107.9024129",
"sign": "Cancer",
"sign_no": 4,
"longitude": "17:54:9",
"speed": "1.0291571",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 10,
"element": "Water",
"modality": "Cardinal"
},
{
"name": "Jupiter",
"full_degree": "31.7286063",
"sign": "Taurus",
"sign_no": 2,
"longitude": "1:43:43",
"speed": "0.2224855",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 7,
"element": "Earth",
"modality": "Fixed"
},
{
"name": "Saturn",
"full_degree": "336.7262736",
"sign": "Pisces",
"sign_no": 12,
"longitude": "6:43:35",
"speed": "0.0393767",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 5,
"element": "Water",
"modality": "Mutable"
},
{
"name": "North node",
"full_degree": "32.6111394",
"sign": "Taurus",
"sign_no": 2,
"longitude": "2:36:40",
"speed": "-0.0529293",
"is_retro": "true",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 7,
"element": "Earth",
"modality": "Fixed"
},
{
"name": "South node",
"full_degree": 212.6111394,
"sign": "Scorpio",
"sign_no": 8,
"longitude": "2:36:40",
"speed": "-0.0529293",
"is_retro": "true",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 1,
"element": "Water",
"modality": "Fixed"
},
{
"name": "Uranus",
"full_degree": "49.7738719",
"sign": "Taurus",
"sign_no": 2,
"longitude": "19:46:26",
"speed": "0.0568086",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 8,
"element": "Earth",
"modality": "Fixed"
},
{
"name": "Neptune",
"full_degree": "357.3108515",
"sign": "Pisces",
"sign_no": 12,
"longitude": "27:18:39",
"speed": "0.0196822",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 6,
"element": "Water",
"modality": "Mutable"
},
{
"name": "Pluto",
"full_degree": "300.2465454",
"sign": "Aquarius",
"sign_no": 11,
"longitude": "0:14:48",
"speed": "-0.0101909",
"is_retro": "true",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 4,
"element": "Air",
"modality": "Fixed"
},
{
"name": "MC",
"full_degree": "96.0610512",
"sign": "Cancer",
"sign_no": 4,
"longitude": "6:3:40",
"speed": "331.8944263",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 9,
"element": "Water",
"modality": "Cardinal"
},
{
"name": "Chiron",
"full_degree": "18.4950277",
"sign": "Aries",
"sign_no": 1,
"longitude": "18:29:42",
"speed": "0.0453457",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 7,
"element": "Fire",
"modality": "Cardinal"
},
{
"name": "Part of fortune",
"full_degree": 240.15079880000002,
"sign": "Sagittarius",
"sign_no": 9,
"longitude": "0:9:2",
"speed": "--",
"is_retro": "false",
"is_rising": "false",
"is_setting": "false",
"in_midheaven": "false",
"house": 2,
"element": "Fire",
"modality": "Mutable"
}
]
}
- The response contains an array of planetary positions, each represented by an object with details such as the planet's name, degree, sign, longitude, speed, house, element, modality, and other attributes like retrograde status.
- Each object describes a specific planet's position and characteristics at a given time. This data can be used to analyze astrological charts.
8. Error Resolution
Ensure your API key is correctly entered if you encounter errors, as most issues are due to invalid or missing API keys.
9. Further Assistance
For additional support or inquiries, feel free to contact our customer service team at admin@divineapi.com.