OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  weather:获取实时天气与预报(无需 API 密钥)

weather:获取实时天气与预报(无需 API 密钥)

 
  paas ·  2026-02-06 10:22:43 · 3 次点击  · 0 条评论  

名称: weather
描述: 获取当前天气和天气预报(无需 API 密钥)。
主页: https://wttr.in/:help
元数据: {"clawdbot":{"emoji":"🌤️","requires":{"bins":["curl"]}}}


天气查询

提供两种免费服务,均无需 API 密钥。

wttr.in(主要服务)

快速单行查询:

curl -s "wttr.in/London?format=3"
# 输出:London: ⛅️ +8°C

紧凑格式:

curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
# 输出:London: ⛅️ +8°C 71% ↙5km/h

完整天气预报:

curl -s "wttr.in/London?T"

格式代码说明:%c 天气状况 · %t 温度 · %h 湿度 · %w 风速 · %l 地点 · %m 月相

使用提示:
- 空格需进行 URL 编码:wttr.in/New+York
- 支持机场代码:wttr.in/JFK
- 单位选择:?m(公制) ?u(美制)
- 仅今日:?1 · 仅当前:?0
- 获取 PNG 图片:curl -s "wttr.in/Berlin.png" -o /tmp/weather.png

Open-Meteo(备用服务,JSON 格式)

免费、无需密钥,适合程序化调用:

curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12&current_weather=true"

使用方法:先查找城市的经纬度坐标,再进行查询。返回包含温度、风速、天气代码的 JSON 数据。

文档地址:https://open-meteo.com/en/docs

3 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor