全国天气
全国天气
全国天气API,欢迎对接

接口地址: https://v.api.aa1.cn/api/api-weather/

返回格式: JSON

请求方式: GET

请求示例: https://v.api.aa1.cn/api/api-weather/all.php?aa1=all

请求参数说明:

名称 必填 类型 说明
aa1 传递参数 ?aa1=
all 全国城市 ?aa1=all

返回参数说明:

名称 类型 说明
all all 返回JSON

返回示例:

array(2) {
	["@attributes"] => array(1) {
		["dn"] => string(3)
		"day"
	}["city"] => array(37) {
		[0] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(9)
				"黑龙江" ["pyName"] => string(12)
				"heilongjiang" ["cityname"] => string(9)
				"哈尔滨" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(6)
				"多云" ["tem1"] => string(3)
				"-21" ["tem2"] => string(3)
				"-28" ["windState"] => string(27)
				"西北风3-4级转微风级"
			}
		}[1] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"吉林" ["pyName"] => string(5)
				"jilin" ["cityname"] => string(6)
				"长春" ["state1"] => string(2)
				"13" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(12)
				"阵雪转晴" ["tem1"] => string(3)
				"-20" ["tem2"] => string(3)
				"-26" ["windState"] => string(27)
				"西北风转西风微风级"
			}
		}[2] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"辽宁" ["pyName"] => string(8)
				"liaoning" ["cityname"] => string(6)
				"沈阳" ["state1"] => string(1)
				"0" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(3)
				"晴" ["tem1"] => string(3)
				"-16" ["tem2"] => string(3)
				"-24" ["windState"] => string(24)
				"北风4-5级转微风级"
			}
		}[3] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"海南" ["pyName"] => string(6)
				"hainan" ["cityname"] => string(6)
				"海口" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"7" ["stateDetailed"] => string(6)
				"小雨" ["tem1"] => string(2)
				"23" ["tem2"] => string(2)
				"19" ["windState"] => string(24)
				"微风转东风微风级"
			}
		}[4] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(9)
				"内蒙古" ["pyName"] => string(9)
				"neimenggu" ["cityname"] => string(12)
				"呼和浩特" ["state1"] => string(1)
				"0" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(3)
				"晴" ["tem1"] => string(2)
				"-8" ["tem2"] => string(3)
				"-21" ["windState"] => string(12)
				"北风3-4级"
			}
		}[5] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"新疆" ["pyName"] => string(8)
				"xinjiang" ["cityname"] => string(12)
				"乌鲁木齐" ["state1"] => string(1)
				"0" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(3)
				"晴" ["tem1"] => string(2)
				"-3" ["tem2"] => string(3)
				"-14" ["windState"] => string(27)
				"微风转东南风微风级"
			}
		}[6] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"西藏" ["pyName"] => string(6)
				"xizang" ["cityname"] => string(6)
				"拉萨" ["state1"] => string(1)
				"0" ["state2"] => string(2)
				"13" ["stateDetailed"] => string(12)
				"晴转阵雪" ["tem1"] => string(1)
				"5" ["tem2"] => string(2)
				"-9" ["windState"] => string(6)
				"微风"
			}
		}[7] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"青海" ["pyName"] => string(7)
				"qinghai" ["cityname"] => string(6)
				"西宁" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(12)
				"多云转晴" ["tem1"] => string(1)
				"1" ["tem2"] => string(3)
				"-13" ["windState"] => string(30)
				"东南风转西北风微风级"
			}
		}[8] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"宁夏" ["pyName"] => string(7)
				"ningxia" ["cityname"] => string(6)
				"银川" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(12)
				"多云转阴" ["tem1"] => string(2)
				"-2" ["tem2"] => string(3)
				"-11" ["windState"] => string(6)
				"微风"
			}
		}[9] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"甘肃" ["pyName"] => string(5)
				"gansu" ["cityname"] => string(6)
				"兰州" ["state1"] => string(1)
				"0" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(12)
				"晴转多云" ["tem1"] => string(1)
				"4" ["tem2"] => string(2)
				"-8" ["windState"] => string(27)
				"北风转西北风微风级"
			}
		}[10] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"河北" ["pyName"] => string(5)
				"hebei" ["cityname"] => string(9)
				"石家庄" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(12)
				"小雨转阴" ["tem1"] => string(2)
				"-1" ["tem2"] => string(3)
				"-10" ["windState"] => string(18)
				"东北风微风级"
			}
		}[11] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"河南" ["pyName"] => string(5)
				"henan" ["cityname"] => string(6)
				"郑州" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(3)
				"阴" ["tem1"] => string(1)
				"2" ["tem2"] => string(2)
				"-6" ["windState"] => string(24)
				"东北风4-5级转3-4级"
			}
		}[12] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"湖北" ["pyName"] => string(5)
				"hubei" ["cityname"] => string(6)
				"武汉" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"6" ["stateDetailed"] => string(18)
				"小雨转雨夹雪" ["tem1"] => string(1)
				"9" ["tem2"] => string(1)
				"1" ["windState"] => string(12)
				"北风4-5级"
			}
		}[13] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"湖南" ["pyName"] => string(5)
				"hunan" ["cityname"] => string(6)
				"长沙" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"7" ["stateDetailed"] => string(6)
				"小雨" ["tem1"] => string(2)
				"11" ["tem2"] => string(1)
				"3" ["windState"] => string(15)
				"北风微风级"
			}
		}[14] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"山东" ["pyName"] => string(8)
				"shandong" ["cityname"] => string(6)
				"济南" ["state1"] => string(2)
				"14" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(15)
				"小雪转多云" ["tem1"] => string(2)
				"-1" ["tem2"] => string(2)
				"-8" ["windState"] => string(24)
				"东北风4-5级转3-4级"
			}
		}[15] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"江苏" ["pyName"] => string(7)
				"jiangsu" ["cityname"] => string(6)
				"南京" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(15)
				"小雨转多云" ["tem1"] => string(2)
				"10" ["tem2"] => string(2)
				"-1" ["windState"] => string(33)
				"北风3-4级转东北风微风级"
			}
		}[16] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"安徽" ["pyName"] => string(5)
				"anhui" ["cityname"] => string(6)
				"合肥" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(15)
				"小雨转多云" ["tem1"] => string(1)
				"7" ["tem2"] => string(2)
				"-5" ["windState"] => string(24)
				"北风转东北风3-4级"
			}
		}[17] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"山西" ["pyName"] => string(6)
				"shanxi" ["cityname"] => string(6)
				"太原" ["state1"] => string(2)
				"14" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(15)
				"小雪转多云" ["tem1"] => string(2)
				"-2" ["tem2"] => string(3)
				"-10" ["windState"] => string(27)
				"东北风3-4级转微风级"
			}
		}[18] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"陕西" ["pyName"] => string(5)
				"sanxi" ["cityname"] => string(6)
				"西安" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"7" ["stateDetailed"] => string(6)
				"小雨" ["tem1"] => string(1)
				"9" ["tem2"] => string(1)
				"1" ["windState"] => string(15)
				"东北风3-4级"
			}
		}[19] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"四川" ["pyName"] => string(7)
				"sichuan" ["cityname"] => string(6)
				"成都" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(12)
				"多云转阴" ["tem1"] => string(2)
				"14" ["tem2"] => string(1)
				"8" ["windState"] => string(6)
				"微风"
			}
		}[20] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"云南" ["pyName"] => string(6)
				"yunnan" ["cityname"] => string(6)
				"昆明" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(6)
				"多云" ["tem1"] => string(2)
				"15" ["tem2"] => string(1)
				"5" ["windState"] => string(27)
				"西南风转南风微风级"
			}
		}[21] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"贵州" ["pyName"] => string(7)
				"guizhou" ["cityname"] => string(6)
				"贵阳" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(3)
				"阴" ["tem1"] => string(1)
				"9" ["tem2"] => string(1)
				"3" ["windState"] => string(27)
				"北风转东北风微风级"
			}
		}[22] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"浙江" ["pyName"] => string(8)
				"zhejiang" ["cityname"] => string(6)
				"杭州" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"7" ["stateDetailed"] => string(6)
				"小雨" ["tem1"] => string(2)
				"16" ["tem2"] => string(1)
				"4" ["windState"] => string(12)
				"北风5-6级"
			}
		}[23] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"福建" ["pyName"] => string(6)
				"fujian" ["cityname"] => string(6)
				"福州" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(12)
				"多云转阴" ["tem1"] => string(2)
				"21" ["tem2"] => string(2)
				"13" ["windState"] => string(27)
				"微风转东北风微风级"
			}
		}[24] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"江西" ["pyName"] => string(7)
				"jiangxi" ["cityname"] => string(6)
				"南昌" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"7" ["stateDetailed"] => string(12)
				"阴转小雨" ["tem1"] => string(2)
				"15" ["tem2"] => string(1)
				"4" ["windState"] => string(21)
				"北风4-5级转5-6级"
			}
		}[25] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"广东" ["pyName"] => string(9)
				"guangdong" ["cityname"] => string(6)
				"广州" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(6)
				"多云" ["tem1"] => string(2)
				"22" ["tem2"] => string(2)
				"13" ["windState"] => string(24)
				"微风转北风微风级"
			}
		}[26] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"广西" ["pyName"] => string(7)
				"guangxi" ["cityname"] => string(6)
				"南宁" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(3)
				"阴" ["tem1"] => string(2)
				"22" ["tem2"] => string(2)
				"15" ["windState"] => string(33)
				"南风微风级转东北风3-4级"
			}
		}[27] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"北京" ["pyName"] => string(7)
				"beijing" ["cityname"] => string(6)
				"北京" ["state1"] => string(1)
				"0" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(3)
				"晴" ["tem1"] => string(2)
				"-3" ["tem2"] => string(3)
				"-10" ["windState"] => string(27)
				"东北风转北风微风级"
			}
		}[28] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"天津" ["pyName"] => string(7)
				"tianjin" ["cityname"] => string(6)
				"天津" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"0" ["stateDetailed"] => string(12)
				"多云转晴" ["tem1"] => string(2)
				"-3" ["tem2"] => string(2)
				"-9" ["windState"] => string(30)
				"东北风4-5级转北风3-4级"
			}
		}[29] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"上海" ["pyName"] => string(8)
				"shanghai" ["cityname"] => string(6)
				"上海" ["state1"] => string(1)
				"7" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(12)
				"小雨转阴" ["tem1"] => string(2)
				"16" ["tem2"] => string(1)
				"3" ["windState"] => string(15)
				"北风微风级"
			}
		}[30] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"重庆" ["pyName"] => string(9)
				"chongqing" ["cityname"] => string(6)
				"重庆" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(3)
				"阴" ["tem1"] => string(2)
				"13" ["tem2"] => string(1)
				"9" ["windState"] => string(27)
				"东风转东北风微风级"
			}
		}[31] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"香港" ["pyName"] => string(9)
				"xianggang" ["cityname"] => string(6)
				"香港" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(3)
				"阴" ["tem1"] => string(2)
				"22" ["tem2"] => string(2)
				"17" ["windState"] => string(6)
				"微风"
			}
		}[32] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"澳门" ["pyName"] => string(5)
				"aomen" ["cityname"] => string(6)
				"澳门" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(6)
				"多云" ["tem1"] => string(2)
				"21" ["tem2"] => string(2)
				"17" ["windState"] => string(6)
				"微风"
			}
		}[33] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"台湾" ["pyName"] => string(6)
				"taiwan" ["cityname"] => string(6)
				"台北" ["state1"] => string(1)
				"2" ["state2"] => string(1)
				"7" ["stateDetailed"] => string(12)
				"阴转小雨" ["tem1"] => string(2)
				"20" ["tem2"] => string(2)
				"17" ["windState"] => string(27)
				"微风转东北风微风级"
			}
		}[34] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"西沙" ["pyName"] => string(5)
				"xisha" ["cityname"] => string(6)
				"西沙" ["state1"] => string(1)
				"4" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(15)
				"雷阵雨转阴" ["tem1"] => string(2)
				"28" ["tem2"] => string(2)
				"24" ["windState"] => string(24)
				"东北风3-4级转4-5级"
			}
		}[35] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(6)
				"南沙" ["pyName"] => string(9)
				"nanshadao" ["cityname"] => string(6)
				"南沙" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"1" ["stateDetailed"] => string(6)
				"多云" ["tem1"] => string(2)
				"29" ["tem2"] => string(2)
				"25" ["windState"] => string(15)
				"东北风4-5级"
			}
		}[36] => array(1) {
			["@attributes"] => array(9) {
				["quName"] => string(9)
				"钓鱼岛" ["pyName"] => string(9)
				"diaoyudao" ["cityname"] => string(9)
				"钓鱼岛" ["state1"] => string(1)
				"1" ["state2"] => string(1)
				"2" ["stateDetailed"] => string(12)
				"多云转阴" ["tem1"] => string(2)
				"25" ["tem2"] => string(2)
				"20" ["windState"] => string(30)
				"北风5-6级转东北风6-7级"
			}
		}
	}
}

错误码格式说明:

名称 类型 说明

代码示例:

https://v.api.aa1.cn/api/api-weather/all.php?aa1=all