Luna Phase

FREEMIUM
By carter383 | Updated 13 days ago | Science
Popularity

8 / 10

Latency

329ms

Service Level

100%

Health Check

100%

README

Moon Phase API Documentation

Overview

The Moon Phase API delivers precise and real-time data on the lunar phases. It provides developers with detailed information on the current phase of the moon, forecasts of upcoming lunar cycles, and access to historical moon phase data. This API is structured to be user-friendly and straightforward to incorporate into various applications, catering to needs in astronomy, navigation, and lifestyle enhancements.

Key Features

  • Real-time Data: Access live updates on the moonโ€™s phase.
  • Comprehensive Coverage: Retrieve data on past, present, and future lunar phases.
  • Easy Integration: Designed with simplicity to ensure seamless integration into your existing projects.
  • Versatile Applications: Ideal for use in educational, navigational, and personal development apps.

Getting Started

To start using the Moon Phase API, you will need to include the following headers in your requests to authenticate and receive responses.

API Endpoints

  • Base URL: https://luna-phase.p.rapidapi.com/Luna_Phase

Required Headers

  • X-RapidAPI-Key: Your_API_Key_Here - Replace with your personal API key.
  • X-RapidAPI-Host: luna-phase.p.rapidapi.com

Query Parameters

  • lat (string): Latitude of the location for which you want lunar data.
  • lon (string): Longitude of the location.
  • timestamp (string): Unix timestamp for the specific time of the lunar data request.

Example Request in Python

Hereโ€™s how you can make a request to the Moon Phase API using Python:

import requests

# Endpoint URL
url = "https://luna-phase.p.rapidapi.com/Luna_Phase"

# Parameters for the API request
querystring = {"lat":"51.5074","lon":"-0.1278","timestamp":"1713685356"}

# Headers with API authentication keys
headers = {
    "X-RapidAPI-Key": "Your_API_Key_Here",
    "X-RapidAPI-Host": "luna-phase.p.rapidapi.com"
}

# Sending the GET request
response = requests.get(url, headers=headers, params=querystring)

# Printing the response
print(response.json())

Response Format

Here is an example of a typical JSON response providing lunar phase data:

{
  "Phase_Description": "Waxing Gibbous",
  "Phase": 93.56277465820312
}
  • Phase_Description (string): Descriptive name of the lunar phase.
  • Phase (float): The completion percentage of the current lunar phase.

For further assistance or additional information, please refer to our comprehensive API documentation or contact our support team.

Followers: 1
API Creator:
Rapid account: Carter 383
carter383
carter383
Log In to Rate API
Rating: 5 - Votes: 1