Weather API

Open-Meteo provides free weather forecasts (no API key required) with global coverage. It’s optimized for real-time and hourly forecasts, suitable for personal apps, home automation, agriculture, and more.
Author

Benedict Thekkel

Base URL:

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

✅ Key Features

Feature Supported
No API Key
Forecast types Current, hourly, daily
Global coverage
Marine weather 🌊 Yes
Solar radiation forecasts ☀️ Yes
Air quality & pollen 🌫️ Yes (via air-quality API)
JSON output
Free & open-source backend

🔧 How to Use

🧭 Basic Example

GET https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&hourly=temperature_2m

Returns:

{
  "latitude": 52.52,
  "longitude": 13.41,
  "generationtime_ms": 0.276,
  "utc_offset_seconds": 0,
  "hourly_units": {
    "temperature_2m": "°C"
  },
  "hourly": {
    "time": ["2025-06-14T00:00", ...],
    "temperature_2m": [17.3, 16.1, ...]
  }
}

🔍 Main Parameters

Parameter Description Example
latitude Latitude of the location -27.4698
longitude Longitude of the location 153.0251
hourly Comma-separated list of hourly data temperature_2m,wind_speed_10m
daily Comma-separated list of daily data temperature_2m_max
current_weather Return current weather true
start & end Forecast start and end date (YYYY-MM-DD) 2025-06-14
timezone e.g. auto, Australia/Brisbane timezone=auto

⏲ Available Forecast Fields

hourly options: - temperature_2m - precipitation - weathercode - windspeed_10m - humidity_2m - cloudcover - uv_index - solar_radiation

daily options: - temperature_2m_max, temperature_2m_min - sunrise, sunset - precipitation_sum - uv_index_max

current_weather=true: Returns:

"current_weather": {
  "temperature": 19.5,
  "windspeed": 14.8,
  "winddirection": 280,
  "weathercode": 3,
  "time": "2025-06-14T09:00"
}

🌐 Other Endpoints

Air Quality

https://air-quality-api.open-meteo.com/v1/air-quality

Marine Weather

https://marine-api.open-meteo.com/v1/marine

Historical Weather (via archive-api)

https://archive-api.open-meteo.com/v1/archive

🧪 Example Python Usage

import requests

res = requests.get(
    "https://api.open-meteo.com/v1/forecast",
    params={
        "latitude": -27.4698,
        "longitude": 153.0251,
        "hourly": "temperature_2m,weathercode",
        "current_weather": "true",
        "timezone": "Australia/Brisbane"
    }
)
data = res.json()
print(data["current_weather"])
import requests

res = requests.get(
    "https://api.open-meteo.com/v1/forecast",
    params={
        "latitude": -27.4698,
        "longitude": 153.0251,
        "hourly": "temperature_2m,weathercode",
        "current_weather": "true",
        "timezone": "Australia/Brisbane"
    }
)
data = res.json()
print(data["current_weather"])
{'time': '2025-06-14T23:45', 'interval': 900, 'temperature': 8.7, 'windspeed': 4.0, 'winddirection': 265, 'is_day': 0, 'weathercode': 0}

📈 Use Cases

Use Case Data to Query
Weather Dashboard current_weather=true, hourly, daily
Smart Farming precipitation, humidity, uv_index, sunrise
Solar Forecasting solar_radiation, uv_index_max
Air Quality Apps pm10, pm2_5, ozone, no2, so2
Ocean Forecasting Use /marine endpoint

⚠️ Limitations

  • No authentication = no per-user quota control (good for hobby use)
  • Limited history support (for serious archival, consider ERA5/NOAA)
  • Not suitable for high-frequency commercial production without mirroring or custom backend

🧭 Resources

  • Docs: https://open-meteo.com/en/docs
  • Marine: https://open-meteo.com/en/docs/marine-weather-api
  • Air Quality: https://open-meteo.com/en/docs/air-quality-api
  • GitHub backend: https://github.com/open-meteo
Back to top