Skip to content
Fox photography representing the Public APIs section

Public APIs

Free Weather APIs

Five weather data providers with documented free access, what each one is actually good at, and the licensing details that decide which one fits your project.

  • 5 providers
  • Key requirements listed
  • Sample responses

The APIs covered on this page

Free tiers and rate limits for weather services change frequently. These notes reflect published documentation at the time of writing - confirm the current terms before you build on any of them.

Open-Meteo

Documentation

Forecast, historical and air quality data with no API key on the free tier.

Authentication
None on the documented free tier
Pricing
Free for non-commercial use, paid plans for commercial volume
Endpoint
GET /forecast

Example request

curl "https://api.open-meteo.com/v1/forecast?latitude=51.51&longitude=-0.13&hourly=temperature_2m,precipitation&forecast_days=3"

Example response

{
  "latitude": 51.5,
  "longitude": -0.12,
  "hourly_units": { "temperature_2m": "C", "precipitation": "mm" },
  "hourly": {
    "time": ["2026-09-13T00:00", "2026-09-13T01:00"],
    "temperature_2m": [14.2, 13.9],
    "precipitation": [0.0, 0.1]
  }
}

Good for

  • Dashboards and widgets with no backend
  • Historical weather analysis
  • Agriculture and outdoor planning tools

Limitations

  • Coordinates only - geocode separately
  • Fair-use limits on the free tier
  • Commercial projects need a paid plan

OpenWeatherMap

Documentation

Current conditions, forecasts and a large catalogue of weather products.

Authentication
Free API key required
Pricing
Free tier with a call quota; paid plans above it
Endpoint
GET /weather

Example request

curl "https://api.openweathermap.org/data/2.5/weather?q=Karachi&units=metric&appid=YOUR_KEY"

Example response

{
  "weather": [{ "main": "Clouds", "description": "scattered clouds" }],
  "main": { "temp": 31.2, "humidity": 62 },
  "name": "Karachi"
}

Good for

  • City name lookup without separate geocoding
  • Weather icons and condition codes
  • Mobile app backends

Limitations

  • Key must be kept server-side
  • Free tier quotas are enforced
  • Some endpoints are paid-only

WeatherAPI.com

Documentation

Current, forecast, history and astronomy data in one JSON response.

Authentication
Free API key required
Pricing
Free tier with a monthly call allowance
Endpoint
GET /forecast.json

Example request

curl "https://api.weatherapi.com/v1/forecast.json?key=YOUR_KEY&q=Lahore&days=3"

Example response

{
  "location": { "name": "Lahore", "country": "Pakistan" },
  "current": { "temp_c": 33.0, "condition": { "text": "Partly cloudy" } },
  "forecast": { "forecastday": [{ "date": "2026-09-13", "day": { "maxtemp_c": 35.1 } }] }
}

Good for

  • Travel apps needing city search
  • Sunrise and moon phase data
  • Multi-day forecast cards

Limitations

  • Key required for every call
  • Historical range restricted on the free tier
  • Attribution requirements apply

Met Norway Locationforecast

Documentation

Detailed forecasts from the Norwegian Meteorological Institute.

Authentication
No key, but a descriptive User-Agent header identifying your app is required
Pricing
Free, subject to their terms of service
Endpoint
GET /compact

Example request

curl -H "User-Agent: foxishappy.com contact@foxishappy.com" \
  "https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=59.91&lon=10.75"

Example response

{
  "properties": {
    "timeseries": [
      { "time": "2026-09-13T09:00:00Z", "data": { "instant": { "details": { "air_temperature": 12.4 } } } }
    ]
  }
}

Good for

  • European forecasts at high resolution
  • Projects that must avoid API keys
  • Open data and research work

Limitations

  • Requests without a valid User-Agent are blocked
  • Caching is expected - respect the Expires header
  • Coverage strongest in Europe

US National Weather Service API

Documentation

Official United States forecasts, alerts and observations.

Authentication
No key, User-Agent header requested
Pricing
Free public service
Endpoint
GET /points/{lat},{lon}

Example request

curl -H "User-Agent: foxishappy.com contact@foxishappy.com" \
  "https://api.weather.gov/points/39.74,-104.99"

Example response

