Skip to main content
GET
Route Planner
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

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. Example: exclude_gateways=suez,panama

ECA Parameter

Controls whether the route avoids Emission Control Areas.

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

estimatedArrival and duration are calculated server-side from departure_time and vessel_speed. All times are UTC.

Example Response

Example Request

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).