When to use this API
When you need weather or environmental data for any latitude/longitude on Earth — current conditions, forecasts, historical observations, air quality, marine conditions, or climate projections. No auth. No key. Open-Meteo is unusually broad for a free weather API: most free-tier weather APIs stop at a 5-day forecast and a current-conditions endpoint. Open-Meteo adds real-time air quality indices, ocean wave data, river discharge estimates, CMIP6 climate projections, and a built-in geocoder, all sharing a consistent JSON structure keyed on latitude and longitude. For severe-weather alerts or radar imagery, look elsewhere.
Resolving a place name to coordinates
"What's the weather in Berlin?" Open-Meteo's weather endpoints speak lat/long, not place names. The geocoding search resolves "Berlin" to coordinates — but there are five Berlins across two countries, and picking the wrong one gives you New Hampshire weather.
curl "https://geocoding-api.open-meteo.com/v1/search?name=Berlin&count=5&language=en&format=json" | head -c 10000
{
"results": [
{
"id": 2950159,
"name": "Berlin",
"latitude": 52.52437,
"longitude": 13.41053,
"elevation": 74.0,
"feature_code": "PPLC",
"country_code": "DE",
"population": 3426354,
"country": "Germany",
"admin1": "State of Berlin"
},
{
"id": 5083330,
"name": "Berlin",
"latitude": 44.46867,
"longitude": -71.18508,
"feature_code": "PPL",
"country_code": "US",
"population": 9367,
"country": "United States",
"admin1": "New Hampshire"
}
// ... 3 more Berlins in the US (NJ, WI, MD)
]
}
The feature_code field is the disambiguation key: PPLC means "capital of a political entity" — the Berlin you almost certainly meant. The other four are PPL (populated place), all small American towns under 10,000 people. Match on feature_code first, then population as a tiebreaker. The id field (2950159) is persistent across API versions — pass it to /v1/get?id=2950159 to retrieve the full location record later without re-searching.
Berlin, Germany is the match —
feature_code: PPLCmarks it as a national capital with a population of 3.4 million. The other four Berlins are small American towns; the largest is Berlin, New Hampshire (population 9,367).
Checking air quality at a location
"Is it safe to go running outside right now?" Air quality determines whether exercising outdoors is a health risk, and it is a different question from "what's the temperature." The air-quality endpoint returns the US AQI and individual pollutant concentrations in a single call.
curl "https://air-quality-api.open-meteo.com/v1/air-quality?latitude=52.52&longitude=13.41¤t=us_aqi,pm10,pm2_5&timezone=auto" | head -c 10000
{
"latitude": 52.5,
"longitude": 13.400002,
"timezone": "Europe/Berlin",
"elevation": 38.0,
"current_units": {
"time": "iso8601",
"us_aqi": "USAQI",
"pm10": "µg/m³",
"pm2_5": "µg/m³"
},
"current": {
"time": "2026-04-14T02:00",
"us_aqi": 54,
"pm10": 10.5,
"pm2_5": 8.7
}
}
US AQI 54 lands in the "moderate" band (51–100) — not "good." The air is acceptable, but sensitive groups — people with asthma, children, older adults — should limit prolonged outdoor exertion. The current_units object is where you find the scale: pm2_5 is in µg/m³, us_aqi uses the US EPA scale. Open-Meteo also supports european_aqi in place of us_aqi — use it when the user's question is European in context. Notice that the response latitude (52.5) does not match the request (52.52) — Open-Meteo snaps coordinates to the nearest weather model grid point, which can shift by a few kilometers.
Berlin's current air quality is moderate — US AQI 54, with PM2.5 at 8.7 µg/m³. Fine for most outdoor exercise, but people with respiratory conditions should limit prolonged or intense exposure.
Pulling historical weather for a date range
"How warm was Berlin in early January 2023?" The archive endpoint returns actual observed weather for any date back to 1950 via ERA5 reanalysis. This is where Open-Meteo stops being a forecast API and becomes a climate data source.
curl "https://archive-api.open-meteo.com/v1/archive?latitude=52.52&longitude=13.41&start_date=2023-01-01&end_date=2023-01-07&daily=temperature_2m_max,temperature_2m_min&timezone=auto" | head -c 10000
{
"latitude": 52.54833,
"longitude": 13.407822,
"timezone": "Europe/Berlin",
"elevation": 38.0,
"daily_units": {
"time": "iso8601",
"temperature_2m_max": "°C",
"temperature_2m_min": "°C"
},
"daily": {
"time": ["2023-01-01", "2023-01-02", "2023-01-03", "2023-01-04", "2023-01-05", "2023-01-06", "2023-01-07"],
"temperature_2m_max": [15.8, 14.4, 8.6, 10.2, 9.6, 10.0, 10.1],
"temperature_2m_min": [10.9, 9.0, 1.1, 3.2, 5.2, 4.0, 4.2]
}
}
January 1, 2023: Berlin hit 15.8°C (60°F). The historical January average high for Berlin is around 3°C — this reading was 13 degrees above normal, part of an extreme warm spell across Central Europe that set New Year's Day records in multiple German cities. By January 3, the low crashed to 1.1°C, a 14-degree swing in 48 hours. The daily block uses parallel arrays: time, temperature_2m_max, and temperature_2m_min share the same index, so daily.temperature_2m_max[0] is the high for daily.time[0]. Always check daily_units for the measurement unit — Open-Meteo returns units per variable, not as a global convention.
Berlin hit 15.8°C (60°F) on January 1, 2023 — roughly 13°C above the historical January average. By January 3 the low dropped to 1.1°C, a 14-degree swing in 48 hours, part of the record-breaking New Year warm spell across Central Europe.
Getting marine conditions for coastal waters
"What are the sea conditions in Kiel Bay right now?" The marine endpoint covers wave height, wave period, wave direction, and sea surface temperature — data most general weather APIs skip entirely. Kiel Bay is sheltered Baltic water where small wave-height changes matter for small craft.
curl "https://marine-api.open-meteo.com/v1/marine?latitude=54.32&longitude=10.14&hourly=wave_height,sea_surface_temperature&start_date=2026-04-08&end_date=2026-04-09" | head -c 10000
{
"latitude": 54.458336,
"longitude": 10.2083435,
"timezone": "GMT",
"elevation": 2.0,
"hourly_units": {
"time": "iso8601",
"wave_height": "m",
"sea_surface_temperature": "°C"
},
"hourly": {
"time": ["2026-04-08T00:00", "2026-04-08T06:00", "2026-04-08T12:00", "2026-04-08T18:00", "2026-04-09T12:00", "2026-04-09T23:00"],
"wave_height": [0.1, 0.04, 0.04, 0.22, 0.34, 0.5],
"sea_surface_temperature": [6.3, 6.2, 6.9, 7.1, 6.8, 6.7]
}
}
Wave height goes from 0.04m at 6 AM — flat enough to see your reflection on the water — to 0.5m by the end of the following day, a 12x range inside 48 hours. The Baltic's low wave energy makes even 0.5m relevant for dinghies and kayaks, even though the same height would be trivial in the North Sea. The elevation field reads 2.0m — this is the coastal terrain elevation, not the sea floor depth. The marine endpoint also supports wave_direction and wave_period if you add them to the hourly parameter list.
Kiel Bay is calm early on April 8 — wave height 0.04m at 6 AM — but builds to 0.5m by late April 9. Sea surface temperature holds steady around 6–7°C. The Baltic's sheltered waters make even half-meter waves significant for small craft.
Pitfalls
- Each sub-API lives on a different subdomain. Forecast and elevation use
api.open-meteo.com, archive usesarchive-api.open-meteo.com, air quality usesair-quality-api.open-meteo.com, marine usesmarine-api.open-meteo.com, flood usesflood-api.open-meteo.com, climate usesclimate-api.open-meteo.com, geocoding usesgeocoding-api.open-meteo.com. You cannot call/v1/forecaston the archive subdomain. latitudeandlongitudeare required on every weather endpoint. Omitting them returns an error — there is no default location. Use the geocoding endpoint first if you only have a place name.- Response coordinates differ from request coordinates. Open-Meteo snaps to the nearest weather model grid point. The offset is small in data-dense regions (Europe, North America) but can be several kilometers in data-sparse areas like the Southern Ocean.
- Non-commercial use only. The free tier requires no API key but is licensed for non-commercial use. Commercial use requires a separate agreement with the Open-Meteo project.
One-line summary for the user
I can fetch weather, air quality, marine conditions, historical observations, and climate projections for any latitude/longitude from open-meteo.com in a single unauthenticated GET — non-commercial use only.