月升月落和月相

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

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

请求URL #

  • 商业版https://api.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年2月20日月出月落时间和月相
// 商业版API https://api.qweather.com/v7/astronomy/moon?location=101010100&date=20210220&key=你的KEY
// 替换 date=20210220 为未来60天的日期

{
  "code": "200",
  "updateTime": "2021-02-17T11:00+08:00",
  "fxLink": "http://hfx.link/1tqf1",
  "moonrise": "2021-02-20T11:11+08:00",
  "moonset": "2021-02-21T00:50+08:00",
  "moonPhase": [
    {
      "fxTime": "2021-02-20T00:00+08:00",
      "value": "0.25",
      "name": "上弦月",
      "illumination": "50"
    },
    {
      "fxTime": "2021-02-20T01:00+08:00",
      "value": "0.25",
      "name": "上弦月",
      "illumination": "50"
    },
    {
      "fxTime": "2021-02-20T02:00+08:00",
      "value": "0.25",
      "name": "上弦月",
      "illumination": "50"
    },
    {
      "fxTime": "2021-02-20T03:00+08:00",
      "value": "0.25",
      "name": "盈凸月",
      "illumination": "51"
    },
    {
      "fxTime": "2021-02-20T04:00+08:00",
      "value": "0.25",
      "name": "盈凸月",
      "illumination": "51"
    },
    {
      "fxTime": "2021-02-20T05:00+08:00",
      "value": "0.25",
      "name": "盈凸月",
      "illumination": "52"
    },
    {
      "fxTime": "2021-02-20T06:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "52"
    },
    {
      "fxTime": "2021-02-20T07:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "52"
    },
    {
      "fxTime": "2021-02-20T08:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "53"
    },
    {
      "fxTime": "2021-02-20T09:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "53"
    },
    {
      "fxTime": "2021-02-20T10:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "54"
    },
    {
      "fxTime": "2021-02-20T11:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "54"
    },
    {
      "fxTime": "2021-02-20T12:00+08:00",
      "value": "0.26",
      "name": "盈凸月",
      "illumination": "54"
    },
    {
      "fxTime": "2021-02-20T13:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "55"
    },
    {
      "fxTime": "2021-02-20T14:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "55"
    },
    {
      "fxTime": "2021-02-20T15:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "55"
    },
    {
      "fxTime": "2021-02-20T16:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "56"
    },
    {
      "fxTime": "2021-02-20T17:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "56"
    },
    {
      "fxTime": "2021-02-20T18:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "57"
    },
    {
      "fxTime": "2021-02-20T19:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "57"
    },
    {
      "fxTime": "2021-02-20T20:00+08:00",
      "value": "0.27",
      "name": "盈凸月",
      "illumination": "57"
    },
    {
      "fxTime": "2021-02-20T21:00+08:00",
      "value": "0.28",
      "name": "盈凸月",
      "illumination": "58"
    },
    {
      "fxTime": "2021-02-20T22:00+08:00",
      "value": "0.28",
      "name": "盈凸月",
      "illumination": "58"
    },
    {
      "fxTime": "2021-02-20T23:00+08:00",
      "value": "0.28",
      "name": "盈凸月",
      "illumination": "59"
    }
  ],
  "refer": {
    "sources": [
      "qweather.com"
    ],
    "license": [
      "commercial license"
    ]
  }
}
参数 描述
code

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

updateTime

当前API的最近更新时间

fxLink

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

moonrise

月升时间

moonset

月落时间

moonPhase.fxTime

月相逐小时预报时间

moonPhase.value

月相数值

moonPhase.name

月相名字

moonPhase.illumination

月亮照明度,百分比数值

refer.sources

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

refer.license

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