SuperAPI AI 工具集

open-meteo

数据与分析

查看项目

更新于 10-15 22:38

技能介绍

用途:提供可靠、适合生产环境的方式调用 Open-Meteo 的 Forecast、Air Quality 与 Geocoding API,并统一解析响应。

主要能力与用法:

  1. 选择基础 URL:Forecast 为 https://api.open-meteo.com/v1/forecast;Air Quality 为 https://air-quality-api.open-meteo.com/v1/air-quality;Geocoding 为 https://geocoding-api.open-meteo.com/v1/search。
  2. 仅有地名时先调用 Geocoding(可带 language、countryCode、count),取得 latitude、longitude、timezone 后再调用其他接口。
  3. 设计时间轴:daily 必须设置 timezone,需对齐本地零点时优先 timezone=auto;timeformat 可选 iso8601 或 unixtime;使用 unixtime 时时间戳为 GMT+0,需按 utc_offset_seconds 换算本地日期。范围可用 forecast_days 与 past_days,或 start_date/end_date(YYYY-MM-DD),日内可加 start_hour/end_hour。
  4. 按需选择变量:Forecast 用 hourly、daily、current;Air Quality 用 hourly、current;变量名须精确,拼错会返回 JSON 错误。
  5. 单位与模型:Forecast 可选 temperature_unit(celsius/fahrenheit)、wind_speed_unit(kmh/ms/mph/kn)、precipitation_unit(mm/inch);models=auto 为默认最佳匹配,也可显式指定。Air Quality 可选 domains=auto 或 cams_europe/cams_global。
  6. 错误处理:区分 HTTP 错误与 JSON 级错误,后者格式为 {"error": true, "reason": "..."},应快速失败并给出原因。多地点坐标请求会返回列表结构;导出可用 format=csv 或 format=xlsx。

适用场景与验证:地理编码加预报、空气质量查询等;可用“已知城市”检查验证,如 Berlin 的 temperature_2m、pm10/pm2_5/european_aqi 与 hourly_units。

限制:本技能不涵盖 Historical Weather、Ensemble Models、Seasonal Forecast、Climate Change、Marine、Satellite Radiation、Elevation、Flood;请求 daily 不得省略 timezone;不得忽略 error:true;默认不应请求超大变量集。需遵循 Air Quality(CAMS)与 Geocoding(GeoNames)的署名要求。