OpenShipData online API Description

The Open Ship Data API offers versatile marine vessel features search that allows to interchange data from vessels such as location, speed and destination. The following endpoints are available:

  1. find ships in an area, moving or still
  2. get planned arrivals in an area
  3. lookup specific ships
  4. upload single ship location data
  5. wipe user data
  6. search ships using text search
  7. track an individual ship (free)
  8. track multiple ships (free)

All coordinates are in WGS84. All timestamps are in seconds UTC time, unless otherwise specified.

API

All methods use http(s)://ais.marineplan.com as the base path.

1. Find ships in area

GET /location/<version>/locations.json?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
areaWGS84 rectangleSW latitude, longitude; NE latitude, longitude, e.g. 52.5,4.80180;52.61,4.92Amsterdam area
maxagemaximum data age in seconds0 reflects any age1800
movingfilter for moving or still ships0=still ships
1=moving ships
 1
sourcedata source filterOne of the following values:

NAVKID: only NavKid app

VAARKAART_NL: only Vaarkaart NL app

WATERKAART_NL: only Waterkaart NL app

TEST: playground

APPS: any of the 3 apps

ANY: aggregation of all possible sources

AIS: only AIS source
 ANY
keyAPI secret key, to be requested from MarinePlanUUID –

2. Get planned arrivals in area

GET /location/<version>/arrivals.json?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
areaWGS84 rectangleSW latitude, longitude; NE latitude, longitude, e.g. 52.5,4.80180;52.61,4.92World
maxagemaximum data age in seconds0 reflects any age1800
sourcedata source filterOne of the following values:
NAVKID
VAARKAART_NL
WATERKAART_NL
TEST
ANY
AIS
 ANY
keyAPI secret key, to be requested from MarinePlanUUID –

3a. Lookup specific ships

This method call allows you to fetch multiple ships in one go.

GET /location/<version>/ships.json?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
shipsthe ships to be collected data forsemicolon-separated list of ship names or MMSI numbers (spaces can be removed and matching is case insensitive)empty
areaWGS84 rectangleSW latitude, longitude; NE latitude, longitude, e.g. 52.5,4.80180;52.61,4.92World
sourcedata source filterOne of the following values:
NAVKID
VAARKAART_NL
WATERKAART_NL
TEST
ANY
AIS
 ANY
keyAPI secret key, to be requested from MarinePlanUUID –

3b. Lookup one ship only

This method call allows you to fetch a single ship. If none, or multiple ships are found, a HTTP result 404 or 400 is respectively thrown.

GET /location/<version>/ship.json?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
shipthe ships to be collected data forship name or MMSI number (spaces can be removed and matching is case insensitive)
areaWGS84 rectangleSW latitude, longitude; NE latitude, longitude, e.g. 52.5,4.80180;52.61,4.92World
sourcedata source filterOne of the following values:
NAVKID
VAARKAART_NL
WATERKAART_NL
TEST
ANY
AIS
 ANY
keyAPI secret key, to be requested from MarinePlanUUID –

4. Upload single ship location

POST /location/<version>/locations.json?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
idunique ID to identify the boat, suggested is a once-generated UUID per user per appstringmmsi, callsign or empty
sourcedata source (use TEST as a playground)One of the following values:
NAVKID
VAARKAART_NL
WATERKAART_NL
TEST
AIS
pointboat current location in WGS84latitude,longitude
pathcompressed route ahead of the boatSee below for details.Empty
widthbeam of ship in metersfloat
heightmaximum height of boat in metersfloat
lengthboat length in metersfloat
destinationdestination point in WGS84latitude,longitude
destinationnamedescription of destinationstring
etaETA time in seconds UTCint0
speedspeed in kmhfloat0
bearingcompass direction of traveldegrees (North = 0, East = 90, etc.)0
nameboat namestringEmpty
typeship typeinteger, one of:
6: canoe
5: open console boat
4: recreation cruiser
3: recreation yacht
2: cargo vessel
captainname of captainstringEmpty
callsignbaot call sign (if certified)stringEmpty
mmsiboat MMSI (if certified)stringEmpty
draughtboat depth in metersfloat 0
keyAPI secret key, to be requested from MarinePlanUUID
keysseries of keys, corresponding to the valuescomma separated strings of JSON field names
valuesseries of values, corresponding to the keyscomma separated strings

Adding extra arbitrary data

This feature allows ships to post extra data such as battery capacity, engine temperature, battery state-of-charge etc. These values can be accessed by API call 3 ships.json or ship.json in the shape of properties.

Passing this data uses the key/value principle, like “voltage”=”12.4”, where voltage is the key and 12.4 is the value. Multiple key/value-pairs can be added. All keys should be concatenated, separated by commas, and the values likewise. As an example the engine temperature and battery voltage are used:

&keys=engineTemperature,batteryVoltage&values=81.5,12.4

Please note no units are added and no validation is done. Values are stored and passed to any interested party using the ships.json or ship.json method in the API.

Route compression
The path ahead is compressed using a simple algorithm. All samples are separated by semicolons. A sample is latitude,longitude,ETA-time,ISRS-ID (optional=0). The first sample is absolute, e.g. 52.49150,4.80182,1586528445,12626161. Any subsequent samples are relative, where the latitude and longitude values are the difference relative to the last value, multiplied by 100,000 and its delta time is relative to the last sample in seconds. So if next sample is 52.49250,480190 in 50 seconds, the 2nd sample is 100,8,50,0.
There is no minimal requirement of the number of sample points. A kilometer ahead would in practice suffice to indicate the direction of travel.

5. Wipe user data

DELETE /location/<version>/locations/<id>?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
idunique ID to identify the boat, suggested is a once-generated UUID per user per app (when the ID is lost, the data will time out and be removed after 24h)string
keyAPI secret key, to be requested from MarinePlanUUID –

6. Search for ships in area

GET /location/<version>/search.json?<parameters>
parameterdescriptionvaluesdefault value
versionAPI version2 
areaWGS84 rectangleSW latitude, longitude; NE latitude, longitude, e.g. 52.5,4.80180;52.61,4.92Amsterdam area
queryname or MMSIstring or partial string, may end with *, e.g. “jaco*”
maxmaximum number of results0..10030
sourcedata source filterOne of the following values:

NAVKID: only NavKid app

VAARKAART_NL: only Vaarkaart NL app

WATERKAART_NL: only Waterkaart NL app

TEST: playground

APPS: any of the 3 apps

ANY: aggregation of all possible sources

AIS: only AIS source
 ANY
keyAPI secret key, to be requested from MarinePlanUUID –

7. Track an individual ship

GET /location/<version>/ship.html?<parameters>

parameterdescriptionvaluesdefault value
versionAPI version2 –
languageoutput languageEN
NL
FR
DE
DA
SV
IT
ES
PT
FY
EN
shipname or MMSIstring
 

8. Track Multiple ships

GET /location/<version>/ships.html?<parameters>

parameterdescriptionvaluesdefault value
versionAPI version2 –
languageoutput languageEN
NL
FR
DE
DA
SV
IT
ES
PT
FY
EN
shipsnames or MMSIscomma separated strings
Translate page