Skip to main content
GET
/
route-planner
Route Planner
curl --request GET \
  --url https://datadocked.com/api/vessels_operations/route-planner \
  --header 'x-api-key: <api-key>'
{
  "routes": [
    {
      "fromPort": "NOAKM",
      "toPort": "JPAIM",
      "distance": {
        "distance": 7026,
        "unit": "kn"
      },
      "distanceInEca": {
        "distance": 201,
        "unit": "kn"
      },
      "crossing": [
        "Northeast passage",
        "Bering strait"
      ],
      "estimatedArrival": "2026-10-03T09:00:00Z",
      "duration": {
        "years": 0,
        "month": 0,
        "days": 24,
        "hours": 9
      },
      "pathPoints": [
        [
          5.177812,
          59.25707
        ],
        [
          5.336839,
          59.260461
        ]
      ]
    },
    {
      "fromPort": "JPAIM",
      "toPort": "AEAJM",
      "distance": {
        "distance": 6023,
        "unit": "kn"
      },
      "distanceInEca": {
        "distance": 0,
        "unit": "kn"
      },
      "crossing": [
        "Malacca strait",
        "Hormuz strait"
      ],
      "estimatedArrival": "2026-09-29T21:00:00Z",
      "duration": {
        "years": 0,
        "month": 0,
        "days": 20,
        "hours": 21
      },
      "pathPoints": [
        [
          131.280291,
          34.500359
        ],
        [
          131.3537,
          34.479694
        ]
      ]
    }
  ]
}
Returns the optimal sea route between ports, including total distance, ECA distance, estimated arrival time, travel duration, and route path points. Supports multi-leg routes with up to 5 ports.
Credits: 10 credits per request

Parameters

ParameterTypeRequiredDescription
portsstringYesComma-separated list of UNLOCODEs (2–5 ports)
vessel_speedintegerYesVessel speed in knots
departure_timestringYesDeparture date/time in ISO 8601 format
exclude_gatewaysstringNoComma-separated list of gateways to avoid
ecastringNoPass avoid to route around ECA zones

Ports Parameter

Pass between 2 and 5 UNLOCODEs separated by commas (no spaces). The first port is the departure, the last is the final destination, and any ports in between are treated as waypoints in the given order.
✓ ports=NLRTM,SGSIN                     (point-to-point)
✓ ports=NLRTM,ESBCN,SGSIN               (one waypoint)
✓ ports=NLRTM,ESBCN,EGSUZ,INMUN,SGSIN   (max 5 ports)
✗ ports=NLRTM                           (need at least 2)

Departure Time Format

Must follow the exact format: YYYY-MM-DDTHH:MM:SSZ
✓ 2025-06-15T08:00:00Z
✗ 2025-06-15         (missing time component)
✗ 15-06-2025T08:00Z  (wrong date order)

Exclude Gateways

Comma-separated list of waterways/straits the route should avoid. Values are case-insensitive.
ValueGateway
corinthCorinth Canal
drakeDrake Passage
kielKiel Canal
magellanStrait of Magellan
malaccaStrait of Malacca
messinaStrait of Messina
northeastNortheast Passage
northwestNorthwest Passage
oresundØresund Strait
panamaPanama Canal
suezSuez Canal
Example: exclude_gateways=suez,panama

ECA Parameter

Controls whether the route avoids Emission Control Areas.
ValueBehavior
avoidRoute is planned to bypass ECA zones
(omitted)ECA zones are not considered

Response Format

The response is a routes array. Each entry represents one leg of the journey between two consecutive ports from your ports parameter. A 2-port request returns 1 leg, a 3-port request returns 2 legs, and so on (up to 4 legs for 5 ports).

Per-leg fields

FieldTypeDescription
fromPortstringUNLOCODE of the leg’s origin port
toPortstringUNLOCODE of the leg’s destination port
distance.distanceintegerLeg distance in nautical miles
distance.unitstringAlways "kn" (nautical miles)
distanceInEca.distanceintegerLeg distance within ECA zones
distanceInEca.unitstringAlways "kn"
crossingarrayStraits/canals/passages crossed on this leg
estimatedArrivalstringEstimated arrival datetime for this leg (ISO 8601, UTC)
duration.yearsintegerLeg duration - years component
duration.monthintegerLeg duration - months component
duration.daysintegerLeg duration - days component
duration.hoursintegerLeg duration - hours component
pathPointsarrayOrdered list of [longitude, latitude] coordinates forming this leg’s path
estimatedArrival and duration are calculated server-side from departure_time and vessel_speed. All times are UTC.

Example Response

{
  "routes": [
    {
      "fromPort": "NOAKM",
      "toPort": "JPAIM",
      "distance": { "distance": 7026, "unit": "kn" },
      "distanceInEca": { "distance": 201, "unit": "kn" },
      "crossing": ["Northeast passage", "Bering strait"],
      "estimatedArrival": "2026-10-03T09:00:00Z",
      "duration": { "years": 0, "month": 0, "days": 24, "hours": 9 },
      "pathPoints": [
        [5.177812, 59.25707],
        [5.336839, 59.260461]
      ]
    },
    {
      "fromPort": "JPAIM",
      "toPort": "AEAJM",
      "distance": { "distance": 6023, "unit": "kn" },
      "distanceInEca": { "distance": 0, "unit": "kn" },
      "crossing": ["Malacca strait", "Hormuz strait"],
      "estimatedArrival": "2026-09-29T21:00:00Z",
      "duration": { "years": 0, "month": 0, "days": 20, "hours": 21 },
      "pathPoints": [
        [131.280291, 34.500359],
        [131.3537, 34.479694]
      ]
    }
  ]
}

Example Request

GET /route-planner?ports=NOAKM,JPAIM,AEAJM&vessel_speed=14&departure_time=2026-09-09T00:00:00Z

Authorizations

x-api-key
string
header
required

Your personal API key found in your profile dashboard at https://datadocked.com/dashboard/my_keys

Query Parameters

ports
string
required

Comma-separated list of UNLOCODEs (no spaces). Minimum 2, maximum 5 ports. The first port is the departure, the last is the final destination, and intermediate ports are waypoints in order.

vessel_speed
integer
required

Vessel speed in knots. Used to calculate travel duration and estimated arrival.

departure_time
string<date-time>
required

Departure date and time in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).

exclude_gateways
string

Comma-separated list of gateways/straits to avoid. Values: corinth, drake, kiel, magellan, malacca, messina, northeast, northwest, oresund, panama, suez.

eca
enum<string>

Pass 'avoid' to route around ECA (Emission Control Areas) zones.

Available options:
avoid

Response

Successful response with route information

routes
object[]

Ordered list of route legs. One entry per consecutive pair of ports in the request (e.g. 3 ports produces 2 legs).