开发指南

新用户可测试2000次 比某度更精准、及时,请进入气象台网站对比数据

过去24小时+未来3天小时降雨量接口


过去24小时从0点到24点 + 未来3天的小时降雨量详细预报
可实现如下效果:

地区权限 请求限制 使用方案(报价为不开票价格) 发票
全国所有市区县 每日2万次 100/一年(最低) 400/五年(最低) 780/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日5万次 200/一年(最低) 800/五年(最低) 1560/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日10万次 400/一年(最低) 1600/五年(最低) 3120/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日20万次 1000/一年(最低) 4000/五年(最低) 7800/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日50万次 2500/一年(最低) 10000/五年(最低) 19500/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日百万~千万次 联系客服开通独享版本,最低12800/年 可开普票/电子票/专票

请求次数限制仅限于单个APPID每日请求次数不超规定范围,并不会限制使用的项目数量、App、设备及IP等。

请求方式及url:

  • 请求方式:GET

  • 接口地址:(请将线路地址设置为动态可修改的)

  • 线路1(推荐)https://v0.yiketianqi.com/api
  • 线路2:https://yiketianqi.com/api

请求示例

https://tianqiapi.com/free/rain?staid=&appid=&appsecret= &cityid=101011400

请求参数说明:

参数名 必选 类型 说明 备注(示例)
appid string 用户appid 注册开发账号
appsecret string 用户appsecret
cityid string 城市ID 请参考 城市ID列表
callback string jsonp参数 如: jQuery.Callbacks
vue string 跨域参数 如果您使用的是react、vue、angular请填写值: 1
unescape Int 是否转义中文 如果您希望json不被unicode, 直接输出中文, 请传此参数: 1

备注

cityid、city和ip参数3选一提交,如果不传,默认返回当前ip城市天气,cityid优先级最高。

响应JSON

{
    "list":[
        {
            "time":"2022-06-23 00:00:00",//时间点, 昨日数据是从0点开始-24点逐小时
            "value":0 //小时降雨量mm
        },
        {
            "time":"2022-06-23 01:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 02:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 03:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 04:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 05:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 06:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 07:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 08:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 09:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 10:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 11:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 12:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 13:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 14:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 15:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 16:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 17:00:00",
            "value":1.9
        },
        {
            "time":"2022-06-23 18:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 19:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 20:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 21:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 22:00:00",
            "value":0
        },
        {
            "time":"2022-06-23 23:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 00:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 01:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 02:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 03:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 04:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 05:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 06:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 07:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 08:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 11:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 14:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 17:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 20:00:00",
            "value":0
        },
        {
            "time":"2022-06-24 23:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 02:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 05:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 08:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 11:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 14:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 17:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 20:00:00",
            "value":0
        },
        {
            "time":"2022-06-25 23:00:00",
            "value":1
        },
        {
            "time":"2022-06-26 02:00:00",
            "value":1
        },
        {
            "time":"2022-06-26 05:00:00",
            "value":1
        },
        {
            "time":"2022-06-26 08:00:00",
            "value":1
        },
        {
            "time":"2022-06-26 14:00:00",
            "value":1
        },
        {
            "time":"2022-06-26 20:00:00",
            "value":1
        },
        {
            "time":"2022-06-27 02:00:00",
            "value":5
        }
    ]
}