历史天气

历史天气

接口类型:生活常用
接口状态:正常
描述:全国3000多个省市的历史天气查询,包括最高最低温度、风级、湿度、气压等指数,最低最高温度、日出日落时间、空气质量指数、首要污染物等信息。图片地址:http://api.jisuapi.com/weather/icon.zip
  • 1、历史天气查询
  • 接口地址:https://api.jisuapi.com/weather2/query

    返回格式:JSON

    请求方式:GET POST

    请求示例:https://api.jisuapi.com/weather2/query?appkey=yourappkey&city=安顺&date=2018-01-01

    请求参数:

    参数名称 类型 必填 说明
    city string 城市
    cityid int 城市ID
    date string 日期 默认为昨天 格式为:2018-01-01

    返回参数:

    参数名称 类型 说明
    cityid int 城市ID
    cityname string 城市
    date string 日期
    weather string 天气
    temphigh string 最高气温
    templow string 最低气温
    img string 图片数字
    humidity string 湿度
    pressure string 气压
    windspeed string 风速
    windpower string 风级
    sunrise string 日出时间
    sunset string 日落时间
    aqi string AQI指数
    primarypollutant string 首要污染物

    JSON返回实例:

  • 2、获取城市
  • 接口地址:https://api.jisuapi.com/weather2/city

    返回格式:JSON

    请求方式:GET

    请求示例:https://api.jisuapi.com/weather2/city?appkey=yourappkey

    请求参数:

    参数名称 类型 必填 说明

    返回参数:

    参数名称 类型 说明
    cityid int 城市ID
    parentid int 上级ID
    citycode string 城市天气代号
    city string 城市

    JSON返回实例: