Loading

天气接口-高德api

简要描述:

  • 高德天气接口api

接口版本:

版本号 制定人 制定日期 修订日期

请求URL:

请求方式:

  • GET

请求头:

参数名 是否必须 类型 说明

请求参数:

参数名 是否必须 类型 说明
key string 秘钥
city string 城市编码
extensions string 可选值:base/all;base:返回实况天气;all:返回预报天气
output string 返回格式;可选值:JSON,XML

返回示例:

正确时返回:

{
  "status": "1",
  "count": "1",
  "info": "OK",
  "infocode": "10000",
  "forecasts": [
    {
      "city": "杭州市",
      "adcode": "330100",
      "province": "浙江",
      "reporttime": "2019-12-23 14:25:41",
      "casts": [
        {
          "date": "2019-12-23",
          "week": "1",
          "dayweather": "小雨",
          "nightweather": "小雨-中雨",
          "daytemp": "11",
          "nighttemp": "8",
          "daywind": "东",
          "nightwind": "东",
          "daypower": "4",
          "nightpower": "4"
        },
        {
          "date": "2019-12-24",
          "week": "2",
          "dayweather": "小雨",
          "nightweather": "小雨",
          "daytemp": "12",
          "nighttemp": "9",
          "daywind": "东",
          "nightwind": "东",
          "daypower": "4",
          "nightpower": "4"
        },
        {
          "date": "2019-12-25",
          "week": "3",
          "dayweather": "小雨",
          "nightweather": "小雨",
          "daytemp": "13",
          "nighttemp": "10",
          "daywind": "无风向",
          "nightwind": "无风向",
          "daypower": "≤3",
          "nightpower": "≤3"
        },
        {
          "date": "2019-12-26",
          "week": "4",
          "dayweather": "阴",
          "nightweather": "多云",
          "daytemp": "12",
          "nighttemp": "2",
          "daywind": "西",
          "nightwind": "西",
          "daypower": "6",
          "nightpower": "6"
        }
      ]
    }
  ]
}

错误时返回:

{
    、、、
}

返回参数说明:

参数名 类型 说明

备注:

  • 更多返回错误代码请看首页的错误代码描述
posted @ 2019-12-23 15:10  mikemhm  阅读(2364)  评论(0编辑  收藏  举报