Moon and Moon Phase

Moon and Moon Phase API for getting the last 60 days of moonrise, moonset and moon phase data for cities around the world.

Request URL

  • Prohttps://api.qweather.com/v7/astronomy/moon?[params]
  • Devhttps://devapi.qweather.com/v7/astronomy/moon?[params]

Request Parameters

All parameters are separated by &. If no optional parameters are set, the default value will be used.

key

API authentication key, please refer to How To Get Your Key. Support Signature Authentication.

For example: key=12334567890ABC

location

The location to be queried, support LocationID or comma-separated longitude and latitude, LocationID can be obtained by GeoAPI.

For example: location=101010100 or location=116.41,39.92

date

Set the date, up to 60 days in the future (including today). The date format is yyyyMMdd

For example: date=20200531

lang

Multi-language setting, if data does not match the language you set, it will return results in English or its native language.

Response

// New York moon rise, moon set and moon phase on 2021-02-20
// Pro API https://api.qweather.com/v7/astronomy/moon?location=1E98E&date=20210220&lang=en&key=YOUR_KEY
// Dev API https://devapi.qweather.com/v7/astronomy/moon?location=1E98E&date=20210220&lang=en&key=YOUR_KEY
// Replace date=20210220 with next 60 days

{
  "code": "200",
  "updateTime": "2021-02-16T22:00-05:00",
  "fxLink": "http://hfx.link/20ag1",
  "moonrise": "2021-02-20T11:14-05:00",
  "moonset": "2021-02-21T01:31-05:00",
  "moonPhase": [
    {
      "fxTime": "2021-02-20T00:00-05:00",
      "value": "0.25",
      "name": "First Quarter",
      "illumination": "50"
    },
    {
      "fxTime": "2021-02-20T01:00-05:00",
      "value": "0.25",
      "name": "First Quarter",
      "illumination": "50"
    },
    {
      "fxTime": "2021-02-20T02:00-05:00",
      "value": "0.25",
      "name": "First Quarter",
      "illumination": "50"
    },
    {
      "fxTime": "2021-02-20T03:00-05:00",
      "value": "0.25",
      "name": "Waxing gibbous",
      "illumination": "51"
    },
    {
      "fxTime": "2021-02-20T04:00-05:00",
      "value": "0.25",
      "name": "Waxing gibbous",
      "illumination": "51"
    },
    {
      "fxTime": "2021-02-20T05:00-05:00",
      "value": "0.25",
      "name": "Waxing gibbous",
      "illumination": "52"
    },
    {
      "fxTime": "2021-02-20T06:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "52"
    },
    {
      "fxTime": "2021-02-20T07:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "52"
    },
    {
      "fxTime": "2021-02-20T08:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "53"
    },
    {
      "fxTime": "2021-02-20T09:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "53"
    },
    {
      "fxTime": "2021-02-20T10:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "54"
    },
    {
      "fxTime": "2021-02-20T11:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "54"
    },
    {
      "fxTime": "2021-02-20T12:00-05:00",
      "value": "0.26",
      "name": "Waxing gibbous",
      "illumination": "54"
    },
    {
      "fxTime": "2021-02-20T13:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "55"
    },
    {
      "fxTime": "2021-02-20T14:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "55"
    },
    {
      "fxTime": "2021-02-20T15:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "55"
    },
    {
      "fxTime": "2021-02-20T16:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "56"
    },
    {
      "fxTime": "2021-02-20T17:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "56"
    },
    {
      "fxTime": "2021-02-20T18:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "57"
    },
    {
      "fxTime": "2021-02-20T19:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "57"
    },
    {
      "fxTime": "2021-02-20T20:00-05:00",
      "value": "0.27",
      "name": "Waxing gibbous",
      "illumination": "57"
    },
    {
      "fxTime": "2021-02-20T21:00-05:00",
      "value": "0.28",
      "name": "Waxing gibbous",
      "illumination": "58"
    },
    {
      "fxTime": "2021-02-20T22:00-05:00",
      "value": "0.28",
      "name": "Waxing gibbous",
      "illumination": "58"
    },
    {
      "fxTime": "2021-02-20T23:00-05:00",
      "value": "0.28",
      "name": "Waxing gibbous",
      "illumination": "59"
    }
  ],
  "refer": {
    "sources": [
      "qweather.com"
    ],
    "license": [
      "commercial license"
    ]
  }
}
Parameters Description
code

API status code, please refer to Status Code

updateTime

API last update time

fxLink

Responsive web page of this data, for embedded in website or APP

moonrise

Moonrise time

moonset

Moonrise time

moonPhase.fxTime

Moon phase forecast time

moonPhase.value

Moon phase value

moonPhase.name

Moon Phase Name

moonPhase.illumination

Moon illuminance in percent

refer.sources

Data source and other statements, may be null

refer.license

Data license, may be null