Skip to main content

Overview

This API delivers historical data beginning in 1940, calculated by the ERA5T re-analysis model dataset with a delay of about 8 days. If you query data for time periods that are not covered with ERA5T data, the API will automatically gap-fill the remaining days with meteoblue NEMS model data.

API Queries

One API call provides a time series of historical weather data for one weather variable and a maximum of 30 years. The default time zone setting is UTC, however, you can also retrieve data in local time by specifying the UTC offset in the API request (see Optional URL Query Parameters).

Base URL: https://my.meteoblue.com/history/point

Example URL that fetches temperature data for Basel for 2022-11-01 to 2022-11-02:

https://my.meteoblue.com/history/point?start=2022-11-01&end=2022-11-02&lat=47.1&lon=8.6&variable=temperature&apikey=DEMOKEY

Mandatory URL Query Parameters

ParameterDescriptionExample
startStart date&start=2022-11-01
endEnd date&end=2022-11-02
latLatitude coordinate in WGS84&lat=47.1
lonLongitude coordinate in WGS84&lon=8.6
variableWeather variable to fetch data for&variable=temperature
apikeyValid meteoblue API key&apikey=abc

Variable-specific Mandatory Parameters

VariableParameterDescriptionExample
windpowerturbineidIdentifier of the type of turbine used&turbineid=1
windpowernumberofturbinesNumber of individual turbines&numberofturbines=5
pvpower_backwardsslopeInclination of the panel relative to ground (0 = horizontal; 90 = vertical)&slope=20
pvpower_backwardsfacingEast-west facing of the panel (0 = north, going clockwise)&facing=180
pvpower_backwardskwpPeak capacity of the PV system&kwp=1
pvpower_backwardspower_efficiencyPower efficiency of the PV system&power_efficiency=0.9
pvpower_backwardstracker*Sun tracker mode setting&tracker=1

*Sun Tracker Definition

ModeDescription
1Daily vertical axis tracker
2Daily 2-axis tracker
3Yearly horizontal tracker
4Daily DNI tracker
5Daily horizontal axis tracker

Optional URL Query Parameters

ParameterDescriptionExampleDefaultRemarks
domainWeather model domain&domain=ERA5TERA5TGaps are filled with NEMS model data
Available options are ERA5T and NEMSAUTO
aslLocation height above sea level in meters&asl=279Digital elevation model
utc_offsetTime offset to UTC in hours&utc_offset=3UTC (0)Accepts half hours, ie. &utc_offset=1.5
formatOutput format of the fetched data&format=csvjsonAvailable formats: json, csv
resolutionTime resolution of the data&resolution=dailyhourlyAn aggregation must be specified when querying daily data. Supported time resolutions: hourly, daily, monthly
aggregationAggregation option for daily and monthly data&aggregation=meannoneSupported aggregations: min, max, mean, sum
gapfillDefines whether gap filling is activated&gapfill=falsetrueThe API automatically uses NEMS data for gap filling
If user chooses NEMSAUTO as domain, gapfill is ERA5T

Weather Variable Units

The API supports all common units as specified in the following table. The desired unit can be defined in the API request. If it is not defined, data will be delivered in the default unit.

Weather VariableExampleDefaultAvailable units
Temperature&temperature=C°CC, K, F
Precipitation&precipitationamount=inchmmmm, inch
Wind speed&windspeed=bftm/sm/s, km/h, mph, kn, bft
Wind direction&winddirection=2chardegreedegree, 2char, 3char
Time formats&timeformat=YMDiso8601iso8601, timestamp_utc, timestamp_ms_utc, YMD, Y-M-D
note

If you have used the previous version of this API (history packages), we recommend requesting NEMSAUTO data to ensure that you have a consistent time series from the same data source. This dataset is built up through archiving the raw weather model output from the NEMS model with the highest spatial resolution once a day (forecast hours 12 through 36).

Sample API call to retrieve NEMSAUTO data:

https://my.meteoblue.com/history/point?start=2022-11-01&end=2022-11-02&lat=47.1&lon=8.6&variable=temperature&domain=NEMSAUTO&apikey=DEMOKEY