Route Planner
Returns the optimal sea route between ports, including total distance, ECA distance, estimated arrival time, travel duration, and route path points. Path points are provided every 300 nautical miles. Supports multi-leg routes by passing up to 5 ports. Costs 10 credits per request. Rate limit: 15 requests/min.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ports | string | Yes | Comma-separated list of UNLOCODEs (2–5 ports) |
vessel_speed | integer | Yes | Vessel speed in knots |
departure_time | string | Yes | Departure date/time in ISO 8601 format |
exclude_gateways | string | No | Comma-separated list of gateways to avoid |
eca | string | No | Pass 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.Departure Time Format
Must follow the exact format:YYYY-MM-DDTHH:MM:SSZ
Exclude Gateways
Comma-separated list of waterways/straits the route should avoid. Values are case-insensitive.| Value | Gateway |
|---|---|
corinth | Corinth Canal |
drake | Drake Passage |
kiel | Kiel Canal |
magellan | Strait of Magellan |
malacca | Strait of Malacca |
messina | Strait of Messina |
northeast | Northeast Passage |
northwest | Northwest Passage |
oresund | Øresund Strait |
panama | Panama Canal |
suez | Suez Canal |
exclude_gateways=suez,panama
ECA Parameter
Controls whether the route avoids Emission Control Areas.| Value | Behavior |
|---|---|
avoid | Route is planned to bypass ECA zones |
| (omitted) | ECA zones are not considered |
Response Format
The response is aroutes 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
| Field | Type | Description |
|---|---|---|
fromPort | string | UNLOCODE of the leg’s origin port |
toPort | string | UNLOCODE of the leg’s destination port |
distance.distance | integer | Leg distance in nautical miles |
distance.unit | string | Always "kn" (nautical miles) |
distanceInEca.distance | integer | Leg distance within ECA zones |
distanceInEca.unit | string | Always "kn" |
crossing | array | Straits/canals/passages crossed on this leg |
estimatedArrival | string | Estimated arrival datetime for this leg (ISO 8601, UTC) |
duration.years | integer | Leg duration - years component |
duration.month | integer | Leg duration - months component |
duration.days | integer | Leg duration - days component |
duration.hours | integer | Leg duration - hours component |
pathPoints | array | Ordered 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
Example Request
Authorizations
Your personal API key found in your profile dashboard at https://datadocked.com/dashboard/my_keys
Query Parameters
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 in knots. Used to calculate travel duration and estimated arrival.
Departure date and time in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).
Comma-separated list of gateways/straits to avoid. Values: corinth, drake, kiel, magellan, malacca, messina, northeast, northwest, oresund, panama, suez.
Pass 'avoid' to route around ECA (Emission Control Areas) zones.
avoid Response
Successful response with route information
Ordered list of route legs. One entry per consecutive pair of ports in the request (e.g. 3 ports produces 2 legs).