{
  "properties": {
    "gridId": "BOU",
    "forecast": "https://api.weather.gov/gridpoints/BOU/62,61/forecast"
  }
}

Good for

  • US severe weather alerts
  • Government-sourced forecast data
  • Emergency and safety applications

Limitations

  • United States coverage only
  • Two-step lookup: points first, then forecast URL
  • Response format is verbose GeoJSON

Choosing a weather API for a real project

Weather data looks interchangeable until you build with it. Providers differ in how you locate a place, how far ahead they forecast, how often data refreshes, and - most importantly - what you are allowed to do with the result.

Start with the location problem

Every weather API needs to know where you mean, and they split into two camps. Some accept a city name and do the geocoding for you, which is convenient for a search box. Others accept only latitude and longitude, which is more precise and means adding a geocoding step. Coordinate-only APIs are usually the better long-term choice because place names are ambiguous - there are dozens of Springfields - and because you will eventually want to use the device location anyway.

Forecast horizon and refresh rate

Forecast accuracy degrades sharply with distance. A twelve-hour forecast is usually reliable, a three-day forecast is useful, and a fourteen-day forecast is closer to climatology than prediction. Match the horizon to the decision your users are making: an umbrella widget needs hours, a hiking planner needs days, and nothing consumer-facing needs two weeks.

Refresh rate matters just as much. Most global models update every one to six hours, so polling every minute wastes your quota and returns identical data. Cache the response and respect the expiry headers - some providers, Met Norway included, explicitly expect it.

The licensing question people skip

  • Non-commercial clauses. Several free tiers exclude commercial use entirely, and "my app has ads" usually counts as commercial.
  • Attribution. Some providers require a visible credit and a link. It is a small design constraint that is easier to plan for than retrofit.
  • Redistribution. Storing and re-serving data to your own users is often restricted even when displaying it is not.
  • Derived products. Turning raw data into your own forecast index may be treated differently from showing the numbers.

Units, codes and other integration details

Providers differ on default units - Kelvin still appears in more than one API - so set the unit parameter explicitly rather than converting after the fact. Weather condition codes are entirely provider-specific, which means an icon set mapped to one API will not transfer to another without a translation table. If you think you might switch providers later, write a thin adapter layer now that normalises units, condition codes and timestamps into your own shape.

Time zones deserve special care. Some APIs return UTC, some return local time, and some return both with an offset. Showing a user a forecast for 3 p.m. in the wrong time zone is the kind of bug that survives testing and fails in production.

Building without a backend

If you want a purely client-side project, you need an API that requires no secret key and sends permissive CORS headers. Open-Meteo and the two government services fit that description; key-based providers do not, because a key in front-end code is a key anyone can copy. The usual compromise is a small server route that holds the key, adds caching and returns only the fields your interface needs.

Presenting the forecast honestly

A forecast carries uncertainty, and a clean interface tends to hide it. "30% chance of rain" means something specific - roughly, that it rains on three of every ten days with these conditions - and users routinely read it as light rain, or as rain for 30% of the day. Showing a range rather than a single temperature, and a time window rather than an exact hour, communicates the underlying confidence more honestly. Also show when the data was last updated: a forecast with no timestamp looks equally authoritative whether it is ten minutes or ten hours old.

Related resources

For the general evaluation checklist, see Public APIs for Developers. If your app also displays prices, the Free Currency APIs page covers the same trade-offs for exchange rates, and Free JSON APIs is a good place to find test data while you build the interface.

Frequently asked questions

Which weather API works without an API key?

Open-Meteo, Met Norway Locationforecast and the US National Weather Service API all document key-free access. The two government services require a descriptive User-Agent header identifying your application.

Can I use a free weather API in a commercial product?

Often not. Several free tiers are explicitly non-commercial, and apps with advertising usually count as commercial. Check the terms of service rather than assuming.

Keep going

Related resources

Hand-picked pages that pair well with this one.

Public APIs

Public APIs for Developers

Where to find public APIs, how to judge one before you build on it, and five reliable starting points.

Open

Public APIs

Free Currency APIs

Exchange rate sources with free access, and the difference between reference rates and market rates.

Open

Public APIs

Free JSON APIs

Sample and real JSON endpoints for prototypes, tutorials, portfolio projects and interface testing.

Open