How to Use This API
1. Current Weather by Coordinates
https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=59.91&lon=10.75
2. Detailed Forecast (Full)
https://api.met.no/weatherapi/locationforecast/2.0/complete?lat=60.39&lon=5.32
3. Sunrise/Sunset Times
https://api.met.no/weatherapi/sunrise/3.0/sunrise?lat=59.91&lon=10.75&date=2026-06-21
4. Ocean Forecast
https://api.met.no/weatherapi/seaforecast/2.0/compact?lat=62.0&lon=5.0
5. JavaScript — 7-Day Forecast
async function getForecast(lat, lon) {
const resp = await fetch(
`https://api.met.no/weatherapi/locationforecast/2.0/compact?` +
`lat=${lat}&lon=${lon}`,
{ headers: { 'User-Agent': 'FreeAPITutorial/1.0' } }
);
const data = await resp.json();
const timeseries = data.properties.timeseries;
console.log('7-Day Forecast:');
const daily = {};
timeseries.forEach(t => {
const date = t.time.slice(0, 10);
if (!daily[date] && Object.keys(daily).length < 7) {
const temp = t.data.instant.details.air_temperature;
const symbol = t.data.next_1_hours?.summary?.symbol_code;
daily[date] = { temp, symbol };
}
});
Object.entries(daily).forEach(([date, info]) => {
console.log(`${date}: ${info.temp}°C, ${info.symbol}`);
});
}
getForecast(59.91, 10.75); // Oslo
6. Python — Weather Summary
import requests
def weather_summary(lat, lon, name):
headers = {'User-Agent': 'FreeAPITutorial/1.0'}
resp = requests.get(
'https://api.met.no/weatherapi/locationforecast/2.0/compact',
params={'lat': lat, 'lon': lon},
headers=headers
)
data = resp.json()
now = data['properties']['timeseries'][0]
details = now['data']['instant']['details']
temp = details['air_temperature']
wind = details['wind_speed']
humidity = details['relative_humidity']
pressure = details['air_pressure_at_sea_level']
print(f'Weather for {name}:')
print(f'Temperature: {temp}°C')
print(f'Wind: {wind} m/s')
print(f'Humidity: {humidity}%')
print(f'Pressure: {pressure} hPa')
weather_summary(59.91, 10.75, 'Oslo')
TL;DR
The Norwegian Meteorological Institute (MET Norway) provides a comprehensive, free weather API covering the entire globe. Get compact or detailed forecasts for any coordinates — temperature, wind speed/direction, humidity, air pressure, precipitation, cloud cover, fog, and UV index. Also offers sunrise/sunset times, sea forecasts, and historical observations. Data updated every hour with forecasts extending 10+ days. While run by Norway, the API provides global coverage using the ECMWF model. Fast, reliable, and completely open — a top alternative to paid weather APIs.
Quick start: https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=60.0&lon=11.0
No API key needed — just make a request!
https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=59.91&lon=10.75
Frequently Asked Questions
- Do I need an API key?
- No. MET Norway provides open data with no authentication. They only require a valid User-Agent header identifying your application.
- What's the required User-Agent?
- You must set a descriptive User-Agent header (e.g.,
MyApp/1.0 contact@example.com). Requests without it may be blocked. - Is the coverage global?
- Yes. While based in Norway, the API uses the ECMWF global weather model covering the entire planet with 1km resolution for Norway and lower resolution globally.
- What forecast data is included?
- Temperature, wind speed/direction, wind gust, humidity, air pressure, cloud cover, fog, precipitation amount, precipitation probability, UV index, and weather symbol codes.
- How far ahead does the forecast go?
- Approximately 10 days, with hourly resolution for the first few days and 6-hourly resolution further out.
- Can I get historical weather data?
- Yes, MET Norway provides historical observations through the Frost API, as well as archived forecast model data.
API Details
- API URL
https://api.met.no/weatherapi/- Documentation
- api.met.no
- Category
- Weather
- Authentication
- Not Required (User-Agent header required)
- Geographic Coverage
- Global
What You Can Build
- Sailing app with detailed wind forecasts for coastal navigation
- Ski resort weather tracker showing snowfall and snow line
- Hiking app with UV index and precipitation probability
- Farm irrigation planner using precipitation forecasts
- Smart home system that adjusts heating based on temperature trends