简要描述:
接口版本:
请求URL:
请求方式:
请求头:
请求参数:
参数名 |
是否必须 |
类型 |
说明 |
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"
}
]
}
]
}
错误时返回:
{
、、、
}
返回参数说明:
备注: