Moon Phase

免费增值
通过 Moon-API.com | 已更新 hace 18 días | Science
人气

9.6 / 10

延迟

279ms

服务等级

100%

Health Check

100%

关注者:22
资源:
产品网站 使用条款
API 创建者:
Rapid account: Moon API Com
Moon-API.com
MoonAPIcom
登录并给 API 打分
打分:4.4 - 投票: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.