GET /location¶
Description¶
The /location endpoint queries weather forecasts in a time series at
a specific location, e.g. pos=<location_name> or pos=lat;lon.
Endpoint¶
GET https://api.route-weather.com/location
Query parameters¶
| Parameter | Value | Description |
|---|---|---|
| pos | location | The spcified location by address string or lat;lon coordinates. See location syntax |
| start | string | Start time for looking up forecast data, e.g. start=now or ISO time string start=2021-04-26T18:03. See waypoint time syntax. |
| stop | string | Stop time for looking up forecast data, e.g. stop=prev_plus_2h or ISO time string start=2021-04-26T20:03. See waypoint time syntax. |
| params | array of parameters | Forecast model and parameters to query. See parameter definitions. |
| view | view name | See view options. |
| token | string | Unique access key, see authorization api. |
| save | boolean [true/false] | Stores forecast data response so that can be recalled and shared using the saved endpoint. |
Compulsory query parameter is pos=<location>, to specify a location.
Example request¶
Time series forecast for Thorlakshofn in Iceland, starting from forecast model initial time:
https://api.route-weather.com/location?start=initial_time&pos=Thorlakshofn¶ms=wind,temp&view=json
Example response¶
{
"forecasts": {
"gfs": {
"source": "GFS 2019-01-22T1800",
"dists": [0.0, 27780.0, 55560.0, ..., 2821447.279],
"lat": 63.85617,
"lon": -21.38656,
"times": [1548180000, 1548183600, ..., 1548284400]
"members": {
"gfs": {
"temp": [0.531, 2.773, 3.369, ..., 13.739],
"wind": [2.489, 5.868, 7.503, ..., 7.846]
}
},
}
},
"units": {
"temp": "°C",
"wind": "m/s"
},
"waypts": {
"route": [{ "label": "Thorlakshofn",
"lat": 63.85617,
"lon": -21.38656,
"time": 1548211878.0}
}]
}
}