Get a weather forecast along a route, where for each waypoint the correct forecast offset is chosen based on the estimated arrival time at that point. You provide a series of coordinates (the route) and a speed; the API calculates when you'll arrive at each point and returns the weather values for the requested elements at the matching forecast offsets. This gives you a time-dependent forecast per location instead of a static forecast for a single moment, which is useful for route planning, navigation, and logistics where weather conditions change along the way.
Available for all weather models except ensemble models.
Credits = waypoints count x elements count
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| lats | array | Required | - | The latitudes of the route |
| lons | array | Required | - | The longitudes of the route |
| model | string | Required | - | Weather model key |
| elements | array | Required | - | Weather elements |
| levels | array | Required | - | Weather element levels |
| times | array | Optional | - | Waypoint times (epoch), if set then "start" and "speed" parameters are ignored. |
| start | number | Optional | - | Start time (epoch), default: Now |
| speed | number | Optional | 25 | Speed in km/h |
| runtime | string | Optional | latest | Models run |
| units | array | Optional | - | Weather element units |
| Property | Type | Description | |
|---|---|---|---|
model | string | The weather model used for the forecast, e.g. 'optimal'. | |
speed | object | The travel speed along the route in different units. | |
└─ms | number | Speed in meters per second. | |
└─kmh | number | Speed in kilometers per hour. | |
runtime |
curl "https://api.infoplaza.com/v1/weather/timeseries/route
?lats=52.02,52.37
&lons=5.16,4.89
&model=optimal
&elements=temperature,windspeed
&levels=2m,10m
&api_key=$INFOPLAZA_API_KEY"{
"model": "optimal",
"speed": {
"ms": 6.94,
"kmh": 25
},
"runtime": 1788346800,
"elements": [
{
"data": [
{
"lat": 52.02,
"lon": 5.16,
"time": 1788352219,
"value": 19.8,
"offset": 2,
"distance": 0,
"offsetTime": 1788354000
},
{
"lat": 52.37,
"lon": 4.89,
"time": 1788358422,
"value": 20,
"offset": 3,
"distance": 43049,
"offsetTime": 1788357600
}
],
"unit": "°C",
"level": "2m",
"element": "temperature"
},
{
"data": [
{
"lat": 52.02,
"lon": 5.16,
"time": 1788352219,
"value": 3.34,
"offset": 2,
"distance": 0,
"offsetTime": 1788354000
},
{
"lat": 52.37,
"lon": 4.89,
"time": 1788358422,
"value": 5.36,
"offset": 3,
"distance": 43049,
"offsetTime": 1788357600
}
],
"unit": "m/s",
"level": "10m",
"element": "windspeed"
}
]
}| integer |
| Unix timestamp (seconds since epoch) indicating the model run time of the forecast. |
elements | array | An array of weather elements for which forecast data is returned. |
└─data | array | Forecast data points for the element at each waypoint along the route. |
└─lat | number | Latitude coordinate of the waypoint in decimal degrees. |
└─lon | number | Longitude coordinate of the waypoint in decimal degrees. |
└─time | integer | Estimated arrival time at the waypoint as Unix timestamp (seconds since epoch). |
└─value | number | The forecasted value of the weather element at the waypoint and offset. |
└─offset | integer | Forecast time offset (typically in hours) used for matching the weather data to the arrival time. |
└─distance | number | Distance in meters from the start of the route to this waypoint. |
└─offsetTime | integer | The exact forecast timestamp corresponding to the selected offset, in Unix timestamp (seconds since epoch). |
└─unit | string | Unit of measurement for the weather element values, e.g. '°C', 'm/s'. |
└─level | string | The atmospheric level or height at which the element is measured, e.g. '2m', '10m'. |
└─element | string | The weather element type, e.g. 'temperature', 'windspeed'. |