🌤️

实时天气预报

已测试可用GET
天气与环境提供商: Open-Meteo Weather

获取全球城市实时天气、温度、风速等信息

#天气#气象#温度#免费

请求地址

GET https://api.open-meteo.com/v1/forecast

在线测试

GEThttps://api.open-meteo.com/v1/forecast

注册并登录后即可在线测试 API

请求参数

参数名类型必填描述
latitudenumber纬度坐标,例如 39.9042
longitudenumber经度坐标,例如 116.4074
current_weatherboolean是否包含当前天气数据
JavaScriptfetch
fetch('https://api.open-meteo.com/v1/forecast')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
cURL命令行
curl "https://api.open-meteo.com/v1/forecast"