Welcome to API byHrast

Moon Phase & Position API

Get accurate moon data including phase, illumination, moonrise, and moonset times for any location and date.

  • Moon phase and illumination percentage
  • Moonrise and moonset times
  • Support for any location worldwide
  • Historical and future date calculations
  • Fast and reliable REST API
  • JSON response format
  • 🔑 API Key Access:
    After signing in, you'll receive your unique API key to make requests to our endpoints.

    Example API Request:

    GET https://astroapi.byhrast.com/moon.php?date=25/03/2024&lat=45.815399&lng=15.966568&time=12:00&api_key=YOUR_API_KEY

    Example Response:

    {
        "date": "25/03/2025",
        "moonrise": "04:03",
        "moonset": "13:27",
        "phase": "Waning Crescent",
        "illumination": "24.1%",
        "phase_details": {
            "phase_angle": "1.28",
            "phase_value": "0.84",
            "fraction": "0.24"
        },
        "position": {
            "azimuth": "-1.72",
            "altitude": "-0.70",
            "distance": "380727.22"
        }
    }
    Google Logo Sign in with Google