Request
You should address your forecast requests with the GET
HTTPS verb to the following url :
https://front-remora.greatcircle.be/forecast
All arguments (mandatory as well as optional) should be passed through the query string. If you are not familiar with query strings, read this query string introduction or head to the Examples section for a few examples on how to use query strings in the frame of the Forecast API.
Mandatory Arguments
The 3 following arguments are mandatory and if you forget any of them you will consistently receive a bad request response.
Argument Name | Description |
---|---|
token | Authentification token |
longitude | Longitude of the point you wish to compute a forecast for |
latitude | Latitude of the point you wish to compute a forecast for |
Optional Arguments
Optional arguments can (but don't have to) be passed in the query string as well in order to best suit your needs, reduce computation time and/or reduce response size. The following arguments are accepted by the API :
Argument Name | Default Value | Description |
---|---|---|
variables | all | Comma separated list of variables you are interested in. Valid values are any of the following (or any combination of these values) : wind , pressure , clouds , temperature , precipitation (BETA), humidity , snow (BETA), storm , sea (BETA), geopotential_height , planet_boundary_layer . These variables represent categories of more detailed measures and are discussed in the Variables section. |
horizon | 7,d | The time horizon for which the forecast must be computed. It must be formatted as : value,unit . The value must be a positive number (eventually decimal) and the unit can be any of the following : m for minute, h for hour or d for day. Note that the default (and maximal) horizon is 7 days, while the minimal value is 1 minute. |
exclude | Comma separated list of parts you want to exclude from the response body. Valid values are : minute , hour , warnings and metadata . The usage of this argument is explained in depth in the subsequent section. |
|
extend | This argument accepts only one value : hour . If set to this value, then the forecast will use 1 hour steps instead of 3 hours steps when applicable. |
|
units | Coming soon... |
More on the exclude
argument
In short, the response body is a JSON formatted text containing multiple fields. Amongst them you will find the warnings
and metadata
fields by default. In case you don't need either or both of these 2 fields, you can specify it with the exclude
argument so that the returned response is a little smaller in terms of file size.
The other possible values for the exclude
argument are a little bit more complicated. By default, the forecast will be computed minute by minute for the first 3 hours, then hour by hour for the next 45 hours, then with steps of 3 hours for the remaining 5 days, unless it exceeds the value provided for horizon
of course. The exclude
argument allows you to alter this default behaviour.
Specifying exclude=minute
indicates that you don't need a forecast with 1 minute precision in the beginning and the predictions will be spaced with 1 hour steps instead, or even 3 hours steps if you specify exclude=minute,hour
.
Similarly, you may also specify exclude=hour
if you want to have 1 minute spaced predictions for the first 3 hours and then 3 hours spaced predictions for the next 165 hours (or until we reach the value of horizon
).