该接口2小时更新一次,返回最近40日天气, 包含每日日期、农历日期、星期几、天气情况、白天天气、夜间天气、高温低温、日出日落时间、空气质量等,可按地名、城市编号、LBS、IP查询。
地区权限 | 请求限制 | 使用方案 | 发票 | |
---|---|---|---|---|
全国3200个市区县 | 每日10万次 | 365/一年(最低) | 1500/永久(最低) | 可提供普票、电子票、专票 |
全国所有市区县 | 每日百万~千万次 | 联系客服开通独享版本,最低12800/年 | 可开普票/电子票/专票 |
请求方式及url:
请求方式:GET
接口地址:(请将线路地址设置为动态可修改的)
http://gfeljm.tianqiapi.com/api
请求示例
http://gfeljm.tianqiapi.com/api?version=v3&appid=&appsecret=
请求参数说明:
参数名 | 必选 | 类型 | 说明 | 备注(示例) |
---|---|---|---|---|
appid | 是 | string | 用户appid | 注册开发账号 |
appsecret | 是 | string | 用户appsecret | |
version | 是 | string | 接口版本标识 | 固定值: v2 v3 v2:15日 v3:40日
|
adcode | 否 | string | 国家统计局城市ID | 如:130200000000 请参考 全国统计用区划代码表 |
cityid | 否 | string | 城市ID | 请参考 城市ID列表 |
city | 否 | string | 城市名称 | 不要带市和区; 如: 青岛、铁西 |
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 |
备注
cityid、city和ip参数3选一提交,如果不传,默认返回当前ip城市天气,cityid优先级最高。
响应参数说明
参数名 | 类型 | 说明 | 备注 |
---|---|---|---|
cityid | String | 城市ID | |
date | String | 当前日期 | |
week | String | 当前星期 | |
update_time | String | 气象台更新时间 | |
city | String | 城市名称 | |
cityEn | String | 城市英文名称 | |
country | String | 国家名称 | |
countryEn | String | 国家英文名称 | |
data | String | 每日数据列表 | |
┗ date_nl | String | 农历日期 | |
┗ date | String | 当前日期 | |
┗ week | String | 当前星期 | |
┗ wea_c | String | 天气图标ID | |
┗ wea | String | 天气情况 | |
┗ wea_day | String | 白天天气 | |
┗ wea_night | String | 晚间天气 | |
┗ wea_img | String | 天气对应图标 | 固定9种类型(您也可以根据wea字段自己处理): xue、lei、shachen、wu、bingbao、yun、yu、yin、qing |
┗ tem1 | String | 白天温度 | |
┗ tem2 | String | 晚上温度 | |
┗ win_day | String | 白天风力风向 | |
┗ win_night | String | 晚上风力风向 |
响应JSON
{
"city":"济南",
"cityid":"101120101",
"update_time":"2023-01-17 10:56:33",
"data":[
{
"date":"2023-01-17",
"date_nl":"腊月廿六",
"week":"星期二",
"wea":"多云转晴",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"晴",
"wea_night_img":"qing",
"tem1":"4",
"tem2":"-6",
"sunrise":"07:22",
"sunset":"17:20",
"air":"59",
"win":"北风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-18",
"date_nl":"腊月廿七",
"week":"星期三",
"wea":"晴转多云",
"wea_c":"00",
"wea_img":"yun",
"wea_day":"晴",
"wea_day_img":"qing",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"5",
"tem2":"-3",
"sunrise":"07:21",
"sunset":"17:21",
"air":"132",
"win":"南风3-4级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-19",
"date_nl":"腊月廿八",
"week":"星期四",
"wea":"晴转多云",
"wea_c":"00",
"wea_img":"yun",
"wea_day":"晴",
"wea_day_img":"qing",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"7",
"tem2":"-6",
"sunrise":"07:21",
"sunset":"17:22",
"air":"80",
"win":"北风3-4级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-20",
"date_nl":"腊月廿九",
"week":"星期五",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"0",
"tem2":"-6",
"sunrise":"07:21",
"sunset":"17:23",
"air":"61",
"win":"北风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-21",
"date_nl":"腊月三十",
"week":"星期六",
"wea":"多云转阴",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"7",
"tem2":"-2",
"sunrise":"07:20",
"sunset":"17:24",
"air":"95",
"win":"南风4-5级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-22",
"date_nl":"正月初一",
"week":"星期日",
"wea":"多云转阴",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"6",
"tem2":"-4",
"sunrise":"07:20",
"sunset":"17:25",
"air":"",
"win":"北风3-4级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-23",
"date_nl":"正月初二",
"week":"星期一",
"wea":"阴转晴",
"wea_c":"02",
"wea_img":"yin",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"晴",
"wea_night_img":"qing",
"tem1":"1",
"tem2":"-8",
"sunrise":"07:19",
"sunset":"17:26",
"air":"",
"win":"北风3-4级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-24",
"date_nl":"正月初三",
"week":"星期二",
"wea":"晴转多云",
"wea_c":"00",
"wea_img":"yun",
"wea_day":"晴",
"wea_day_img":"qing",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"-2",
"tem2":"-9",
"sunrise":"07:19",
"sunset":"17:27",
"air":"",
"win":"南风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-25",
"date_nl":"正月初四",
"week":"星期三",
"wea":"阴转雪",
"wea_c":"02",
"wea_img":"xue",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"雪",
"wea_night_img":"xue",
"tem1":"0",
"tem2":"-6",
"sunrise":"07:18",
"sunset":"17:28",
"air":"",
"win":"东风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-26",
"date_nl":"正月初五",
"week":"星期四",
"wea":"阴",
"wea_c":"02",
"wea_img":"yin",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"0",
"tem2":"-4",
"sunrise":"07:17",
"sunset":"17:29",
"air":"",
"win":"东北风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-27",
"date_nl":"正月初六",
"week":"星期五",
"wea":"阴",
"wea_c":"02",
"wea_img":"yin",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"1",
"tem2":"-2",
"sunrise":"07:17",
"sunset":"17:30",
"air":"",
"win":"西南风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-28",
"date_nl":"正月初七",
"week":"星期六",
"wea":"阴",
"wea_c":"02",
"wea_img":"yin",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"2",
"tem2":"-4",
"sunrise":"07:16",
"sunset":"17:32",
"air":"",
"win":"东北风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-29",
"date_nl":"正月初八",
"week":"星期日",
"wea":"阴",
"wea_c":"02",
"wea_img":"yin",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"0",
"tem2":"-4",
"sunrise":"07:15",
"sunset":"17:33",
"air":"",
"win":"西南风3-4级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-30",
"date_nl":"正月初九",
"week":"星期一",
"wea":"阴",
"wea_c":"02",
"wea_img":"yin",
"wea_day":"阴",
"wea_day_img":"yin",
"wea_night":"阴",
"wea_night_img":"yin",
"tem1":"0",
"tem2":"-4",
"sunrise":"07:15",
"sunset":"17:34",
"air":"",
"win":"北风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-01-31",
"date_nl":"正月初十",
"week":"星期二",
"wea":"晴",
"wea_c":"00",
"wea_img":"qing",
"wea_day":"晴",
"wea_day_img":"qing",
"wea_night":"晴",
"wea_night_img":"qing",
"tem1":"-1",
"tem2":"-9",
"sunrise":"07:14",
"sunset":"17:35",
"air":"",
"win":"西南风<3级",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-01",
"date_nl":"正月十一",
"week":"星期三",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"7",
"tem2":"-3",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-02",
"date_nl":"正月十二",
"week":"星期四",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"7",
"tem2":"-3",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-03",
"date_nl":"正月十三",
"week":"星期五",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"7",
"tem2":"-3",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-04",
"date_nl":"正月十四",
"week":"星期六",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-05",
"date_nl":"正月十五",
"week":"星期日",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-06",
"date_nl":"正月十六",
"week":"星期一",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-07",
"date_nl":"正月十七",
"week":"星期二",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-08",
"date_nl":"正月十八",
"week":"星期三",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-09",
"date_nl":"正月十九",
"week":"星期四",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-10",
"date_nl":"正月二十",
"week":"星期五",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-11",
"date_nl":"正月廿一",
"week":"星期六",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-12",
"date_nl":"正月廿二",
"week":"星期日",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-2",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-13",
"date_nl":"正月廿三",
"week":"星期一",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-14",
"date_nl":"正月廿四",
"week":"星期二",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"9",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-15",
"date_nl":"正月廿五",
"week":"星期三",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"8",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-16",
"date_nl":"正月廿六",
"week":"星期四",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"9",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-17",
"date_nl":"正月廿七",
"week":"星期五",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"10",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-18",
"date_nl":"正月廿八",
"week":"星期六",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"9",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-19",
"date_nl":"正月廿九",
"week":"星期日",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"9",
"tem2":"-1",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-20",
"date_nl":"二月初一",
"week":"星期一",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"9",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-21",
"date_nl":"二月初二",
"week":"星期二",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"10",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-22",
"date_nl":"二月初三",
"week":"星期三",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"10",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-23",
"date_nl":"二月初四",
"week":"星期四",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"10",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-24",
"date_nl":"二月初五",
"week":"星期五",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"10",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
},
{
"date":"2023-02-25",
"date_nl":"二月初六",
"week":"星期六",
"wea":"多云",
"wea_c":"01",
"wea_img":"yun",
"wea_day":"多云",
"wea_day_img":"yun",
"wea_night":"多云",
"wea_night_img":"yun",
"tem1":"10",
"tem2":"0",
"sunrise":"",
"sunset":"",
"air":"",
"win":"",
"win_day":"",
"win_night":""
}
]
}