月升月落和月相

获取最近60天全球城市月升月落和逐小时的月相数据。

月相已考虑南北半球的差异,不需要再进行转换

请求URL

  • 商业版https://api.qweather.com/v7/astronomy/moon?[请求参数]
  • 开发版https://devapi.qweather.com/v7/astronomy/moon?[请求参数]

请求参数

请求参数包括必选和可选参数,如不填写可选参数将使用其默认值,参数之间使用&进行分隔。

key

用户认证key,请参考如何获取你的KEY。支持数字签名方式进行认证。例如 key=123456789ABC

location

需要查询地区的LocationID或以英文逗号分隔的经度,纬度坐标(十进制,最多支持小数点后两位),LocationID可通过城市搜索服务获取。例如 location=101010100location=116.41,39.92

date

选择日期,最多可选择未来60天(包含今天)的数据。日期格式为yyyyMMdd,例如 date=20200531

lang

多语言设置,默认中文,当数据不匹配你设置的语言时,将返回英文或其本地语言结果。

返回数据

// 北京2021年11月20日月出月落时间和月相
// 商业版API https://api.qweather.com/v7/astronomy/moon?location=101010100&date=20211120&key=你的KEY
// 开发版API https://devapi.qweather.com/v7/astronomy/moon?location=101010100&date=20211120&key=你的KEY
// 替换 date=20211120 为未来60天的日期

{
  "code": "200",
  "updateTime": "2021-11-15T17:00+08:00",
  "fxLink": "http://hfx.link/2ax1",
  "moonrise": "2021-11-20T17:25+08:00",
  "moonset": "2021-11-21T07:42+08:00",
  "moonPhase": [
    {
      "fxTime": "2021-11-20T00:00+08:00",
      "value": "0.51",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T01:00+08:00",
      "value": "0.51",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T02:00+08:00",
      "value": "0.51",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T03:00+08:00",
      "value": "0.51",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T04:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T05:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T06:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T07:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T08:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T09:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "100",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T10:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T11:00+08:00",
      "value": "0.52",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T12:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T13:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T14:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T15:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T16:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T17:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T18:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T19:00+08:00",
      "value": "0.53",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T20:00+08:00",
      "value": "0.54",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T21:00+08:00",
      "value": "0.54",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T22:00+08:00",
      "value": "0.54",
      "name": "亏凸月",
      "illumination": "99",
      "icon": "805"
    },
    {
      "fxTime": "2021-11-20T23:00+08:00",
      "value": "0.54",
      "name": "亏凸月",
      "illumination": "98",
      "icon": "805"
    }
  ],
  "refer": {
    "sources": [
      "QWeather"
    ],
    "license": [
      "commercial license"
    ]
  }
}
参数 描述
code

API状态码,具体含义请参考状态码

updateTime

当前API的最近更新时间

fxLink

当前数据的响应式页面,便于嵌入网站或应用

moonrise

月升时间

moonset

月落时间

moonPhase.fxTime

月相逐小时预报时间

moonPhase.value

月相数值

moonPhase.name

月相名字

moonPhase.icon

月相图标代码,图标可通过天气状况和图标下载

moonPhase.illumination

月亮照明度,百分比数值

refer.sources

原始数据来源,或数据源说明,可能为空

refer.license

数据许可或版权声明,可能为空