Moon Phase

FREEMIUM
By Moon-API.com | Updated 8 days ago | Science
Popularity

9.6 / 10

Latency

278ms

Service Level

100%

Health Check

100%

Followers: 20
Resources:
Product Website Terms of use
API Creator:
Rapid account: Moon API Com
Moon-API.com
MoonAPIcom
Log In to Rate API
Rating: 4.4 - Votes: 5

README

Introducing Moon-API.com ๐ŸŒ™

Get ready to explore the enchanting world of the moon and its ever-changing phases with our API! With four distinct endpoints, you can access the perfect amount of information to suit your needs. Whether youโ€™re looking for a brief overview, a plain-text description, a comprehensive analysis, or a visual representation, our API has you covered.

Features

  • Basic Endpoint: Provides essential information about the moonโ€™s current phase in an easy-to-understand JSON format.
  • Plain Text Endpoint: Offers a simple, text-based description of the moonโ€™s current phase.
  • Advanced Endpoint: Delivers in-depth lunar and solar details, including distance from Earth, illumination, age, sunrise, sunset, and more, wrapped up in a comprehensive JSON object.
  • Emoji Endpoint: Retrieves the relevant emoji representation of the moonโ€™s current phase.
  • Calendar Endpoint: Generates a Lunar Calendar for the current year, presenting the moon phase for each day using the appropriate emoji in a markdown table format.

Getting Started

To begin exploring the moon and its phases, visit the Moon Phase API on RapidAPI and subscribe to the API. Once youโ€™ve subscribed, youโ€™ll have access to detailed documentation, code samples, and everything you need to start using the Moon Phase API in your projects. Enjoy your lunar adventures! ๐ŸŒ•๐ŸŒ–๐ŸŒ—๐ŸŒ˜๐ŸŒ‘๐ŸŒ’๐ŸŒ“๐ŸŒ”

API Endpoint Details and Expected Outputs

1. Basic Endpoint

  • URL: https://moon-phase.p.rapidapi.com/basic?lat=51.4826&lon=0.0077
  • Output (JSON):
    • phase_name (type: string): Name of the current moon phase
    • stage (type: string): Stage of the moonโ€™s cycle
    • days_until_next_full_moon (type: integer): The number of days until the next full moon
    • days_until_next_new_moon (type: integer): The number of days until the next new moon

2. Plain Text Endpoint

  • URL: https://moon-phase.p.rapidapi.com/plain-text
  • Output (type: string): Description of the moon phase (e.g., โ€œWaning Gibbous.โ€)

3. Advanced Endpoint

  • URL: https://moon-phase.p.rapidapi.com/advanced?lat=51.4826&lon=0.0077
  • Output (JSON):
    • timestamp (integer): UNIX timestamp of the moon phase calculation
    • datestamp (string): Date and time in UTC format
    • moon (object): Contains moon-related data
      • phase (float): Moon phase as a number between 0 and 1
      • illumination (string): Percentage of the moonโ€™s surface illuminated by the sun
      • age_days (integer): Age of the moon in days since the last new moon
      • lunar_cycle (string): Percentage of the complete lunar cycle completed
      • phase_name (string): Name of the current moon phase
      • stage (string): Stage of the moonโ€™s cycle
      • emoji (string): Visual representation of the current moon phase
      • zodiac_sign (string): The zodiac sign associated with the current date
      • moonrise (string): The time of moonrise
      • moonrise_timestamp (integer): The UNIX timestamp of moonrise
      • moonset (string): The time of moonset
      • moonset_timestamp (integer): The UNIX timestamp of moonset
      • moon_altitude (float): The altitude of the moon above the horizon
      • moon_distance (float): The distance between the Earth and the moon
      • moon_azimuth (float): The azimuth of the moonโ€™s position
      • moon_parallactic_angle (float): The parallactic angle of the moon
    • sun (object): Contains sun-related data
      • sunrise (integer): UNIX timestamp for todayโ€™s sunrise
      • sunrise_timestamp (string): The time of the next sunrise
      • sunset (integer): UNIX timestamp for todayโ€™s sunset
      • sunset_timestamp (string): The time of the next sunset
      • solar_noon (string): The time when the sun reaches its highest point in the sky
      • day_length (string): The duration of daylight
      • sun_altitude (float): The altitude of the sun above the horizon
      • sun_distance (float): The distance between the Earth and the sun
      • sun_azimuth (float): The azimuth of the sunโ€™s position
    • moon_phases (object): Contains information about previous and upcoming moon phases
      • new_moon (object): Information about the new moon phase
        • current (object): Current new moon phase details
          • timestamp (integer): UNIX timestamp of the current new moon
          • datestamp (string): Date and time of the current new moon in UTC format
          • days_ago (integer): Number of days since the current new moon
        • next (object): Next new moon phase details
          • timestamp (integer): UNIX timestamp of the next new moon
          • datestamp (string): Date and time of the next new moon in UTC format
          • days_ahead (integer): Number of days until the next new moon
      • first_quarter (object): Information about the first quarter moon phase
        • current (object): Current first quarter moon phase details
          • timestamp (integer): UNIX timestamp of the current first quarter
          • datestamp (string): Date and time of the current first quarter in UTC format
          • days_ago (integer): Number of days since the current first quarter
        • next (object): Next first quarter moon phase details
          • timestamp (integer): UNIX timestamp of the next first quarter
          • datestamp (string): Date and time of the next first quarter in UTC format
          • days_ahead (integer): Number of days until the next first quarter
      • full_moon (object): Information about the full moon phase
        • current (object): Current full moon phase details
          • timestamp (integer): UNIX timestamp of the current full moon
          • datestamp (string): Date and time of the current full moon in UTC format
          • days_ago (integer): Number of days since the current full moon
        • next (object): Next full moon phase details
          • timestamp (integer): UNIX timestamp of the next full moon
          • datestamp (string): Date and time of the next full moon in UTC format
          • days_ahead (integer): Number of days until the next full moon
      • last_quarter (object): Information about the last quarter moon phase
        • current (object): Current last quarter moon phase details
          • timestamp (integer): UNIX timestamp of the current last quarter
          • datestamp (string): Date and time of the current last quarter in UTC format
          • days_ago (integer): Number of days since the current last quarter
        • next (object): Next last quarter moon phase details
          • timestamp (integer): UNIX timestamp of the next last quarter
          • datestamp (string): Date and time of the next last quarter in UTC format
          • days_ahead (integer): Number of days until the next last quarter

4. Emoji Endpoint

  • URL: https://moon-phase.p.rapidapi.com/emoji
  • Output (type: string): Relevant emoji representation of the moonโ€™s current phase

5. Calendar Endpoint

  • URL: https://moon-phase.p.rapidapi.com/calendar?format=(markdown|html)
  • Output (Markdown or HTML): Generates a Lunar Calendar for the year, presenting the moon phase for each day using the appropriate emoji in a table.