Skip to content

GET /forecast

Description

The /forecast endpoint queries weather forecast parameters along a ship route or at a fixed location. Weather forecasts can be returned as JSON by default or using various more advanced predefined views on the data.

Endpoint

GET https://api.seamon.io/forecast

Query parameters

Parameter Value Description
waypts array of waypoints Waypoints interpolated by shortest distance, a great circle arc. See waypoint definitions.
route array of waypoints Routes between waypoints along predefined and supported routes in the SeaMon-API backend service, for example shipping lanes. See waypoint definitions.
drive array of waypoints Routes between waypoints are resolved using a road routing engine for shortest distances between locations along a road network. See waypoint definitions.
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 parameters are one of waypts or route

Example request

Sailing

Great circle route from Thorlakshofn in Iceland towards Azore Islands at 15 knots cruising speed.

https://api.seamon.io/forecast?waypts=(Thorlakshofn;now),(Azores_Islands;15kn)&params=wind,temp&view=json

Driving

Shortest driving route from Thorlakshofn towards Akureyri at 80 kph average speed, with 1 hour stop in Stadarskali.

https://api.seamon.io/forecast?drive=(Thorlakshofn;now),(Stadarskali;80kph),(Stadarskali;prev_plus_2h),(Akureyri;80kph)&params=wind,temp&view=json

Example response

{
  "forecasts": {
    "gfs": {
      "source": "GFS 2019-01-22T1800", 
      "dists": [0.0, 27780.0, 55560.0, ..., 2821447.279], 
      "lats": [63.856, 63.611, 63.365, ..., 38.721], 
      "lons": [-21.387, -21.491, -21.593, ..., -27.218], 
      "times": [1548211878, 1548215478, 1548219078, ..., 1548577508]
      "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.8561751,
                "lon": -21.3865699,
                "time": 1548211878.0}, 
              { "label": "Azores Islands",
                "lat": 38.72116905,#
                "lon": -27.2175952565789,
                "time": 1548577508.3200748}]
  }
}