Back to data catalog

Weather API

Global weather forecasts and information about sunrise and sunset

More info

Data sources

The data for this Weather API is exclusively retrieved from https://api.met.no, renowned for its comprehensive and accurate meteorological data. This source provides users with dependable weather forecasts and precise information on sunrise and sunset times. Unless specified otherwise, all data and products are licensed under the Norwegian Licence for Open Government Data (NLOD) 2.0 and Creative Commons 4.0 BY International licences.

Processing

The data obtained from the Norwegian Meteorological Institute is presented as is, without any further processing or modification.

Examples

Example 1

Retrieving weather forecast for a given location for the next 9 days.

const response = await fetch(
	"https://api.openepi.io/weather/locationforecast?lat=52.520008&lon=13.404954"
)
const json = await response.json()

// Get the instant air temperature
const airTemperature =
	json.properties.timeseries[0].data.instant.details.air_temperature

console.log(`Air temperature: ${airTemperature}`)