API 广场 / 生活 / 全球天气预报
API

全球天气预报

按经纬度查全球任意地点的实时天气,免费无需密钥

免费 正常 GET 生活
返回首页
https://api.open-meteo.com/v1/forecast
GET
https://api.open-meteo.com/v1/forecast?latitude=39.9&longitude=116.4&current_weather=true

接口说明

Open-Meteo 是开源气象接口,按经纬度返回实时天气,全球覆盖,免费且不需要密钥、不需要注册。

latitude 纬度、longitude 经度,国内常用坐标:北京 39.9 / 116.4,上海 31.2 / 121.5,广州 23.1 / 113.3,成都 30.6 / 104.1。

current_weather 传 true 才会返回当前天气块,里面 temperature 是摄氏度、windspeed 是 km/h、weathercode 是天气代码(0 晴、1-3 多云、45/48 雾、51-67 雨、71-77 雪、95-99 雷暴)。

接口按调用次数限流,个人站点足够用;要做多城市展示建议服务端缓存 10 分钟。

请求参数说明

参数名类型必填默认值说明
latitude number 必填 39.9 纬度,北京 39.9、上海 31.2
longitude number 必填 116.4 经度,北京 116.4、上海 121.5
current_weather string 选填 true 传 true 返回当前天气

在线调试 (GET)

支持自定义参数,GET 拼在链接上,POST 放在请求体
请求链接预览 https://api.open-meteo.com/v1/forecast
此处将显示接口返回结果…

返回示例

{
  "latitude": 39.875,
  "longitude": 116.375,
  "current_weather": {
    "temperature": 8.3,
    "windspeed": 5.4,
    "winddirection": 210,
    "weathercode": 3,
    "time": "2026-11-21T12:00"
  }
}
—