VesselFinder AIS API Documentation

Distance

Description

The Distance method returns the shortest sea route between two points and its length. The response is in GeoJSON format. XML is not supported.

Each successful response costs 1 credit.

URL format

https://api.vesselfinder.com/distance?userkey=YOUR_API_KEY&from=lon1,lat1&to=lon2,lat2&param=value&…

Parameters

ParameterRequiredTypeDefaultDescription
userkeyyestext-Your personal API key
fromyestext-Comma separated longitude, latitude of the first point
toyestext-Comma separated longitude, latitude of the second point
gatewaysnotext-Comma separated list of straits, canals and passages to open for crossing. All are closed by default
ECAnotextallowECA zone crossing preferences (allow, deny, minimize)
EPSG3857nointeger0If set to 1 returns coordinates in EPSG:3857 (Web Mercator)
  • With ECA=deny, if no route avoids the ECA zones, the API returns the error path not found.

Available gateways

GatewayDescription
suezSuez Canal
panamaPanama Canal
kielKiel Canal
oresundOresund Strait
messinaMessina Strait
corinthCorinth Canal
malaccaMalacca Strait
drakeDrake Passage
magellanMagellan Strait
northeastNortheast Passage
northwestNorthwest Passage

Code examples

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

Example

GET https://api.vesselfinder.com/distance?userkey=YOUR_API_KEY&from=27.3711,43.256&to=128.345,-34.223&gateways=panama,suez
GeoJSON
{
  "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"
}
  • Crossing property contains a list of all straits, canals and passages along the calculated route.
  • Distance property is the length (in meters) of the calculated route.
  • DistanceECA property is the length (in meters) of the calculated route in ECA zones.