SuperAPI AI 工具集

free-weather-data

数据与分析

查看项目

更新于 10-15 20:06

技能介绍

用途:通过免费、无需 API 密钥的 Open-Meteo 与 wttr.in 接口,获取当前天气、未来预报和历史天气数据,供 AI 智能体做基于位置的决策、规划与监控。

主要能力:get_current_weather_open_meteo 获取当前温度、体感温度、湿度、风速风向、降水与天气代码;get_weather_forecast 获取未来 7-16 天日级或逐小时预报;get_weather_wttr_simple 用 wttr.in 按城市名或坐标快速查询,支持纯文本与 JSON(format=j1);get_historical_weather 通过 archive-api.open-meteo.com 查询 1940 年以来的历史数据;decode_weather_code 将 WMO 天气代码转为可读描述;weather_alerts_and_monitoring 按温度、风速、降水阈值生成告警。

使用方式:直接请求 REST 接口,例如当前天气 https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&current=temperature_2m,weather_code;预报加 &daily=temperature_2m_max,temperature_2m_min,precipitation_sum;历史用 https://archive-api.open-meteo.com/v1/archive;wttr.in 用 https://wttr.in/{city}?format=3 或 ?format=j1。Open-Meteo 默认摄氏,可加 &temperature_unit=fahrenheit。

适用场景:智能体天气查询、出行与日程规划、历史气候分析、阈值告警与监控。

限制:Open-Meteo 约每日 1 万次请求,wttr.in 为社区服务、按合理使用;建议缓存 15-30 分钟、使用坐标提高精度、设置超时;历史数据自 1940 年起,日期格式为 YYYY-MM-DD;关键应用可自托管 Open-Meteo。具体收费与价格资料未提供。