## 1-40日天气预报api接口文档 > 该接口2小时更新一次,返回最近40日天气, 包含每日日期、农历日期、星期几、天气情况、白天天气、夜间天气、高温低温、日出日落时间、空气质量等,可按地名、城市编号、LBS、IP查询。 > 前往官网开通接口:https://tianqiapi.com/index/doc?version=v3 > 对接技术支持QQ:445899710 微信号:hype522147 | 地区权限 | 请求限制 | 使用方案 | 发票 | | --- | --- | --- | --- | | 全国3200个市区县 | 每日10万次 | 365/一年(最低) | 1500/永久(最低) | 可提供普票、电子票、专票 | | 全国3200个市区县 | 每日百万~千万次 | 联系客服开通独享版本,最低12800/年 | 可开普票/电子票/专票 | **请求示例** `https://v0.yiketianqi.com/api?unescape=1&version=v63&appid=43656176&appsecret=I42og6Lm` **请求参数说明:** | 参数名 | 必选 | 类型 | 说明 | 备注(示例) | | --- | --- | --- | --- | --- | | appid | 是 | string | 用户appid | [注册开发账号](https://www.tianqiapi.com/user) | | appsecret | 是 | string | 用户appsecret | | | version | 是 | string | 接口版本标识 | 固定值:`v63`每个接口的version值都不一样 | | cityid | 否 | string | 城市ID | 请参考[城市ID列表](https://yikeapi.com/help/tianqicity) | | 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优先级最高。 **返回结果** ``` { "city":"济南", "cityid":"101120101", "update_time":"2022-03-07 21:38:54", "data":[ { "date":"2022-03-07", "date_nl":"二月初五", "week":"星期一", "wea":"晴", "wea_c":"00", "wea_img":"qing", "wea_day":"晴", "wea_day_img":"qing", "wea_night":"晴", "wea_night_img":"qing", "tem1":"17", "tem2":"9", "sunrise":"06:34", "sunset":"18:11", "air":"83", "win":"西北风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-08", "date_nl":"二月初六", "week":"星期二", "wea":"晴", "wea_c":"00", "wea_img":"qing", "wea_day":"晴", "wea_day_img":"qing", "wea_night":"晴", "wea_night_img":"qing", "tem1":"21", "tem2":"12", "sunrise":"06:32", "sunset":"18:11", "air":"85", "win":"南风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-09", "date_nl":"二月初七", "week":"星期三", "wea":"多云转晴", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"晴", "wea_night_img":"qing", "tem1":"22", "tem2":"14", "sunrise":"06:31", "sunset":"18:12", "air":"89", "win":"南风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-10", "date_nl":"二月初八", "week":"星期四", "wea":"晴", "wea_c":"00", "wea_img":"qing", "wea_day":"晴", "wea_day_img":"qing", "wea_night":"晴", "wea_night_img":"qing", "tem1":"23", "tem2":"14", "sunrise":"06:29", "sunset":"18:13", "air":"87", "win":"南风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-11", "date_nl":"二月初九", "week":"星期五", "wea":"晴转多云", "wea_c":"00", "wea_img":"yun", "wea_day":"晴", "wea_day_img":"qing", "wea_night":"多云", "wea_night_img":"yun", "tem1":"25", "tem2":"14", "sunrise":"06:28", "sunset":"18:14", "air":"72", "win":"南风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-12", "date_nl":"二月初十", "week":"星期六", "wea":"阴", "wea_c":"02", "wea_img":"yin", "wea_day":"阴", "wea_day_img":"yin", "wea_night":"阴", "wea_night_img":"yin", "tem1":"24", "tem2":"8", "sunrise":"06:27", "sunset":"18:15", "air":"", "win":"南风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-13", "date_nl":"二月十一", "week":"星期日", "wea":"阴转多云", "wea_c":"02", "wea_img":"yun", "wea_day":"阴", "wea_day_img":"yin", "wea_night":"多云", "wea_night_img":"yun", "tem1":"16", "tem2":"8", "sunrise":"06:25", "sunset":"18:16", "air":"", "win":"北风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-14", "date_nl":"二月十二", "week":"星期一", "wea":"多云转晴", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"晴", "wea_night_img":"qing", "tem1":"18", "tem2":"6", "sunrise":"06:24", "sunset":"18:17", "air":"", "win":"南风<3级", "win_day":"", "win_night":"" }, { "date":"2022-03-15", "date_nl":"二月十三", "week":"星期二", "wea":"雨", "wea_c":"301", "wea_img":"yu", "wea_day":"雨", "wea_day_img":"yu", "wea_night":"雨", "wea_night_img":"yu", "tem1":"16", "tem2":"4", "sunrise":"06:22", "sunset":"18:18", "air":"", "win":"东风<3级", "win_day":"", "win_night":"" }, { "date":"2022-03-16", "date_nl":"二月十四", "week":"星期三", "wea":"雨", "wea_c":"301", "wea_img":"yu", "wea_day":"雨", "wea_day_img":"yu", "wea_night":"雨", "wea_night_img":"yu", "tem1":"9", "tem2":"3", "sunrise":"06:21", "sunset":"18:19", "air":"", "win":"东北风<3级", "win_day":"", "win_night":"" }, { "date":"2022-03-17", "date_nl":"二月十五", "week":"星期四", "wea":"阴", "wea_c":"02", "wea_img":"yin", "wea_day":"阴", "wea_day_img":"yin", "wea_night":"阴", "wea_night_img":"yin", "tem1":"12", "tem2":"5", "sunrise":"06:19", "sunset":"18:20", "air":"", "win":"东北风<3级", "win_day":"", "win_night":"" }, { "date":"2022-03-18", "date_nl":"二月十六", "week":"星期五", "wea":"阴", "wea_c":"02", "wea_img":"yin", "wea_day":"阴", "wea_day_img":"yin", "wea_night":"阴", "wea_night_img":"yin", "tem1":"18", "tem2":"8", "sunrise":"06:18", "sunset":"18:21", "air":"", "win":"东风<3级", "win_day":"", "win_night":"" }, { "date":"2022-03-19", "date_nl":"二月十七", "week":"星期六", "wea":"雨转雨夹雪", "wea_c":"301", "wea_img":"xue", "wea_day":"雨", "wea_day_img":"yu", "wea_night":"雨夹雪", "wea_night_img":"xue", "tem1":"12", "tem2":"0", "sunrise":"06:16", "sunset":"18:21", "air":"", "win":"东北风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-20", "date_nl":"二月十八", "week":"星期日", "wea":"阴", "wea_c":"02", "wea_img":"yin", "wea_day":"阴", "wea_day_img":"yin", "wea_night":"阴", "wea_night_img":"yin", "tem1":"5", "tem2":"1", "sunrise":"06:15", "sunset":"18:22", "air":"", "win":"东北风3-4级", "win_day":"", "win_night":"" }, { "date":"2022-03-21", "date_nl":"二月十九", "week":"星期一", "wea":"阴", "wea_c":"02", "wea_img":"yin", "wea_day":"阴", "wea_day_img":"yin", "wea_night":"阴", "wea_night_img":"yin", "tem1":"11", "tem2":"3", "sunrise":"06:13", "sunset":"18:23", "air":"", "win":"西北风<3级", "win_day":"", "win_night":"" }, { "date":"2022-03-22", "date_nl":"二月二十", "week":"星期二", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"15", "tem2":"4", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-23", "date_nl":"二月廿一", "week":"星期三", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"13", "tem2":"3", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-24", "date_nl":"二月廿二", "week":"星期四", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"12", "tem2":"1", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-25", "date_nl":"二月廿三", "week":"星期五", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"14", "tem2":"1", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-26", "date_nl":"二月廿四", "week":"星期六", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"14", "tem2":"2", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-27", "date_nl":"二月廿五", "week":"星期日", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"13", "tem2":"3", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-28", "date_nl":"二月廿六", "week":"星期一", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"12", "tem2":"3", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-29", "date_nl":"二月廿七", "week":"星期二", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"15", "tem2":"4", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-30", "date_nl":"二月廿八", "week":"星期三", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"15", "tem2":"5", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-03-31", "date_nl":"二月廿九", "week":"星期四", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"16", "tem2":"6", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-01", "date_nl":"三月初一", "week":"星期五", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"6", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-02", "date_nl":"三月初二", "week":"星期六", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"17", "tem2":"6", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-03", "date_nl":"三月初三", "week":"星期日", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"16", "tem2":"6", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-04", "date_nl":"三月初四", "week":"星期一", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"17", "tem2":"7", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-05", "date_nl":"三月初五", "week":"星期二", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"16", "tem2":"8", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-06", "date_nl":"三月初六", "week":"星期三", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"16", "tem2":"7", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-07", "date_nl":"三月初七", "week":"星期四", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"8", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-08", "date_nl":"三月初八", "week":"星期五", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"9", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-09", "date_nl":"三月初九", "week":"星期六", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"19", "tem2":"8", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-10", "date_nl":"三月初十", "week":"星期日", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"7", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-11", "date_nl":"三月十一", "week":"星期一", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"7", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-12", "date_nl":"三月十二", "week":"星期二", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"6", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-13", "date_nl":"三月十三", "week":"星期三", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"7", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-14", "date_nl":"三月十四", "week":"星期四", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"18", "tem2":"8", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" }, { "date":"2022-04-15", "date_nl":"三月十五", "week":"星期五", "wea":"多云", "wea_c":"01", "wea_img":"yun", "wea_day":"多云", "wea_day_img":"yun", "wea_night":"多云", "wea_night_img":"yun", "tem1":"20", "tem2":"8", "sunrise":"", "sunset":"", "air":"", "win":"", "win_day":"", "win_night":"" } ] } ```