天气预报
查询接口API

请求方式:get

请求地址:api.hyk416.cn/api/sfz/tq.php

返回格式:json

请求示例:api.hyk416.cn/api/sfz/tq.php?city=成都

请求参数:

名称 必填 类型 说明
  city Y string 输出地区最新天气详细预报

返回参数:

名称 类型 说明
  code string 返回的状态码
  date string 返回温度信息
  fl string 返回风向信息
  date string 返回日期预报信息

返回示例:

{"code":200,"msg":"成功!","data":{"yesterday":{"date":"17日星期六","high":"高温 35℃","fx":"无持续风向","low":"低温 25℃","fl":"\u003c![CDATA[\u003c3级]]\u003e","type":"晴"},"city":"成都","aqi":null,"forecast":[{"date":"18日星期天","high":"高温 35℃","fengli":"\u003c![CDATA[\u003c3级]]\u003e","low":"低温 25℃","fengxiang":"无持续风向","type":"晴"},{"date":"19日星期一","high":"高温 34℃","fengli":"\u003c![CDATA[\u003c3级]]\u003e","low":"低温 23℃","fengxiang":"无持续风向","type":"晴"},{"date":"20日星期二","high":"高温 27℃","fengli":"\u003c![CDATA[\u003c3级]]\u003e","low":"低温 23℃","fengxiang":"无持续风向","type":"大雨"},{"date":"21日星期三","high":"高温 28℃","fengli":"\u003c![CDATA[\u003c3级]]\u003e","low":"低温 23℃","fengxiang":"无持续风向","type":"阵雨"},{"date":"22日星期四","high":"高温 30℃","fengli":"\u003c![CDATA[\u003c3级]]\u003e","low":"低温 23℃","fengxiang":"无持续风向","type":"阵雨"}],"ganmao":"各项气象条件适宜,发生感冒机率较低。但请避免长期处于空调房间中,以防感冒。","wendu":"27"}}