开发指南

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

专业七日天气接口v93


新版七日天气数据半小时左右更新一次,包含实况天气、一周天气、每日小时数据、实时气象预警等,可按地名、城市编号、IP查询。

字段描述
  • ∞ 实况天气包含:实时温度、体感温度、气压hPa、降雨量、天气现象、湿度、风力、风向、空气质量。
  • ∞ 七日天气包含:白天温度(高温)、夜间温度(低温)、天气现象(白天、夜间)、风力风向(白天、夜间)、当天逐小时天气。
  • ∞ 七日小时包含:当前时间点、温度、降雨量、风向、风力(米/秒)、气压hPa、湿度。

可实现效果图如下:

地区权限 请求限制 使用方案(报价为不开票价格) 发票
全国所有市区县 每日2万次 350/一年(最低) 1400/五年(最低) 2730/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日5万次 400/一年(最低) 1600/五年(最低) 3120/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日10万次 550/一年(最低) 2200/五年(最低) 4290/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日20万次 1100/一年(最低) 4400/五年(最低) 8580/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日50万次 2750/一年(最低) 11000/五年(最低) 21450/永久(最低) 可开普票/电子票/专票
全国所有市区县 每日百万~千万次 联系客服开通独享版本,最低9800/年 可开普票/电子票/专票

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

请求方式及url:

  • 请求方式:GET

  • 接口地址:(建议将线路地址设置在服务端可动态修改)

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

请求示例

https://v0.yiketianqi.com/api?unescape=1&version=v93&appid=&appsecret=&ext=&cityid=

请求参数说明:

参数名 必选 类型 说明 备注(示例)
appid string 用户appid 注册开发账号
appsecret string 用户appsecret
version string 接口版本标识 固定值: v93 每个接口的version值都不一样
cityid string 城市ID 请参考 v93城市ID列表
city string 城市名称 不要带市和区; 如: 青岛、铁西
province string 所在省 如果您担心city重名可传此参数, 不要带省和市; 如: 山东、上海
ip string IP地址 查询IP所在城市天气
lng String 经度 如: 119.545023 (需额外开通lbs权限, 500/年, 2000/5年)
lat String 纬度 如: 36.044254
point String 坐标体系 默认百度坐标, 如使用高德坐标, 请传参: gaode
callback string jsonp参数 如: jQuery.Callbacks
vue string 跨域参数 如果您使用的是react、vue、angular请填写值: 1
unescape Int 是否转义中文 如果您希望json不被unicode, 直接输出中文, 请传此参数: 1

备注

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

响应JSON

