Distance

Description

DISTANCE method delivers the shortest sea route between selected points along with calculated distance. The API response is in GeoJSON format.

Pricing

The price of distance method is 1 credit per delivered response.

URL format

https://api.vesselfinder.com/distance?userkey=AABBCCDD&from=lon1,lat1&to=lon2,lat2&param1=value1&param2=value2...

Parameters

Parameter Required Type Default Description
userkey yes text - Your personal API key
from yes text - Comma separated longitude, latitude of the first point
to yes text - Comma separated longitude, latitude of the second point
gateways no text - Comma separated list of straits, canals and passages, which are opened for crossing (by default all are closed)
ECA no text allow ECA zone crossing preferences (allow, deny, minimize)
EPSG3857 no int 0 If set to 1 returns coordinates in EPSG3857 geodetic system (WebMercator)

Аvailable gateways

Gateway Description
suez Suez Canal
panama Panama Canal
kiel Kiel Canal
oresund Oresund Strait
messina Messina Strait
corinth Corinth Canal
malacca Malacca strait
drake Drake Passage
magellan Magellan Strait
northeast Northeast passage
northwast Northwest passage

Example

https://api.vesselfinder.com/distance?userkey=AABBCCDD&from=27.3711,43.256&to=128.345,-34.223&gateways=panama,suez

{  
  "geometry": {
    "coordinates": [
      [
        27.3711,
        43.256
      ],
      [
        27.939036,
        43.190176
      ],
      [
        28.018078,
        43.182272
      ],
      [...]
    ],
    "type": "LineString"
  },
  "properties": {
    "Crossing": [
      "Bosporus strait",
      "Dardanelles strait",
      "Suez canal",
      "Bab-el-Mandab strait",
      "SW Australia"
    ],
    "Distance": 15414989,
    "DistanceECA": 0
  },
  "type": "Feature"
}