Welcome to the Astrology Planetary API

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:

Body (JSON):

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:

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:

4. Note:

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

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.