{
    "errcode":0,
    "errmsg":"success",
    "update_time":"2021-12-01 21:07:22",
    "cityid":"101120201",
    "province":"山东省",
    "city":"青岛",
    "day":{
        "tem":"4",
        "pressure":"1019",
        "rain":"0",
        "feel":"1.4",
        "wea":"晴",
        "icon":"0",
        "humidity":"43%",
        "win":"东北风",
        "win_speed":"微风",
        "air":"29",
        "air_level":"优"
    },
    "week":[
        {
            "date":"2021-12-03",
            "week":"周五",
            "day_tem":"9",
            "day_wea":"晴",
            "day_wea_img":"0",
            "day_win":"西南风",
            "day_win_speed":"4~5级",
            "night_tem":"3",
            "night_wea":"晴",
            "night_wea_img":"0",
            "night_win":"西南风",
            "night_win_speed":"4~5级",
            "hours":[
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"2.9",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"4.6m\/s",
                    "pressure":"1025.2hPa",
                    "humidity":"48%"
                },
                {
                    "time":"02日02:00",
                    "icon":"0",
                    "tem":"2.4",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"5.3m\/s",
                    "pressure":"1023.3hPa",
                    "humidity":"55.9%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"2.2",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"6m\/s",
                    "pressure":"1021.3hPa",
                    "humidity":"60.3%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"3.9",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1020.7hPa",
                    "humidity":"57.4%"
                },
                {
                    "time":"11:00",
                    "icon":"0",
                    "tem":"6.4",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"10.7m\/s",
                    "pressure":"1019.2hPa",
                    "humidity":"50%"
                },
                {
                    "time":"14:00",
                    "icon":"0",
                    "tem":"8.8",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"9.2m\/s",
                    "pressure":"1015.7hPa",
                    "humidity":"46.6%"
                },
                {
                    "time":"17:00",
                    "icon":"0",
                    "tem":"7.8",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"7.7m\/s",
                    "pressure":"1015.3hPa",
                    "humidity":"54%"
                },
                {
                    "time":"20:00",
                    "icon":"0",
                    "tem":"6.1",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"7.2m\/s",
                    "pressure":"1017.1hPa",
                    "humidity":"42.2%"
                }
            ]
        },
        {
			"date":"2021-12-04",
            "week":"周六",
            "day_tem":"9",
            "day_wea":"晴",
            "day_wea_img":"0",
            "day_win":"西南风",
            "day_win_speed":"4~5级",
            "night_tem":"3",
            "night_wea":"晴",
            "night_wea_img":"0",
            "night_win":"西南风",
            "night_win_speed":"4~5级",
            "hours":[
                {
                    "time":"11:00",
                    "icon":"0",
                    "tem":"6.4",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"10.7m\/s",
                    "pressure":"1019.2hPa",
                    "humidity":"50%"
                },
                {
                    "time":"14:00",
                    "icon":"0",
                    "tem":"8.8",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"9.2m\/s",
                    "pressure":"1015.7hPa",
                    "humidity":"46.6%"
                },
                {
                    "time":"17:00",
                    "icon":"0",
                    "tem":"7.8",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"7.7m\/s",
                    "pressure":"1015.3hPa",
                    "humidity":"54%"
                },
                {
                    "time":"20:00",
                    "icon":"0",
                    "tem":"6.1",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"7.2m\/s",
                    "pressure":"1017.1hPa",
                    "humidity":"42.2%"
                },
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"3.9",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"10.5m\/s",
                    "pressure":"1018.4hPa",
                    "humidity":"61.8%"
                },
                {
                    "time":"03日02:00",
                    "icon":"0",
                    "tem":"3.9",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"10.2m\/s",
                    "pressure":"1019.4hPa",
                    "humidity":"73.5%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"3.8",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"10.7m\/s",
                    "pressure":"1019.6hPa",
                    "humidity":"70.3%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"3.2",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"10m\/s",
                    "pressure":"1022.3hPa",
                    "humidity":"64.2%"
                }
            ]
        },
        {
			"date":"2021-12-06",
            "week":"周日",
            "day_tem":"9",
            "day_wea":"晴",
            "day_wea_img":"0",
            "day_win":"西北风",
            "day_win_speed":"3~4级",
            "night_tem":"4",
            "night_wea":"晴",
            "night_wea_img":"0",
            "night_win":"西北风",
            "night_win_speed":"3~4级",
            "hours":[
                {
                    "time":"11:00",
                    "icon":"0",
                    "tem":"6.9",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1023.1hPa",
                    "humidity":"58%"
                },
                {
                    "time":"14:00",
                    "icon":"0",
                    "tem":"8.8",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"7.8m\/s",
                    "pressure":"1021.4hPa",
                    "humidity":"51.3%"
                },
                {
                    "time":"17:00",
                    "icon":"0",
                    "tem":"7.8",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"5.8m\/s",
                    "pressure":"1021.7hPa",
                    "humidity":"48.4%"
                },
                {
                    "time":"20:00",
                    "icon":"0",
                    "tem":"6.5",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"6.2m\/s",
                    "pressure":"1022.2hPa",
                    "humidity":"48.4%"
                },
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"5.6",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1022.5hPa",
                    "humidity":"55.6%"
                },
                {
                    "time":"04日02:00",
                    "icon":"0",
                    "tem":"5.6",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"6.2m\/s",
                    "pressure":"1023.2hPa",
                    "humidity":"69.7%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"4.2",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"6.8m\/s",
                    "pressure":"1023.5hPa",
                    "humidity":"78.6%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"4.8",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"6.1m\/s",
                    "pressure":"1025.2hPa",
                    "humidity":"70%"
                }
            ]
        },
        {
            "day_tem":"11",
            "day_wea":"晴",
            "day_wea_img":"0",
            "day_win":"西南风",
            "day_win_speed":"3~4级",
            "night_tem":"6",
            "night_wea":"晴",
            "night_wea_img":"0",
            "night_win":"西南风",
            "night_win_speed":"3~4级",
            "hours":[
                {
                    "time":"11:00",
                    "icon":"0",
                    "tem":"9.3",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"7.7m\/s",
                    "pressure":"1026.5hPa",
                    "humidity":"56.8%"
                },
                {
                    "time":"14:00",
                    "icon":"0",
                    "tem":"10.7",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"6.1m\/s",
                    "pressure":"1025.1hPa",
                    "humidity":"42.7%"
                },
                {
                    "time":"17:00",
                    "icon":"0",
                    "tem":"10.5",
                    "rain":"-",
                    "win":"东南风",
                    "win_meter":"7.3m\/s",
                    "pressure":"1025.2hPa",
                    "humidity":"66.6%"
                },
                {
                    "time":"20:00",
                    "icon":"0",
                    "tem":"10.8",
                    "rain":"-",
                    "win":"东南风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1025.8hPa",
                    "humidity":"43.2%"
                },
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"7.3",
                    "rain":"-",
                    "win":"东南风",
                    "win_meter":"7.4m\/s",
                    "pressure":"1025.3hPa",
                    "humidity":"70.2%"
                },
                {
                    "time":"05日02:00",
                    "icon":"0",
                    "tem":"6.2",
                    "rain":"-",
                    "win":"东南风",
                    "win_meter":"7.7m\/s",
                    "pressure":"1024.6hPa",
                    "humidity":"89%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"6.8",
                    "rain":"-",
                    "win":"南风",
                    "win_meter":"6.4m\/s",
                    "pressure":"1024hPa",
                    "humidity":"86.7%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"6.9",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1024hPa",
                    "humidity":"85.7%"
                }
            ]
        },
        {
            "day_tem":"12",
            "day_wea":"多云",
            "day_wea_img":"1",
            "day_win":"西南风",
            "day_win_speed":"3~4级",
            "night_tem":"7",
            "night_wea":"多云",
            "night_wea_img":"1",
            "night_win":"南风",
            "night_win_speed":"3~4级",
            "hours":[
                {
                    "time":"11:00",
                    "icon":"1",
                    "tem":"10.9",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1023.6hPa",
                    "humidity":"75.2%"
                },
                {
                    "time":"14:00",
                    "icon":"1",
                    "tem":"11.8",
                    "rain":"-",
                    "win":"南风",
                    "win_meter":"7.2m\/s",
                    "pressure":"1021hPa",
                    "humidity":"72.3%"
                },
                {
                    "time":"17:00",
                    "icon":"1",
                    "tem":"9.9",
                    "rain":"-",
                    "win":"南风",
                    "win_meter":"7m\/s",
                    "pressure":"1020.6hPa",
                    "humidity":"79.9%"
                },
                {
                    "time":"20:00",
                    "icon":"1",
                    "tem":"9.6",
                    "rain":"-",
                    "win":"南风",
                    "win_meter":"6.4m\/s",
                    "pressure":"1021hPa",
                    "humidity":"64.3%"
                },
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"9.8",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"7.7m\/s",
                    "pressure":"1020.7hPa",
                    "humidity":"69.5%"
                },
                {
                    "time":"06日02:00",
                    "icon":"0",
                    "tem":"9.1",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"7.8m\/s",
                    "pressure":"1020hPa",
                    "humidity":"79.8%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"8.7",
                    "rain":"-",
                    "win":"西南风",
                    "win_meter":"7.9m\/s",
                    "pressure":"1019.1hPa",
                    "humidity":"73.3%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"8.3",
                    "rain":"-",
                    "win":"西风",
                    "win_meter":"7.5m\/s",
                    "pressure":"1019.8hPa",
                    "humidity":"69.5%"
                }
            ]
        },
        {
            "day_tem":"10",
            "day_wea":"多云",
            "day_wea_img":"1",
            "day_win":"北风",
            "day_win_speed":"5~6级",
            "night_tem":"3",
            "night_wea":"多云",
            "night_wea_img":"1",
            "night_win":"北风",
            "night_win_speed":"5~6级",
            "hours":[
                {
                    "time":"11:00",
                    "icon":"0",
                    "tem":"9.8",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"8.6m\/s",
                    "pressure":"1019.2hPa",
                    "humidity":"65.7%"
                },
                {
                    "time":"14:00",
                    "icon":"0",
                    "tem":"9.3",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"7.3m\/s",
                    "pressure":"1018.5hPa",
                    "humidity":"62.4%"
                },
                {
                    "time":"17:00",
                    "icon":"0",
                    "tem":"8.1",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"10m\/s",
                    "pressure":"1019.5hPa",
                    "humidity":"63.3%"
                },
                {
                    "time":"20:00",
                    "icon":"0",
                    "tem":"7.2",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"13.8m\/s",
                    "pressure":"1020.4hPa",
                    "humidity":"53.1%"
                },
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"4.2",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"13.1m\/s",
                    "pressure":"1020.7hPa",
                    "humidity":"69.4%"
                },
                {
                    "time":"07日02:00",
                    "icon":"0",
                    "tem":"3.2",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"13.8m\/s",
                    "pressure":"1021hPa",
                    "humidity":"73.5%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"3.2",
                    "rain":"-",
                    "win":"西北风",
                    "win_meter":"13.4m\/s",
                    "pressure":"1021.6hPa",
                    "humidity":"84.8%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"3.8",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"12.2m\/s",
                    "pressure":"1022.2hPa",
                    "humidity":"81.9%"
                }
            ]
        },
        {
            "day_tem":"7",
            "day_wea":"晴",
            "day_wea_img":"0",
            "day_win":"北风",
            "day_win_speed":"5~6级",
            "night_tem":"3",
            "night_wea":"晴",
            "night_wea_img":"0",
            "night_win":"北风",
            "night_win_speed":"5~6级",
            "hours":[
                {
                    "time":"11:00",
                    "icon":"0",
                    "tem":"5.8",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"9.7m\/s",
                    "pressure":"1021.6hPa",
                    "humidity":"61.8%"
                },
                {
                    "time":"14:00",
                    "icon":"0",
                    "tem":"6.8",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"10m\/s",
                    "pressure":"1021hPa",
                    "humidity":"58.5%"
                },
                {
                    "time":"17:00",
                    "icon":"0",
                    "tem":"6.1",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"8.8m\/s",
                    "pressure":"1022.2hPa",
                    "humidity":"67.3%"
                },
                {
                    "time":"20:00",
                    "icon":"0",
                    "tem":"5.4",
                    "rain":"-",
                    "win":"东北风",
                    "win_meter":"13.8m\/s",
                    "pressure":"1023.3hPa",
                    "humidity":"52.5%"
                },
                {
                    "time":"23:00",
                    "icon":"0",
                    "tem":"4.1",
                    "rain":"-",
                    "win":"东北风",
                    "win_meter":"13.8m\/s",
                    "pressure":"1023.3hPa",
                    "humidity":"79.4%"
                },
                {
                    "time":"08日02:00",
                    "icon":"0",
                    "tem":"3.7",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"10.4m\/s",
                    "pressure":"1023.3hPa",
                    "humidity":"77.3%"
                },
                {
                    "time":"05:00",
                    "icon":"0",
                    "tem":"3.2",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"10.1m\/s",
                    "pressure":"1023.7hPa",
                    "humidity":"75.2%"
                },
                {
                    "time":"08:00",
                    "icon":"0",
                    "tem":"6.1",
                    "rain":"-",
                    "win":"北风",
                    "win_meter":"9.7m\/s",
                    "pressure":"1024hPa",
                    "humidity":"70.2%"
                }
            ]
        }
    ],
    "alarm":[
        {
            "alarm_type":"大风",
            "alarm_level":"蓝色",
            "alarm_title":"山东省青岛市发布大风蓝色预警",
            "alarm_content":"青岛市气象台2021年12月01日15时20分发布大风蓝色预警信号:预计今天下午到傍晚,我市西北风陆地4~5级阵风7级,近海海域6~7级阵风9级,明天白天到上半夜,我市西南风陆地4~5级阵风6级,近海海域6~7级阵风8级。请注意防范。(预警信息来源:国家预警信息发布中心)"
        }
    ]
}