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 ensemble weather 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 |
| runtime | string | Optional | latest | Models run |
| units | array | Optional | - | Weather element units |
| start | number | Optional | - | Start time (epoch), default: Now |
| speed | number | Optional | 25 | Speed in km/h |
| Property | Type | Description | |
|---|---|---|---|
model | string | The model name used for the route timeseries data. | |
speed | object | Speed of the route in different units. | |
└─ms | number | Speed in meters per second. | |
└─kmh | number | Speed in kilometers per hour. | |
runtime |
curl "https://api.infoplaza.dev/v1/weather/ensemble/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": 1778583600,
"elements": [
{
"data": [
{
"lat": 52.02,
"lon": 5.16,
"time": 1778586679,
"value": 10.39,
"offset": 1,
"distance": 0,
"offsetTime": 1778587200,
"distanceTime": 0
},
{
"lat": 52.37,
"lon": 4.89,
"time": 1778592882,
"value": 11.9,
"offset": 3,
"distance": 43049,
"offsetTime": 1778594400,
"distanceTime": 6203
}
],
"unit": "°C",
"level": "2m",
"element": "temperature"
},
{
"data": [
{
"lat": 52.02,
"lon": 5.16,
"time": 1778586679,
"value": 5.96,
"offset": 1,
"distance": 0,
"offsetTime": 1778587200,
"distanceTime": 0
},
{
"lat": 52.37,
"lon": 4.89,
"time": 1778592882,
"value": 6.35,
"offset": 3,
"distance": 43049,
"offsetTime": 1778594400,
"distanceTime": 6203
}
],
"unit": "m/s",
"level": "10m",
"element": "windspeed"
}
]
}| The runtime timestamp representing the start time for the route timeseries as a Unix timestamp in seconds. |
elements | array | An array of elements describing the different parameters available along the route. |
└─data | array | Array of data points along the route for this element. |
└─lat | number | Latitude coordinate (in decimal degrees) of the data point. |
└─lon | number | Longitude coordinate (in decimal degrees) of the data point. |
└─time | integer | Unix timestamp (seconds) representing when this data was recorded or valid. |
└─value | number | The measured or modeled value of the element at this data point. |
└─offset | integer | Offset in hours relative to some reference time, often runtime. |
└─distance | number | Distance in meters along the route from the start. |
└─offsetTime | integer | Unix timestamp (seconds) representing the time after applying the offset. |
└─distanceTime | integer | Time in seconds needed to travel the distance from the start. |
└─unit | string | The unit of measurement for the element values. |
└─level | string | The vertical level or height at which the element is measured. |
└─element | string | The name of the element, e.g., temperature, windspeed. |