可查询自2022年12月5日至今日的所有历史天气数据, 可查询某一天、某个日期区间、某月。
返回字段包含:白天天气、夜间天气、高温(白天天气)、低温(夜间天气)、湿度、能见度、气压、风向(白天到夜间)、风力(白天到夜间)、风速km/h、空气质量数值、pm2.5、pm10、o3、no2、so2、co、日出时间、日落时间、月初时间、月落时间、月相、紫外线、云量、降雨量。
地区权限 | 请求限制 | 使用方案 | 发票 | |
---|---|---|---|---|
全国所有市区县 | 每日2万次 | 350/一年 | 1400/永久 | 可开电子普票、专票 |
全国所有市区县 | 每日5万次 | 385/一年 | 1540/永久 | 可开电子普票、专票 |
全国所有市区县 | 每日10万次 | 454/一年 | 1819/永久 | 可开电子普票、专票 |
全国所有市区县 | 每日20万次 | 700/一年 | 2800/永久 | 可开电子普票、专票 |
全国所有市区县 | 每日50万次 | 1400/一年 | 5600/永久 | 可开电子普票、专票 |
全国所有市区县 | 每日百万~千万次 | 联系客服开通独享版本,最低12800/年 | 可开电子普票、专票 |
请求方式及url:
请求方式:GET
接口地址:(请将线路地址设置在服务端, 为动态可修改的, 请勿在C端直连接口, 防止遇到网络问题导致程序异常。)
http://gfeljm.tianqiapi.com/api
请求示例 (该请求账号为测试账号, 不定期失效, 请使用自己的账号appid和appsecret)
http://gfeljm.tianqiapi.com/free/history?appid=&appsecret=&cityid=101120101&year=2023&month=1&date=
请求参数说明:
参数名 | 必选 | 类型 | 说明 | 备注(示例) |
---|---|---|---|---|
appid | True | string | 用户appid | 注册开发账号 |
appsecret | True | String | 用户appsecret | |
cityid | True | String | 城市ID | 请参考 城市ID列表 |
year | False | Int | 年份 | 如: 2015 |
month | False | Int | 月份 | 如: 5 |
date | False | String | 根据日期区间查询 | 如: 2023-01-01_2023-01-15,用下划线分割。 如果只查询某天,只传当前日期即可, 带下划线会理解为区间查询 |
备注
传date解析为根据日期查询,传year和month解析为按年月查询, 2选一提交。
响应参数说明
参数名 | 类型 | 说明 | 备注 |
---|---|---|---|
nums | Int | 实时请求次数 | |
cityid | String | 城市ID | |
days | Int | 返回日期数量 | |
date_start | String | 开始日期 | |
date_end | String | 结束日期 | |
list | Array | 日期预报列表 | |
┗ date | String | 日期 | |
┗ wea_day | String | 白天天气 | |
┗ wea_day_img | String | 白天天气图标 | |
┗ wea_night | String | 夜晚天气 | |
┗ wea_night_img | String | 夜晚天气图标 | |
┗ tem_day | String | 高温(白天天气) | |
┗ tem_night | String | 低温(夜间天气) | |
┗ humidity | String | 湿度 | |
┗ visibility | String | 能见度km | |
┗ pressure | String | 气压 | |
┗ win | String | 风向(白天到夜间) | |
┗ win_speed | String | 风力(白天到夜间) | |
┗ win_meter | String | 风速km/h | |
┗ air | String | 空气质量 | |
┗ pm25 | String | PM2.5 | |
┗ pm10 | String | PM10 | |
┗ o3 | String | o3 | |
┗ no2 | String | no2 | |
┗ so2 | String | so2 | |
┗ co | String | co | |
┗ sunrise | String | 日出时间 | |
┗ sunset | String | 日落时间 | |
┗ moonrise | String | 月初时间 | |
┗ moonset | String | 月落时间 | |
┗ moonIcon | String | 月相标识 | |
┗ uv | String | 紫外线 | |
┗ cloudPct | String | 云量 | |
┗ precipPct | String | 降雨量 |
响应JSON
{
"nums":3,
"cityid":"101120101",
"days":31,
"date_start":"2023-01-01",
"date_end":"2023-01-31",
"list":[
{
"date":"2023-01-01",
"wea_day":"多云",
"wea_night":"晴",
"tem_day":"8",
"tem_night":"-2",
"humidity":"52",
"visibility":"4",
"pressure":"1011",
"win":"西南风转南风",
"win_speed":"3-4级转<3级",
"win_meter":"6",
"air":"175",
"pm25":"132",
"pm10":"186",
"o3":"4",
"no2":"86",
"so2":"14",
"co":"1",
"sunrise":"07:23",
"sunset":"17:05",
"moonrise":"13:06",
"moonset":"01:57",
"moonIcon":"WXG",
"wea_day_img":"yun",
"wea_night_img":"qing"
},
{
"date":"2023-01-02",
"wea_day":"多云",
"wea_night":"多云",
"tem_day":"9",
"tem_night":"-3",
"humidity":"31",
"visibility":"19",
"pressure":"1014",
"win":"东风转北风",
"win_speed":"<3级",
"win_meter":"5",
"air":"206",
"pm25":"156",
"pm10":"237",
"o3":"7",
"no2":"93",
"so2":"36",
"co":"1",
"sunrise":"07:23",
"sunset":"17:05",
"moonrise":"13:35",
"moonset":"03:00",
"moonIcon":"WXG",
"wea_day_img":"yun",
"wea_night_img":"yun"
},
{
"date":"2023-01-03",
"wea_day":"多云",
"wea_night":"晴",
"tem_day":"7",
"tem_night":"-3",
"humidity":"56",
"visibility":"4",
"pressure":"1012",
"win":"西北风转南风",
"win_speed":"<3级",
"win_meter":"4",
"air":"175",
"pm25":"132",
"pm10":"190",
"o3":"6",
"no2":"74",
"so2":"36",
"co":"1",
"sunrise":"07:23",
"sunset":"17:06",
"moonrise":"14:07",
"moonset":"04:02",
"moonIcon":"WXG",
"wea_day_img":"yun",
"wea_night_img":"qing"
},
{
"date":"2023-01-04",
"wea_day":"多云",
"wea_night":"多云",
"tem_day":"7",
"tem_night":"0",
"humidity":"56",
"visibility":"4",
"pressure":"1009",
"win":"北风转南风",
"win_speed":"<3级",
"win_meter":"2",
"air":"138",
"pm25":"105",
"pm10":"142",
"o3":"90",
"no2":"35",
"so2":"10",
"co":"0",
"sunrise":"07:23",
"sunset":"17:07",
"moonrise":"14:45",
"moonset":"05:04",
"moonIcon":"WXG",
"wea_day_img":"yun",
"wea_night_img":"yun"
},
{
"date":"2023-01-05",
"wea_day":"多云",
"wea_night":"晴",
"tem_day":"9",
"tem_night":"0",
"humidity":"75",
"visibility":"2",
"pressure":"1009",
"win":"南风",
"win_speed":"<3级转3-4级",
"win_meter":"4",
"air":"228",
"pm25":"178",
"pm10":"232",
"o3":"2",
"no2":"80",
"so2":"11",
"co":"1",
"sunrise":"07:24",
"sunset":"17:08",
"moonrise":"15:29",
"moonset":"06:04",
"moonIcon":"WXG",
"wea_day_img":"yun",
"wea_night_img":"qing"
},
{
"date":"2023-01-06",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"10",
"tem_night":"0",
"humidity":"45",
"visibility":"2",
"pressure":"1003",
"win":"西北风转南风",
"win_speed":"3-4级转<3级",
"win_meter":"8",
"air":"235",
"pm25":"185",
"pm10":"234",
"o3":"118",
"no2":"40",
"so2":"10",
"co":"1",
"sunrise":"07:24",
"sunset":"17:09",
"moonrise":"16:19",
"moonset":"06:59",
"moonIcon":"F",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-07",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"13",
"tem_night":"5",
"humidity":"29",
"visibility":"21",
"pressure":"1001",
"win":"南风",
"win_speed":"3-4级转4-5级",
"win_meter":"8",
"air":"75",
"pm25":"24",
"pm10":"100",
"o3":"6",
"no2":"52",
"so2":"7",
"co":"0",
"sunrise":"07:24",
"sunset":"17:10",
"moonrise":"17:14",
"moonset":"07:49",
"moonIcon":"F",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-08",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"12",
"tem_night":"1",
"humidity":"51",
"visibility":"4",
"pressure":"998",
"win":"北风",
"win_speed":"<3级转3-4级",
"win_meter":"4",
"air":"195",
"pm25":"147",
"pm10":"276",
"o3":"6",
"no2":"104",
"so2":"37",
"co":"2",
"sunrise":"07:24",
"sunset":"17:10",
"moonrise":"18:12",
"moonset":"08:31",
"moonIcon":"WNG",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-09",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"9",
"tem_night":"-2",
"humidity":"45",
"visibility":"11",
"pressure":"1008",
"win":"东北风",
"win_speed":"3-4级转<3级",
"win_meter":"11",
"air":"102",
"pm25":"76",
"pm10":"139",
"o3":"11",
"no2":"56",
"so2":"20",
"co":"1",
"sunrise":"07:24",
"sunset":"17:11",
"moonrise":"19:12",
"moonset":"09:08",
"moonIcon":"WNG",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-10",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"10",
"tem_night":"0",
"humidity":"30",
"visibility":"30",
"pressure":"1010",
"win":"南风",
"win_speed":"<3级转3-4级",
"win_meter":"6",
"air":"24",
"pm25":"5",
"pm10":"22",
"o3":"36",
"no2":"47",
"so2":"6",
"co":"0",
"sunrise":"07:24",
"sunset":"17:12",
"moonrise":"20:11",
"moonset":"09:40",
"moonIcon":"WNG",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-11",
"wea_day":"多云",
"wea_night":"多云",
"tem_day":"11",
"tem_night":"0",
"humidity":"52",
"visibility":"19",
"pressure":"1002",
"win":"南风",
"win_speed":"3-4级",
"win_meter":"9",
"air":"78",
"pm25":"56",
"pm10":"105",
"o3":"6",
"no2":"60",
"so2":"32",
"co":"1",
"sunrise":"07:23",
"sunset":"17:13",
"moonrise":"21:10",
"moonset":"10:07",
"moonIcon":"WNG",
"wea_day_img":"yun",
"wea_night_img":"yun"
},
{
"date":"2023-01-12",
"wea_day":"小雨",
"wea_night":"小雨",
"tem_day":"13",
"tem_night":"5",
"humidity":"81",
"visibility":"7",
"pressure":"994",
"win":"北风",
"win_speed":"<3级",
"win_meter":"10",
"air":"92",
"pm25":"68",
"pm10":"103",
"o3":"3",
"no2":"76",
"so2":"8",
"co":"1",
"sunrise":"07:23",
"sunset":"17:14",
"moonrise":"22:08",
"moonset":"10:31",
"moonIcon":"WNG",
"wea_day_img":"yu",
"wea_night_img":"yu"
},
{
"date":"2023-01-13",
"wea_day":"阴",
"wea_night":"小雪",
"tem_day":"7",
"tem_night":"-2",
"humidity":"93",
"visibility":"0",
"pressure":"993",
"win":"东北风",
"win_speed":"4-5级",
"win_meter":"4",
"air":"228",
"pm25":"178",
"pm10":"232",
"o3":"6",
"no2":"54",
"so2":"9",
"co":"1",
"sunrise":"07:23",
"sunset":"17:15",
"moonrise":"23:07",
"moonset":"10:55",
"moonIcon":"WNG",
"wea_day_img":"yin",
"wea_night_img":"xue"
},
{
"date":"2023-01-14",
"wea_day":"小雪",
"wea_night":"多云",
"tem_day":"-2",
"tem_night":"-6",
"humidity":"74",
"visibility":"8",
"pressure":"1006",
"win":"东北风转北风",
"win_speed":"4-5级转3-4级",
"win_meter":"9",
"air":"46",
"pm25":"5",
"pm10":"46",
"o3":"58",
"no2":"23",
"so2":"6",
"co":"0",
"sunrise":"07:23",
"sunset":"17:16",
"moonrise":"",
"moonset":"11:19",
"moonIcon":"WNG",
"wea_day_img":"xue",
"wea_night_img":"yun"
},
{
"date":"2023-01-15",
"wea_day":"多云",
"wea_night":"晴",
"tem_day":"-1",
"tem_night":"-7",
"humidity":"33",
"visibility":"30",
"pressure":"1012",
"win":"北风转南风",
"win_speed":"<3级",
"win_meter":"6",
"air":"22",
"pm25":"2",
"pm10":"22",
"o3":"53",
"no2":"26",
"so2":"7",
"co":"0",
"sunrise":"07:23",
"sunset":"17:17",
"moonrise":"00:08",
"moonset":"11:43",
"moonIcon":"LQ",
"wea_day_img":"yun",
"wea_night_img":"qing"
},
{
"date":"2023-01-16",
"wea_day":"晴",
"wea_night":"多云",
"tem_day":"3",
"tem_night":"-5",
"humidity":"63",
"visibility":"21",
"pressure":"1011",
"win":"南风",
"win_speed":"3-4级",
"win_meter":"4",
"air":"62",
"pm25":"44",
"pm10":"59",
"o3":"47",
"no2":"29",
"so2":"10",
"co":"0",
"sunrise":"07:22",
"sunset":"17:18",
"moonrise":"01:11",
"moonset":"12:11",
"moonIcon":"WNC",
"wea_day_img":"qing",
"wea_night_img":"yun"
},
{
"date":"2023-01-17",
"wea_day":"多云",
"wea_night":"多云",
"tem_day":"3",
"tem_night":"-6",
"humidity":"42",
"visibility":"25",
"pressure":"1006",
"win":"北风转南风",
"win_speed":"<3级",
"win_meter":"3",
"air":"55",
"pm25":"29",
"pm10":"59",
"o3":"64",
"no2":"18",
"so2":"8",
"co":"0",
"sunrise":"07:22",
"sunset":"17:19",
"moonrise":"02:18",
"moonset":"12:43",
"moonIcon":"WNC",
"wea_day_img":"yun",
"wea_night_img":"yun"
},
{
"date":"2023-01-18",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"6",
"tem_night":"-4",
"humidity":"46",
"visibility":"14",
"pressure":"1007",
"win":"南风",
"win_speed":"3-4级",
"win_meter":"6",
"air":"106",
"pm25":"41",
"pm10":"161",
"o3":"13",
"no2":"40",
"so2":"9",
"co":"0",
"sunrise":"07:22",
"sunset":"17:20",
"moonrise":"03:29",
"moonset":"13:24",
"moonIcon":"WNC",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-19",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"9",
"tem_night":"-7",
"humidity":"36",
"visibility":"14",
"pressure":"1000",
"win":"南风转北风",
"win_speed":"<3级转3-4级",
"win_meter":"6",
"air":"104",
"pm25":"46",
"pm10":"158",
"o3":"63",
"no2":"14",
"so2":"14",
"co":"0",
"sunrise":"07:21",
"sunset":"17:21",
"moonrise":"04:42",
"moonset":"14:14",
"moonIcon":"WNC",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-20",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"1",
"tem_night":"-5",
"humidity":"32",
"visibility":"30",
"pressure":"1013",
"win":"南风",
"win_speed":"<3级转4-5级",
"win_meter":"2",
"air":"51",
"pm25":"5",
"pm10":"51",
"o3":"42",
"no2":"8",
"so2":"13",
"co":"0",
"sunrise":"07:21",
"sunset":"17:22",
"moonrise":"05:54",
"moonset":"15:16",
"moonIcon":"WNC",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-21",
"wea_day":"多云",
"wea_night":"阴",
"tem_day":"9",
"tem_night":"1",
"humidity":"43",
"visibility":"16",
"pressure":"1003",
"win":"南风",
"win_speed":"4-5级转3-4级",
"win_meter":"19",
"air":"68",
"pm25":"37",
"pm10":"85",
"o3":"25",
"no2":"29",
"so2":"16",
"co":"0",
"sunrise":"07:21",
"sunset":"17:23",
"moonrise":"06:59",
"moonset":"16:28",
"moonIcon":"N",
"wea_day_img":"yun",
"wea_night_img":"yin"
},
{
"date":"2023-01-22",
"wea_day":"多云",
"wea_night":"多云",
"tem_day":"9",
"tem_night":"-6",
"humidity":"79",
"visibility":"5",
"pressure":"1003",
"win":"北风",
"win_speed":"<3级转3-4级",
"win_meter":"4",
"air":"326",
"pm25":"276",
"pm10":"373",
"o3":"36",
"no2":"19",
"so2":"39",
"co":"0",
"sunrise":"07:20",
"sunset":"17:24",
"moonrise":"07:54",
"moonset":"17:47",
"moonIcon":"N",
"wea_day_img":"yun",
"wea_night_img":"yun"
},
{
"date":"2023-01-23",
"wea_day":"阴",
"wea_night":"多云",
"tem_day":"-2",
"tem_night":"-12",
"humidity":"88",
"visibility":"0",
"pressure":"1008",
"win":"东北风转北风",
"win_speed":"3-4级",
"win_meter":"12",
"air":"243",
"pm25":"193",
"pm10":"283",
"o3":"26",
"no2":"16",
"so2":"9",
"co":"0",
"sunrise":"07:20",
"sunset":"17:25",
"moonrise":"08:38",
"moonset":"19:06",
"moonIcon":"WXC",
"wea_day_img":"yin",
"wea_night_img":"yun"
},
{
"date":"2023-01-24",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"-6",
"tem_night":"-12",
"humidity":"23",
"visibility":"30",
"pressure":"1022",
"win":"北风转南风",
"win_speed":"3-4级",
"win_meter":"9",
"air":"78",
"pm25":"2",
"pm10":"105",
"o3":"62",
"no2":"2",
"so2":"8",
"co":"0",
"sunrise":"07:19",
"sunset":"17:26",
"moonrise":"09:15",
"moonset":"20:21",
"moonIcon":"WXC",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-25",
"wea_day":"晴",
"wea_night":"多云",
"tem_day":"1",
"tem_night":"-8",
"humidity":"20",
"visibility":"30",
"pressure":"1009",
"win":"南风",
"win_speed":"3-4级",
"win_meter":"6",
"air":"24",
"pm25":"7",
"pm10":"24",
"o3":"72",
"no2":"3",
"so2":"8",
"co":"0",
"sunrise":"07:19",
"sunset":"17:27",
"moonrise":"09:47",
"moonset":"21:33",
"moonIcon":"WXC",
"wea_day_img":"qing",
"wea_night_img":"yun"
},
{
"date":"2023-01-26",
"wea_day":"多云",
"wea_night":"晴",
"tem_day":"1",
"tem_night":"-7",
"humidity":"51",
"visibility":"17",
"pressure":"1004",
"win":"北风",
"win_speed":"<3级",
"win_meter":"3",
"air":"61",
"pm25":"39",
"pm10":"71",
"o3":"60",
"no2":"14",
"so2":"8",
"co":"0",
"sunrise":"07:18",
"sunset":"17:28",
"moonrise":"10:14",
"moonset":"22:41",
"moonIcon":"WXC",
"wea_day_img":"yun",
"wea_night_img":"qing"
},
{
"date":"2023-01-27",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"2",
"tem_night":"-6",
"humidity":"43",
"visibility":"15",
"pressure":"1014",
"win":"北风转南风",
"win_speed":"3-4级",
"win_meter":"2",
"air":"107",
"pm25":"51",
"pm10":"163",
"o3":"23",
"no2":"27",
"so2":"24",
"co":"1",
"sunrise":"07:17",
"sunset":"17:29",
"moonrise":"10:41",
"moonset":"23:47",
"moonIcon":"WXC",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-28",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"4",
"tem_night":"-4",
"humidity":"24",
"visibility":"30",
"pressure":"1007",
"win":"南风",
"win_speed":"3-4级",
"win_meter":"6",
"air":"39",
"pm25":"14",
"pm10":"39",
"o3":"72",
"no2":"10",
"so2":"14",
"co":"0",
"sunrise":"07:17",
"sunset":"17:30",
"moonrise":"11:08",
"moonset":"",
"moonIcon":"FQ",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-29",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"9",
"tem_night":"-2",
"humidity":"19",
"visibility":"30",
"pressure":"1000",
"win":"北风转南风",
"win_speed":"<3级转3-4级",
"win_meter":"9",
"air":"56",
"pm25":"27",
"pm10":"61",
"o3":"67",
"no2":"10",
"so2":"18",
"co":"0",
"sunrise":"07:16",
"sunset":"17:32",
"moonrise":"11:37",
"moonset":"00:52",
"moonIcon":"WXG",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-30",
"wea_day":"晴",
"wea_night":"晴",
"tem_day":"13",
"tem_night":"3",
"humidity":"17",
"visibility":"24",
"pressure":"1001",
"win":"南风",
"win_speed":"4-5级转3-4级",
"win_meter":"11",
"air":"58",
"pm25":"29",
"pm10":"66",
"o3":"26",
"no2":"51",
"so2":"10",
"co":"0",
"sunrise":"07:15",
"sunset":"17:33",
"moonrise":"12:08",
"moonset":"01:56",
"moonIcon":"WXG",
"wea_day_img":"qing",
"wea_night_img":"qing"
},
{
"date":"2023-01-31",
"wea_day":"晴",
"wea_night":"多云",
"tem_day":"15",
"tem_night":"-1",
"humidity":"31",
"visibility":"14",
"pressure":"994",
"win":"北风",
"win_speed":"<3级转3-4级",
"win_meter":"6",
"air":"80",
"pm25":"59",
"pm10":"102",
"o3":"96",
"no2":"15",
"so2":"16",
"co":"0",
"sunrise":"07:15",
"sunset":"17:34",
"moonrise":"12:44",
"moonset":"02:58",
"moonIcon":"WXG",
"wea_day_img":"qing",
"wea_night_img":"yun"
}
]
}