Geo-coordinates (latitude and longitude) in WGS-84 decimal format. It is possible to query a single point, a point list, a line, or a rectangle. In source mix-obs you can also use an identifier instead of coordinates to specify a station.
Dates and times are specified according to the ISO-86011 format (YYYY-MM-DDThh:mm:ssZ). All times are in UTC. Note that the part containing time specifications (Thh:mm:ss) is optional.
Example for single point in time: 2015-01-20T18:45Z20th of January 2015, 18:45 UTC
You can specify the time zone by adding the deviation from UTC: 2015-01-20T18:45+01:0020th of January 2015, 19:45 CET
Specification of time periods
a) Start point + duration
You need to define the beginning and the duration of the desired period. A period of date elements always starts with the duration designator P and is followed by the desired period (years (Y), months (M) and days (D)). For periods of time elements the time designator T follows (hours (H), minutes (M) and seconds (S)). The result is a list of ascending time steps beginning with the defined starting point and ending with the last time step of the defined period.
Additionally, you have to specify the spacing of the time period - depending on your needs you may want hourly time steps or just daily steps? The spacing is also denoted with P or PT within the command.
The definition of the period starts with P and means that the time period starts on the 28th of May 2017 at 13 UTC and lasts 5 days until the 2nd of June 2017 at 13 UTC. After PT follows the spacing of the time period. In this case the time period is divided into steps of 12 hours. The example link fetches temperature data for a given location for the specified time steps.
There are several shortcuts available for easier access to recent data. If you use such a shortcut in a command it will expand to full date/time notation. There are two kinds of shortcuts:
a) Shortcuts including date and time
In order to represent the current date and time you can use now. This command will expand to YYYY-MM-DDThh:mm:ssZ. The shortcut now can be shifted by hours (H), minutes (M) and seconds (S). For example, now+2H, now+30M and now+60S.
This example fetches precipitation data for the current time until 5 hours ahead with a step size of one hour.
b) Shortcuts including date only: additional specification of time required
The shortcuts yesterday, today, tomorrow will expand to YYYY-MM-DD. These shortcuts can be shifted by years (Y), months (M) and days (D). For example, yesterday-1Y, today-3M. tomorrow+2D. Note that you have to add a time specification to these shortcuts. The shortcuts can also be used in a list of time points: yesterdayT18Z,todayT18Z,tomorrowT18Z.
This example fetches relative humidity data from yesterday with a step size of 3 hours.
If you query parameters, which are averaged or accumulated over a certain time interval, you have to note that all time intervals are right-bounded. This means that a parameter like precip_3h:mm yields the accumulated precipitation sum over the previous 3 hours. So, the value at 18 UTC represents the precipitation sum from 15 UTC until 18 UTC.
The following table shows a summary of all described possibilities:
Single point UTC
2015-01-20T18Z - 20th January 2015, 18:00 UTC
Single point local time
2015-01-20T14:35+01:00 - 20th January 2015, 14:35, time zone UTC+01:00
Time Period (fixed length)
2017-05-28T13:00:00ZP10D:PT1H (a period of 10 days with a step size of 1 hour)
Options for duration and step:
1D: 1 day
1W: 1 week
1M: 1 month
1Y: 1 year
T1H: 1 hour
T1M: 1 minute
T1S: 1 second
and combinations of the previous, e.g. 1DT1H
Time Period (fixed end)
2017-05-28T13:00:00Z--2017-05-30T13:00:00Z:P1D (a period between two dates with step size of 1 day
Comma-separated list of sorted time points and/or periods
<isodate or period>,<isodate or period>,...,<isodate or period>
When working with latitudes and longitudes, please note that their representation in the response will contain at most 6 digits after the decimal point. This allows to represent coordinates with sub-m precision, which significantly exceeds the resolution of most data sources.
An example showing the temperature along the train line from St. Gallen via Wil and Winterthur to Zurich with 10 sample points between each two stations:
Please note that following requests require the area requests option:
Point lists containing more than 100 points
Polylines with more than 100 segments
Countries and regions
The API features a broad list of country shortcuts.
Don't hesitate to contact us if you require another country or region.
Weather Station Identifiers
In mix-obs you can use either coordinates as described above or specify stations using WMO, METAR, AMDA or MCH codes: