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:
Mandatory URL Query Parameters
Parameter | Description | Example |
---|---|---|
start | Start date | &start=2022-11-01 |
end | End date | &end=2022-11-02 |
lat | Latitude coordinate in WGS84 | &lat=47.1 |
lon | Longitude coordinate in WGS84 | &lon=8.6 |
variable | Weather variable to fetch data for | &variable=temperature |
apikey | Valid meteoblue API key | &apikey=abc |
Variable-specific Mandatory Parameters
Variable | Parameter | Description | Example |
---|---|---|---|
windpower | turbineid | Identifier of the type of turbine used | &turbineid=1 |
windpower | numberofturbines | Number of individual turbines | &numberofturbines=5 |
pvpower_backwards | slope | Inclination of the panel relative to ground (0 = horizontal; 90 = vertical) | &slope=20 |
pvpower_backwards | facing | East-west facing of the panel (0 = north, going clockwise) | &facing=180 |
pvpower_backwards | kwp | Peak capacity of the PV system | &kwp=1 |
pvpower_backwards | power_efficiency | Power efficiency of the PV system | &power_efficiency=0.9 |
pvpower_backwards | tracker* | Sun tracker mode setting | &tracker=1 |
*Sun Tracker Definition
Mode | Description |
---|---|
1 | Daily vertical axis tracker |
2 | Daily 2-axis tracker |
3 | Yearly horizontal tracker |
4 | Daily DNI tracker |
5 | Daily horizontal axis tracker |
Optional URL Query Parameters
Parameter | Description | Example | Default | Remarks |
---|---|---|---|---|
domain | Weather model domain | &domain=ERA5T | ERA5T | Gaps are filled with NEMS model data Available options are ERA5T and NEMSAUTO |
asl | Location height above sea level in meters | &asl=279 | Digital elevation model | |
utc_offset | Time offset to UTC in hours | &utc_offset=3 | UTC (0) | Accepts half hours, ie. &utc_offset=1.5 |
format | Output format of the fetched data | &format=csv | json | Available formats: json, csv |
resolution | Time resolution of the data | &resolution=daily | hourly | An aggregation must be specified when querying daily data. Supported time resolutions: hourly, daily, monthly |
aggregation | Aggregation option for daily and monthly data | &aggregation=mean | none | Supported aggregations: min, max, mean, sum |
gapfill | Defines whether gap filling is activated | &gapfill=false | true | The 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 Variable | Example | Default | Available units |
---|---|---|---|
Temperature | &temperature=C | °C | C, K, F |
Precipitation | &precipitationamount=inch | mm | mm, inch |
Wind speed | &windspeed=bft | m/s | m/s, km/h, mph, kn, bft |
Wind direction | &winddirection=2char | degree | degree, 2char, 3char |
Time formats | &timeformat=YMD | iso8601 | iso8601, timestamp_utc, timestamp_ms_utc, YMD, Y-M-D |
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: