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 |
| 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 | 16 | Speed (kts) |
| levels | array | Optional | - | Weather element levels |
| runtime | string | Optional | latest | Models run |
| units | array | Optional | - | Weather element units |
| Property | Type | Description | |
|---|---|---|---|
model | string | Name of the weather model used to generate the forecast. | |
speed | object | Speed of the travel along the route represented in different units. | |
└─ms | number | Speed in meters per second. | |
└─kmh | number | Speed in kilometers per hour. | |
kts |
curl "https://api.infoplaza.com/v1/marine/timeseries/route
?lats=52.02,52.37
&lons=5.16,4.89
&model=optimal-wave
&elements=waveheight_significant
&api_key=$INFOPLAZA_API_KEY"{
"model": "optimal-wave",
"speed": {
"ms": 8.23,
"kmh": 29.632,
"kts": 16
},
"runtime": 1788393600,
"elements": [
{
"data": [
{
"lat": 52.02,
"lon": 5.16,
"time": 1788425362,
"value": null,
"offset": 9,
"distance": 0,
"offsetTime": 1788426000
},
{
"lat": 52.37,
"lon": 4.89,
"time": 1788430592,
"value": 1.81,
"offset": 10,
"distance": 43049,
"offsetTime": 1788429600
}
],
"unit": "m",
"level": "",
"element": "waveheight_significant"
}
]
}| integer |
| Speed in knots. |
runtime | integer | Timestamp (Unix time) when the forecast model run was initiated. |
elements | array | List of weather elements included in the forecast for each location along the route. |
└─data | array | Time-dependent weather data specific to waypoints along the route. |
└─lat | number | Latitude coordinate of the waypoint. |
└─lon | number | Longitude coordinate of the waypoint. |
└─time | integer | Timestamp (Unix time) corresponding to the forecast time for this waypoint. |
└─value | number | null | - |
└─offset | integer | Forecast interval offset index selected based on estimated arrival time. |
└─distance | integer | Distance in meters along the route from the starting point to this waypoint. |
└─offsetTime | integer | Exact timestamp indicating the time of the forecast interval used (Unix time). |
└─unit | string | Units of measurement for the element's values. |
└─level | string | Vertical level or layer for the element, or empty if not applicable. |
└─element | string | Identifier of the weather element, e.g. 'waveheight_significant'. |