WeatherAPI · JSON Structure

Weatherapi Astronomy Response Structure

AstronomyResponse schema from WeatherAPI.com

Type: object Properties: 2
WeatherForecastHistoryMarineAstronomyGeolocationSportsAlertsPublic APIs

AstronomyResponse is a JSON Structure definition published by WeatherAPI, describing 2 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

location astronomy

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/weatherapi/refs/heads/main/json-structure/weatherapi-astronomy-response-structure.json",
  "name": "AstronomyResponse",
  "description": "AstronomyResponse schema from WeatherAPI.com",
  "type": "object",
  "properties": {
    "location": {
      "type": "object",
      "description": "Location metadata returned with every weather response.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Location name",
          "example": "London"
        },
        "region": {
          "type": "string",
          "description": "Region or state",
          "example": "City of London, Greater London"
        },
        "country": {
          "type": "string",
          "description": "Country name",
          "example": "United Kingdom"
        },
        "lat": {
          "type": "float",
          "description": "Latitude",
          "example": 51.5074
        },
        "lon": {
          "type": "float",
          "description": "Longitude",
          "example": -0.1278
        },
        "tz_id": {
          "type": "string",
          "description": "IANA timezone ID, e.g. Europe/London",
          "example": "Europe/London"
        },
        "localtime_epoch": {
          "type": "int32",
          "description": "Local time as Unix epoch",
          "example": 1748441400
        },
        "localtime": {
          "type": "string",
          "description": "Local date and time string",
          "example": "2026-05-28 15:30"
        }
      }
    },
    "astronomy": {
      "type": "object",
      "properties": {
        "astro": {
          "type": "object",
          "properties": {
            "sunrise": {
              "type": "string",
              "example": "05:30 AM"
            },
            "sunset": {
              "type": "string",
              "example": "08:45 PM"
            },
            "moonrise": {
              "type": "string",
              "example": "10:15 PM"
            },
            "moonset": {
              "type": "string",
              "example": "06:42 AM"
            },
            "moon_phase": {
              "type": "string",
              "example": "Waxing Crescent"
            },
            "moon_illumination": {
              "type": "double",
              "example": 35.0
            },
            "is_moon_up": {
              "type": "int32",
              "example": 1
            },
            "is_sun_up": {
              "type": "int32",
              "example": 1
            }
          }
        }
      }
    }
  }
}