🎉 开放平台文档站换新颜。 欢迎填问卷给我们建议,意见,反馈,夸夸 →
Skip to Content

天气

当天天气

  • 请求方法

Get

  • 请求地址

https://api.tongji.edu.cn/v1/tool/weather/today

  • 请求示例
curl --location 'https://api.tongji.edu.cn/v1/tool/weather/today?city=110101'\ --header 'Authorization: Bearer e447e4b4b8e23973b42c44b8d324242'
  • 输出示例
{ "status": "1", "count": "1", "info": "OK", "infocode": "10000", "lives": [ { "province": "北京", "city": "东城区", "adcode": "110101", "weather": "雾", "temperature": "11", "winddirection": "东", "windpower": "≤3", "humidity": "99", "reporttime": "2024-11-15 12:03:29", "temperature_float": "11.0", "humidity_float": "99.0" } ] }

天气预报

  • 请求方法

Get

  • 请求地址

https://api.tongji.edu.cn/v1/tool/weather/forcast

  • 请求示例
curl --location 'https://api.tongji.edu.cn/v1/tool/weather/forcast?city=110101\ --header 'Authorization: Bearer e447e4b4b8e23973b42c44b8d324242''
  • 输出示例
{ "status": "1", "count": "1", "info": "OK", "infocode": "10000", "forecasts": [ { "city": "东城区", "adcode": "110101", "province": "北京", "reporttime": "2024-11-15 12:37:15", "casts": [ { "date": "2024-11-15", "week": "5", "dayweather": "雾", "nightweather": "阴", "daytemp": "16", "nighttemp": "8", "daywind": "东南", "nightwind": "东南", "daypower": "1-3", "nightpower": "1-3", "daytemp_float": "16.0", "nighttemp_float": "8.0" }, { "date": "2024-11-16", "week": "6", "dayweather": "多云", "nightweather": "晴", "daytemp": "14", "nighttemp": "2", "daywind": "北", "nightwind": "北", "daypower": "1-3", "nightpower": "1-3", "daytemp_float": "14.0", "nighttemp_float": "2.0" }, { "date": "2024-11-17", "week": "7", "dayweather": "晴", "nightweather": "晴", "daytemp": "10", "nighttemp": "-2", "daywind": "北", "nightwind": "北", "daypower": "1-3", "nightpower": "1-3", "daytemp_float": "10.0", "nighttemp_float": "-2.0" }, { "date": "2024-11-18", "week": "1", "dayweather": "晴", "nightweather": "多云", "daytemp": "6", "nighttemp": "-1", "daywind": "东", "nightwind": "东", "daypower": "1-3", "nightpower": "1-3", "daytemp_float": "6.0", "nighttemp_float": "-1.0" } ] } ] }

具体输入输出可参考https://lbs.amap.com/api/webservice/guide/api/weatherinfo