Overview
This API delivers historical data since 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.
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 API URL parameters).
Base URL:
https://my.meteoblue.com/history
Example URL that fetches temperature data for Basel for 2022-11-01 to 2022-11-02:
Mandatory API-URL 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 |
Optional API-URL 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 |