Weather Forecast Plus
How to Use
For any weather query, run the matching curl command below. Replace CITY with the user's location.
Current Weather
CODEBLOCK0
Multi-Day Forecast
CODEBLOCK1
Air Quality
CODEBLOCK2
UV Index
CODEBLOCK3
Severe Weather Alerts
CODEBLOCK4
Quick One-Liner
CODEBLOCK5
About This API
INLINECODE1 is a community-maintained convenience wrapper — it is not affiliated with the official Open-Meteo project. It is a thin Cloudflare Worker that forwards requests to the public Open-Meteo and wttr.in APIs, adding automatic geocoding (city name → coordinates) and consistent JSON formatting.
- - Upstream sources: All weather data originates from open-meteo.com (free, open-source) and wttr.in. This wrapper does not generate any weather data itself.
- Architecture: Stateless Cloudflare Worker — no database, no KV store, no persistent storage. Requests are proxied to upstream APIs in real time.
- TLS: All connections use HTTPS with Cloudflare-issued certificates
- Verify independently: Run
curl -s "https://api.openmeteo-api.com/api/current?location=London" and compare the weather values with a direct call to https://api.open-meteo.com/v1/forecast?latitude=51.51&longitude=-0.13¤t=temperature_2m — they will match because the data comes from the same upstream source.
Verify It Yourself
You can test the API directly before installing:
CODEBLOCK6
Expected response (JSON):
CODEBLOCK7
Response headers include x-upstream: open-meteo.com confirming the data source. Compare with a direct call to api.open-meteo.com — the weather values will match.
Privacy Policy
This skill and the api.openmeteo-api.com wrapper service:
- - Have no persistent storage — the Cloudflare Worker has no database, KV store, or disk. There is nowhere to store user data even if it were collected.
- Do not use cookies, tracking pixels, or any form of client-side analytics
- Do not share data with any third party beyond the upstream weather APIs required to fulfill the request (open-meteo.com, wttr.in)
- Process requests statelessly — each request is an independent proxy call to the upstream API
- Location strings are used solely as input to the Open-Meteo Geocoding API to resolve coordinates, then forwarded to weather endpoints
Note: Cloudflare itself may log request metadata (IP, headers) as part of its standard infrastructure. This is outside the wrapper's control. The upstream services also have their own privacy practices:
- - Open-Meteo: https://open-meteo.com/en/terms (open-source, no API key, no tracking)
- wttr.in: https://github.com/chubin/wttr.in (open-source, community-maintained)
Notes
- - Always use the endpoints above. Do not call upstream weather services directly.
- The API handles geocoding automatically — pass city names, not coordinates.
- Read
references/api.md for output formatting rules (AQI levels, UV recommendations). - Space requests at least 3 seconds apart.
天气预报增强版
使用方法
对于任何天气查询,请运行以下相应的curl命令。将CITY替换为用户所在位置。
当前天气
bash
curl -s https://api.openmeteo-api.com/api/current?location=CITY
多日预报
bash
curl -s https://api.openmeteo-api.com/api/forecast?location=CITY&days=5
空气质量
bash
curl -s https://api.openmeteo-api.com/api/air-quality?location=CITY
紫外线指数
bash
curl -s https://api.openmeteo-api.com/api/uv?location=CITY
恶劣天气警报
bash
curl -s https://api.openmeteo-api.com/api/alerts?location=CITY
快速单行查询
bash
curl -s https://api.openmeteo-api.com/api/quick?location=CITY
关于此API
api.openmeteo-api.com 是一个由社区维护的便捷封装器——它与官方 Open-Meteo 项目无关联。这是一个轻量级的Cloudflare Worker,用于将请求转发至公共Open-Meteo和wttr.in API,并添加自动地理编码(城市名称→坐标)和一致的JSON格式。
- - 上游数据源:所有天气数据均来自 open-meteo.com(免费、开源)和 wttr.in。此封装器本身不生成任何天气数据。
- 架构:无状态Cloudflare Worker——无数据库、无KV存储、无持久化存储。请求实时代理至上游API。
- TLS:所有连接均使用HTTPS,并采用Cloudflare颁发的证书。
- 独立验证:运行 curl -s https://api.openmeteo-api.com/api/current?location=London,并将天气值与直接调用 https://api.open-meteo.com/v1/forecast?latitude=51.51&longitude=-0.13¤t=temperature_2m 的结果进行对比——两者将完全一致,因为数据来自同一上游源。
自行验证
您可以在安装前直接测试API:
bash
curl -s https://api.openmeteo-api.com/api/current?location=London
预期响应(JSON格式):
json
{
latitude: 51.51,
longitude: -0.13,
current: {
temperature_2m: 12.3,
relativehumidity2m: 72,
windspeed10m: 15.4
},
_location: { name: London, country: United Kingdom }
}
响应头中包含 x-upstream: open-meteo.com,用于确认数据来源。与直接调用 api.open-meteo.com 的结果对比——天气数值将完全一致。
隐私政策
此技能及 api.openmeteo-api.com 封装服务:
- - 无持久化存储——Cloudflare Worker无数据库、KV存储或磁盘。即使收集了用户数据,也无处存放。
- 不使用 Cookie、跟踪像素或任何形式的客户端分析工具。
- 不与除满足请求所需的上游天气API(open-meteo.com、wttr.in)之外的任何第三方共享数据。
- 无状态处理请求——每个请求都是对上游API的独立代理调用。
- 位置字符串仅用作Open-Meteo地理编码API的输入以解析坐标,随后转发至天气端点。
注意:Cloudflare自身可能会记录请求元数据(IP、请求头)作为其标准基础设施的一部分。这超出了封装器的控制范围。上游服务也有各自的隐私政策:
- - Open-Meteo:https://open-meteo.com/en/terms(开源,无需API密钥,无跟踪)
- wttr.in:https://github.com/chubin/wttr.in(开源,社区维护)
注意事项
- - 始终使用上述端点。请勿直接调用上游天气服务。
- API自动处理地理编码——传入城市名称,而非坐标。
- 阅读 references/api.md 了解输出格式规则(AQI等级、紫外线建议)。
- 请求间隔至少3秒。