About This Application
This application provides planetary data position in degree through an API. You can generate API keys to access these services and manage them through the dashboard.
This technology is officially builded under Indo Astrology Center recommendation. Also developed by Nusa IT Developer. For the API usage, you can follow this Documentation.
API Access Category
| Free | Basic | Pro | Premium | Enterprise | Pay as you go | |
|---|---|---|---|---|---|---|
| Price (IDR) | 0 | 20,000 | 35,000 | 50,000 | 100,000 | N/A |
| Max Requests per Minute | 2 | 5 | 10 | 25 | 100 | N/A |
| Daily Limit | 50 | 100 | 250 | 500 | 2,000 | N/A |
| Initial Credit | 0 | 2,500 | 6,000 | 12,500 | 60,000 | N/A |
| Price per Request (IDR) | 0 | 0 | 0 | 0 | 0 | 25 |
| Min Deposit (IDR) | 0 | 0 | 0 | 0 | 0 | 200,000 |
| Get Started | Contact Us | Contact Us | Contact Us | Contact Us | Contact Us |
The following is documentation for using the API Key for the /v1/astrology endpoint in your application:
Endpoint API: /v1/astrology
Method HTTP: POST
Description:
This endpoint is used to obtain astrological data based on a given time and location. This endpoint requires an API Key for authentication and returns astrological data in JSON format.
1. Expected Input:
Header:
x-api-key(string): A valid API Key to access this endpoint.
Body (JSON):
year(integer): Year in 4 digit format (example: 2024).month(integer): Month in 2 digit format (1 to 12).day(integer): Day in 2-digit format (1 to 31).hour(integer): Hour in 24-hour format (0 to 23).minute(integer): Minutes (0 to 59).second(integer): Seconds (0 to 59).latitude(float): Location latitude in degrees (example: -6.2146).longitude(float): Longitude of the location in degrees (example: 106.8451).
Example of JSON Body:
{
"year": 2024,
"month": 9,
"day": 12,
"hour": 15,
"minute": 30,
"second": 0,
"latitude": -6.2146,
"longitude": 106.8451
}
2. Generated Output:
Response:
- Status 200 OK: If the data is processed successfully, you will get a JSON response with astrological information.
- Status 400 Bad Request: If the input data is invalid or there are missing fields.
- Status 403 Forbidden: If the API Key is invalid or not found.
- Status 429 Too Many Requests: If the user's quota or rate limit is exceeded.
- Status 500 Internal Server Error: If an unexpected server error occurs.
Example Response JSON:
{
"response": true,
"planetary": {
"sun": {
"fulldegree": 15.23,
"isRetro": 0,
"zodiacSign": "Virgo"
},
"moon": {
"fulldegree": 112.56,
"isRetro": 1,
"zodiacSign": "Scorpio"
},
"mercury": {
"fulldegree": 58.67,
"isRetro": 0,
"zodiacSign": "Gemini"
},
"venus": {
"fulldegree": 104.78,
"isRetro": 0,
"zodiacSign": "Libra"
},
"mars": {
"fulldegree": 210.89,
"isRetro": 1,
"zodiacSign": "Sagittarius"
},
"jupiter": {
"fulldegree": 300.23,
"isRetro": 0,
"zodiacSign": "Capricorn"
},
"saturn": {
"fulldegree": 5.12,
"isRetro": 0,
"zodiacSign": "Aquarius"
},
"uranus": {
"fulldegree": 47.45,
"isRetro": 1,
"zodiacSign": "Pisces"
},
"neptune": {
"fulldegree": 87.76,
"isRetro": 0,
"zodiacSign": "Aries"
},
"pluto": {
"fulldegree": 243.89,
"isRetro": 1,
"zodiacSign": "Taurus"
}
}
}
3. Explanation of Fields in Response JSON:
response(boolean): Indicates whether the request was successfully processed (true) or not (false).planetary(object): Contains information about the astrological positions of various planets.fulldegree(float): The position of the planet in ecliptic degrees.isRetro(integer): Indicates whether the planet is in retrograde (1) or not (0).zodiacSign(string): Zodiac sign based on planetary position.
4. Note:
- Make sure the API Key used has the appropriate permissions and quota.
- Make sure the input data is complete and valid to get accurate results.
If there is an error or if you need further assistance, check the error message provided in the response or contact the API provider for further assistance.
API Key Usage Documentation for Endpoint /v1/astrology
Endpoint
- URL:
/v1/astrology - Method:
POST - Content-Type:
application/json
Header
- x-api-key: [Your API Key]
Expected Input
Request body must be JSON in the following format:
{
"year": <integer>,
"month": <integer>,
"day": <integer>,
"hour": <integer>,
"minute": <integer>,
"second": <integer>,
"latitude": <float>,
"longitude": <float>
}
Input Example:
{
"year": 2024,
"month": 9,
"day": 12,
"hour": 14,
"minute": 30,
"second": 0,
"latitude": -6.2146,
"longitude": 106.8451
}
Output
The response body will be JSON in the following format:
{
"response": true,
"planetary": {
"sun": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"moon": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"mercury": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"venus": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"mars": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"jupiter": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"saturn": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"uranus": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"neptune": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
},
"pluto": {
"fulldegree": <float>,
"isRetro": <integer>,
"zodiacSign": <string>
}
}
}
Sample Output:
{
"response": true,
"planetary": {
"sun": {
"fulldegree": 123.456,
"isRetro": 0,
"zodiacSign": "Leo"
},
"moon": {
"fulldegree": 234.567,
"isRetro": 1,
"zodiacSign": "Virgo"
},
"mercury": {
"fulldegree": 345.678,
"isRetro": 0,
"zodiacSign": "Libra"
},
"venus": {
"fulldegree": 456.789,
"isRetro": 1,
"zodiacSign": "Scorpio"
},
"mars": {
"fulldegree": 567.890,
"isRetro": 0,
"zodiacSign": "Sagittarius"
},
"jupiter": {
"fulldegree": 678.901,
"isRetro": 1,
"zodiacSign": "Capricorn"
},
"saturn": {
"fulldegree": 789.012,
"isRetro": 0,
"zodiacSign": "Aquarius"
},
"uranus": {
"fulldegree": 890.123,
"isRetro": 1,
"zodiacSign": "Pisces"
},
"neptune": {
"fulldegree": 901.234,
"isRetro": 0,
"zodiacSign": "Aries"
},
"pluto": {
"fulldegree": 123.345,
"isRetro": 1,
"zodiacSign": "Taurus"
}
}
}
Reference Code
Python (Using requests library)
import requests
url = "https://api.indoastrologycenter.com/v1/astrology"
headers = {
"x-api-key": "<Your API Key>",
"Content-Type": "application/json"
}
data = {
"year": 2024,
"month": 9,
"day": 12,
"hour": 14,
"minute": 30,
"second": 0,
"latitude": -6.2146,
"longitude": 106.8451
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
PHP (Using cURL)
<?php
// URL endpoint
$url = 'https://api.indoastrologycenter.com/v1/astrology';
$api_key = '<Your API Key>';
// Retrieve data from POST request and sanitize
$data = array(
'year' => filter_input(INPUT_POST, 'year', FILTER_SANITIZE_NUMBER_INT),
'month' => filter_input(INPUT_POST, 'month', FILTER_SANITIZE_NUMBER_INT),
'day' => filter_input(INPUT_POST, 'day', FILTER_SANITIZE_NUMBER_INT),
'hour' => filter_input(INPUT_POST, 'hour', FILTER_SANITIZE_NUMBER_INT),
'minute' => filter_input(INPUT_POST, 'minute', FILTER_SANITIZE_NUMBER_INT),
'second' => filter_input(INPUT_POST, 'second', FILTER_SANITIZE_NUMBER_INT),
'latitude' => filter_input(INPUT_POST, 'latitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION),
'longitude' => filter_input(INPUT_POST, 'longitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)
);
// Initialize Curl
$ch = curl_init($url);
// Set settings for Curl
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'x-api-key: ' . $api_key,
'Content-Type: application/json'
));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
// Execute Curl and get response
$response = curl_exec($ch);
// Check whether the Curl request was successful
if ($response === false) {
echo 'Curl error: ' . curl_error($ch);
} else {
// Display the response from the REST API
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($http_status == 200) {
$data = json_decode($response, true);
echo '<h2>Response:</h2>';
echo '<pre>' . print_r($data, true) . '</pre>';
} else {
echo '<h2>Request failed</h2>';
echo 'HTTP Status Code: ' . $http_status . '<br>';
echo 'Response: ' . $response;
}
}
// Close Curl session
curl_close($ch);
?>
This documentation provides a clear overview of how to use the /v1/astrology endpoint, as well as example scripts in Python and PHP to access the API.