AIS data API: ship tracks, port calls and more

Build awesome apps using MarineTraffic data

MarineTraffic handles millions of vessel position records daily. Our API allows you to integrate our data with your application or website. You can harness all this data, along with port calls, ship particulars and photographs, to build powerful applications for real-time, targeted intelligence.

Available API services

New services are being released over time. Follow our news and keep visiting this page for updates!

Service costs

[27] Vessel Positions, monthly plan

Monthly Cost for tracking a fleet of vessels
The cost depends on the frequency you will be calling the service and on the number of vessels (volume discounts apply). For example:

Request frequency 1 vessel 10 vessels 100 vessels 1000 vessels above 1000 vessels
max € 12 € 120 € 460 € 1046 please submit a request in the form below
hourly € 9 € 90 € 345 € 784
daily € 6 € 60 € 230 € 523

The above examples are for Terrestrial-AIS data only. You can also receive Satellite-AIS positions in your data feed. Please submit your request using the form below to receive a quote.

Monthly Cost for tracking vessels in an area
The cost depends on the frequency you will be calling the service and on the density of vessels in the area.

Please submit your request using the form below to receive a quote.

[25] Vessel Positions, pay as you go

Simple Response: Charged 1 credit per record returned.

Extended Response: Charged 2 credits per record returned.

Credits can be purchased online.

[43] Port Calls

Charged 4 credits per record returned.

Example: assume a service request for a specific port which will return 10 port calls of vessels in that port.

Charged 4 credits per record returned.

The cost for this request will be 4 x 10 = 40 credits.
Credits can be purchased online.

[29] Vessel Tracks

Charged 1 credit per AIS position returned (for Terrestrial-AIS data).

Example: assume a service request for a specific vessel which will return 1,200 positions.

The cost will be 1 x 1,200 = 1,200 credits. Credits can be purchased online.

You can also request Satellite AIS positions - please use the form below to receive a quote.

[26] Vessel Photos

Charged 4 credits per photo.

Credits can be purchased online.

[51] Get Fleet

Free of charge.

[50] Set Fleet

Free of charge.

API documentation

Service info

Endpoint URL: http://services.marinetraffic.com/api/exportvessels/

Service ID: 27

Returns information about current vessel(s) status.

Note: SPEED returned in (knots x10) and TIMESTAMP in UTC.

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
timespan no int 2 The maximum age, in minutes, of the returned positions. Maximum value is 60.
msgtype no string simple If used with the value extended, the response includes scheduled static and voyage related vessel data report (AIS Message 5). In this case your request frequency might be limited (depending on your service terms).
If omitted, the returned records include only position reports (AIS Messages 1, 2, 3/ 18, 19).
protocol no string xml Response type. Use one of the following: xml, csv, json
MINLAT no float   Use as a group. Available only if box requests have been enabled for your API key.
MAXLAT no float  
MINLON no float  
MAXLON no float  

Usage example

http://services.marinetraffic.com/api/exportvessels/26936354bb2759f0018afb8d688374be649b78dc/timespan:10/protocol:json

XML sample response [simple]

<pos>
<row MMSI="237327000" LAT="37.433151" LON="24.947321" SPEED="0" COURSE="138" STATUS="15" TIMESTAMP="2012-04-18T21:03:00"/>
<row MMSI="240521000" LAT="37.462719" LON="25.32613" SPEED="0" COURSE="61" STATUS="0" TIMESTAMP="2012-04-18T21:03:00"/>
<row MMSI="240391000" LAT="37.463669" LON="25.32655" SPEED="0" COURSE="146" STATUS="0" TIMESTAMP="2012-04-18T21:02:00"/>
</pos>
					

XML sample response [extended]

<pos>
<row MMSI="205623000" LAT="37.24538" LON="25.590981" SPEED="65" COURSE="288" TIMESTAMP="2012-04-18T19:21:00" SHIPNAME="MALACHITE" SHIPTYPE="70" IMO="9549645" CALLSIGN="ONHL" FLAG="BE" LAST_PORT="PORT SAID" LAST_PORT_TIME="2012-04-16T18:26:00" DESTINATION="DERINCE" ETA="2012-04-20T14:00:00" LENGTH="90" WIDTH="14" DRAUGHT="50" GRT="3517" DWT="5000" YEAR_BUILT="2012"/>
<row MMSI="241087000" LAT="37.442139" LON="24.94309" SPEED="0" COURSE="171" TIMESTAMP="2012-04-18T19:21:00" SHIPNAME="BLUE STAR DELOS" SHIPTYPE="69" IMO="9565039" CALLSIGN="SVBF7" FLAG="GR" CURRENT_PORT="SYROS" LAST_PORT="SYROS" LAST_PORT_TIME="2012-04-18T17:12:00" DESTINATION="SYROS" ETA="2012-04-18T14:00:00" LENGTH="145" WIDTH="22" DRAUGHT="58" GRT="17000" DWT="4000" YEAR_BUILT="2011"/>
<row MMSI="237594800" LAT="37.44849" LON="25.326691" SPEED="1" COURSE="175" TIMESTAMP="2012-04-18T19:21:00" SHIPNAME="ORCA" SHIPTYPE="65" IMO="0" CALLSIGN="SY2714" FLAG="GR" CURRENT_PORT="MYKONOS" LAST_PORT="MYKONOS" LAST_PORT_TIME="2012-04-18T17:12:00" DESTINATION="DELOS MYKONOS" ETA="1900-01-01T00:00:00" LENGTH="43" WIDTH="10" DRAUGHT="25"/>
</pos>
					

CSV sample response [simple]

MMSI, LAT, LON, SPEED, COURSE, STATUS, TIMESTAMP
311029000,37.48617,24.37233,132,40,0,2012-04-18T21:09:00
240521000,37.46272,25.32613,0,71,0,2012-04-18T21:09:00
237485000,37.50118,25.23968,177,73,0,2012-04-18T21:08:00
					

CSV sample response [extended]

MMSI, LAT, LON, SPEED, COURSE, TIMESTAMP, SHIPNAME, SHIPTYPE, IMO, CALLSIGN, FLAG, CURRENT_PORT, LAST_PORT, LAST_PORT_TIME, DESTINATION, ETA, LENGTH, WIDTH, DRAUGHT, GRT, DWT, YEAR_BUILT
237594800,37.44848,25.32671,0,177,2012-04-18T21:10:00,ORCA,65,0,SY2714,GR,MYKONOS, MYKONOS,2012-04-18T17:12:00,DELOS MYKONOS,1900-01-01T00:00:00,43,10,25
240521000,37.46272,25.32613,0,71,2012-04-18T21:09:00,THEOLOGOS P.,60,9223150,SZNB,GR,MYKONOS, RAFINA,2012-04-18T15:09:00,AND-THN-MYK,2012-04-18T22:30:00,118,22,48,4935,3227,2000
237106400,37.46368,25.32642,0,0,2012-04-18T21:10:00,AGIA ELENI,31,0,SV4137,GR,MYKONOS, MYKONOS,2012-04-18T17:12:00,MYKONOS,2012-04-30T11:00:00,30,7,0
					

Simplified JSON sample response [simple]

[["237485000","37.50998","25.2748","176","71","0","2012-04-18T21:15:00"],
["237106400","37.46369","25.32643","2","9","0","2012-04-18T21:15:00"],
["353718000","37.43699","24.94052","0","93","5","2012-04-18T21:15:00"]]
					

Simplified JSON sample response [extended]

[["240391000","37.46368","25.32655","1","50","2012-04-18T21:10:00","MEGALOCHARI VII","52","9039949","SY 6064",
"GR","MYKONOS","MYKONOS","2012-04-18T17:13:00","MIKONOS","1900-01-01T00:00:00","27","9","48","265","183","1991"],
["237106400","37.46368","25.32642","0","0","2012-04-18T21:10:00","AGIA ELENI","31","0","SV4137",
"GR","MYKONOS","MYKONOS","2012-04-18T17:12:00","MYKONOS","2012-04-30T11:00:00","30","7","0"],
["311029000","37.48617","24.37233","132","40","2012-04-18T21:09:00","GREEN MAGNIFIC","79","9011492","C6VY3",
"BS","","SKAGEN","2012-02-21T18:34:00","ODESA","2012-04-21T20:00:00","136","16","75","5103","6116","1992"]]
					
Back to top

Service info

Endpoint URL: http://services.marinetraffic.com/api/exportvessel/

Service ID: 25

Returns information about current vessel status.
Note: SPEED returned in (knots x10) and TIMESTAMP in UTC.

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
timespan no int 2 The maximum age, in minutes, of the returned positions. Maximum value is 60.
msgtype no string simple If used with the value extended, the response includes scheduled static and voyage related vessel data report (AIS Message 5). In this case your request frequency might be limited (depending on your service terms).
If omitted, the returned records include only position reports (AIS Messages 1, 2, 3/ 18, 19).
protocol no string xml Response type. Use one of the following: xml, csv, json
mmsi yes (only use one of the two) int   The Maritime Mobile Service Identity (MMSI) of the vessel you wish to track.
imo int   The International Maritime Organization (IMO) number of the vessel you wish to track.

Usage example

http://services.marinetraffic.com/api/exportvessel/26936354bb2759f0018afb8d688374be649b78dc/timespan:20/mmsi:310627000

XML sample response [simple]

<pos>
<row MMSI="240391000" LAT="37.463669" LON="25.32655" SPEED="0" COURSE="146" STATUS="0" TIMESTAMP="2012-04-18T21:02:00"/>
</pos>
					

XML sample response [extended]

<pos>
<row MMSI="205623000" LAT="37.24538" LON="25.590981" SPEED="65" COURSE="288" TIMESTAMP="2012-04-18T19:21:00" SHIPNAME="MALACHITE" SHIPTYPE="70" IMO="9549645" CALLSIGN="ONHL" FLAG="BE" LAST_PORT="PORT SAID" LAST_PORT_TIME="2012-04-16T18:26:00" DESTINATION="DERINCE" ETA="2012-04-20T14:00:00" LENGTH="90" WIDTH="14" DRAUGHT="50" GRT="3517" DWT="5000" YEAR_BUILT="2012"/>
</pos>
					

CSV sample response [simple]

MMSI, LAT, LON, SPEED, COURSE, STATUS, TIMESTAMP
311029000,37.48617,24.37233,132,40,0,2012-04-18T21:09:00
					

CSV sample response [extended]

                
MMSI, LAT, LON, SPEED, COURSE, TIMESTAMP, SHIPNAME, SHIPTYPE, IMO, CALLSIGN, FLAG, CURRENT_PORT, LAST_PORT, LAST_PORT_TIME, DESTINATION, ETA, LENGTH, WIDTH, DRAUGHT, GRT, DWT, YEAR_BUILT
237594800,37.44848,25.32671,0,177,2012-04-18T21:10:00,ORCA,65,0,SY2714,GR,MYKONOS, MYKONOS,2012-04-18T17:12:00,DELOS MYKONOS,1900-01-01T00:00:00,43,10,25
					

Simplified JSON sample response [simple]

                
[["237485000","37.50998","25.2748","176","71","0","2012-04-18T21:15:00"]]
					

Simplified JSON sample response [extended]

                
[["240391000","37.46368","25.32655","1","50","2012-04-18T21:10:00","MEGALOCHARI VII","52","9039949","SY 6064",
"GR","MYKONOS","MYKONOS","2012-04-18T17:13:00","MIKONOS","1900-01-01T00:00:00","27","9","48","265","183","1991"]]
					

Service info

Endpoint URL: http://services.marinetraffic.com/api/portcalls/

Service ID: 43

Returns information about latest port calls.
MOVE_TYPE values: 1=Departure, 0=Arrival

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
timespan no int 2 The maximum age, in minutes, of the returned port calls.
protocol no string xml Response type. Use one of the following: xml, csv, json
portid no int   The MarineTraffic ID of the port you wish to monitor (found on the URL of the respective Port page).
mmsi no (do not use both) int   The Maritime Mobile Service Identity (MMSI) of the vessel you wish to track.
imo int   The International Maritime Organization (IMO) number of the vessel you wish to track.
movetype no int   Use 0 to only receive arrivals or 1 to only receive departures. If not used, the response will include both.

Usage example

http://services.marinetraffic.com/api/portcalls/26936354bb2759f0018afb8d688374be649b78dc/portid:1/timespan:20

XML sample response

<PORTCALLS>
<PORTCALL MMSI="372445000" SHIPNAME="HANJIN TIANJIN" TIMESTAMP_LT="2013-09-27T23:24:00" TIMESTAMP_UTC="2013-09-27T20:24:00" MOVE_TYPE="1" PORT_ID="1" PORT_NAME="PIRAEUS"/>
<PORTCALL MMSI="241188000" SHIPNAME="VERNICOS MERMAID" TIMESTAMP_LT="2013-09-27T23:21:00" TIMESTAMP_UTC="2013-09-27T20:21:00" MOVE_TYPE="0" PORT_ID="1" PORT_NAME="PIRAEUS"/>
<PORTCALL MMSI="215896000" SHIPNAME="BAVARIA" TIMESTAMP_LT="2013-09-27T23:19:00" TIMESTAMP_UTC="2013-09-27T20:19:00" MOVE_TYPE="0" PORT_ID="1" PORT_NAME="PIRAEUS"/>
<PORTCALL MMSI="241188000" SHIPNAME="VERNICOS MERMAID" TIMESTAMP_LT="2013-09-27T23:11:00" TIMESTAMP_UTC="2013-09-27T20:11:00" MOVE_TYPE="1" PORT_ID="1" PORT_NAME="PIRAEUS"/>
</PORTCALLS>
					

CSV sample response

MMSI, SHIPNAME, TIMESTAMP_LT, TIMESTAMP_UTC, MOVE_TYPE, PORT_ID, PORT_NAME
372445000,HANJIN TIANJIN,2013-09-27T23:24:00,2013-09-27T20:24:00,1,1,PIRAEUS
241188000,VERNICOS MERMAID,2013-09-27T23:21:00,2013-09-27T20:21:00,0,1,PIRAEUS
215896000,BAVARIA,2013-09-27T23:19:00,2013-09-27T20:19:00,0,1,PIRAEUS
241188000,VERNICOS MERMAID,2013-09-27T23:11:00,2013-09-27T20:11:00,1,1,PIRAEUS
					

Simplified JSON sample response

[["372445000","HANJIN TIANJIN","2013-09-27T23:24:00","2013-09-27T20:24:00","1","1","PIRAEUS"],
["241188000","VERNICOS MERMAID","2013-09-27T23:21:00","2013-09-27T20:21:00","0","1","PIRAEUS"],
["215896000","BAVARIA","2013-09-27T23:19:00","2013-09-27T20:19:00","0","1","PIRAEUS"],
["241188000","VERNICOS MERMAID","2013-09-27T23:11:00","2013-09-27T20:11:00","1","1","PIRAEUS"]]
					
Back to top

Service info

Endpoint URL: http://services.marinetraffic.com/api/exportvesseltrack/

Service ID: 29

Returns historical data for vessel's track.
Note: SPEED returned in (knots x10) and TIMESTAMP in UTC.

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
days yes int   The number of days, starting from the time of request and going backwards, for which the response should look for position data. Maximum value is 90 (days).
mmsi yes (only use one of the two) int   The Maritime Mobile Service Identity (MMSI) of the vessel you wish to track.
imo int   The International Maritime Organization (IMO) number of the vessel you wish to track.
protocol no string xml Response type. Use one of the following: xml, csv, json

Usage example

http://services.marinetraffic.com/api/exportvesseltrack/26936354bb2759f0018afb8d688374be649b78dc/days:7/mmsi:219291000

XML sample response

<VESSELTRACK>
<POSITION MMSI="219291000" STATUS="0" SPEED="146" LON="-11.904260" LAT="34.485870" COURSE="189" HEADING="190" TIMESTAMP="2013-07-12T10:06:00"/>
<POSITION MMSI="219291000" STATUS="0" SPEED="146" LON="-11.901590" LAT="34.498680" COURSE="190" HEADING="191" TIMESTAMP="2013-07-12T10:02:00"/>
<POSITION MMSI="219291000" STATUS="0" SPEED="146" LON="-11.895480" LAT="34.526649" COURSE="190" HEADING="191" TIMESTAMP="2013-07-12T09:55:00"/>
<POSITION MMSI="219291000" STATUS="0" SPEED="146" LON="-11.893820" LAT="34.534679" COURSE="189" HEADING="191" TIMESTAMP="2013-07-12T09:52:00"/>
<POSITION MMSI="219291000" STATUS="0" SPEED="142" LON="-11.883230" LAT="34.588619" COURSE="190" HEADING="191" TIMESTAMP="2013-07-12T09:43:00"/>
</VESSELTRACK>
                    

CSV sample response

MMSI, STATUS, SPEED, LON, LAT, COURSE, HEADING, TIMESTAMP
219291000,0,146,-11.904260,34.485870,189,190,2013-07-12T10:06:00
219291000,0,146,-11.901590,34.498680,190,191,2013-07-12T10:02:00
219291000,0,146,-11.895480,34.526649,190,191,2013-07-12T09:55:00
219291000,0,146,-11.893820,34.534679,189,191,2013-07-12T09:52:00
219291000,0,142,-11.883230,34.588619,190,191,2013-07-12T09:43:00
                    


Back to top

Service info

Endpoint URL: http://services.marinetraffic.com/api/exportvesselphoto/

Service ID: 26

Returns the best rated photo of the specified vessel
Response format: XML.

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
vessel_id yes int   The Maritime Mobile Service Identity (MMSI) or the IMO number of the vessel.

Usage example

http://services.marinetraffic.com/api/exportvesselphoto/26936354bb2759f0018afb8d688374be649b78dc/vessel_id:310627000

Sample response

                
<photo>
<PHOTOURL URL="http://services.marinetraffic.com/photos/show/864354" />
</photo>
        			


Back to top

Service info

Endpoint URL: http://services.marinetraffic.com/api/getfleet/

Service ID: 51

Returns a list of all vessels in fleet

Can optionally have msgtype, which can be XML (default), CSV or JSON.

Response includes fields MMSI, SHIPNAME, ACTIVE.

ACTIVE can have values of 0:inactive, 1:terrestrial, 2:satellite.

On XML output the header includes counts for all types of vessels.

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
protocol no string xml Response type. Use one of the following: xml, csv, json

Usage example

http://services.marinetraffic.com/api/getfleet/26936354bb2759f0018afb8d688374be649b78dc/protocol:xml

XML sample response

<FLEET INACTIVE="2" TERRESTRIAL="4" SATELLITE="1">
<VESSEL MMSI="306764000" SHIPNAME="MARONI" ACTIVE="2" />
<VESSEL MMSI="413358910" SHIPNAME="XIN JIN FENG" ACTIVE="1" />
<VESSEL MMSI="370515000" SHIPNAME="ROYAL FLOS" ACTIVE="1" />
<VESSEL MMSI="366780000" SHIPNAME="UNDAUNTED" ACTIVE="1" />
<VESSEL MMSI="30000" SHIPNAME="" ACTIVE="0" />
<VESSEL MMSI="366780001" SHIPNAME="" ACTIVE="0" />
<VESSEL MMSI="636013354" SHIPNAME="LEADER" ACTIVE="1" />
</FLEET>
                    

CSV sample response

MMSI, SHIPNAME, ACTIVE
306764000,MARONI,2
413358910,XIN JIN FENG,1
370515000,ROYAL FLOS,1
366780000,UNDAUNTED,1
30000,,0
366780001,,0
636013354,LEADER,1
                    

Simplified JSON sample response

[["306764000","MARONI","2"],
["413358910","XIN JIN FENG","1"],
["370515000","ROYAL FLOS","1"],
["366780000","UNDAUNTED","1"]
["30000","","0"]
["366780001","","0"]
["636013354","LEADER","1"]]
                    


Back to top

Service info

Endpoint URL: http://services.marinetraffic.com/api/setfleet/

Service ID: 50

Creates-updates-deletes items on user fleet.

Call requires API Key. Also requires MMSI or IMO and either the active or delete parameter.

The active parameter can have values of 0,1,2 which correspond to the three states of the fleet items (inactive, active and satellite respectively).

The delete parameter must have a value of 1 and it removes the entry from the fleet.

If both MMSI and IMO are passed, the MMSI takes precedence and the IMO will be ignored.

Response is always an XML structure indicating success or failure with failure description message.

Parameters

Parameter name Required? Type Default value Description
[no name] yes string   API key: 40-character hexadecimal number
mmsi yes int   The Maritime Mobile Service Identity (MMSI) of the vessel you wish to handle.
imo yes
(if no mmsi has been provided)
int   The International Maritime Organization (IMO) number of the vessel you wish to handle.
active no int   Possible values are: 0 to set to inactive, 1 to activate and 2 to activate satellite tracking
delete no int   Set this parameter to 1 to delete a vessel from your fleet.

Usage example

http://services.marinetraffic.com/api/setfleet/26936354bb2759f0018afb8d688374be649b78dc/mmsi:1234567890/active:0
Deactivates vessel.

http://services.marinetraffic.com/api/setfleet/26936354bb2759f0018afb8d688374be649b78dc/mmsi:1234567890/active:1
Activates terrestrial tracking for vessel.

http://services.marinetraffic.com/api/setfleet/26936354bb2759f0018afb8d688374be649b78dc/mmsi:1234567890/active:2
Activates satellite tracking for vessel.

http://services.marinetraffic.com/api/setfleet/26936354bb2759f0018afb8d688374be649b78dc/mmsi:1234567890/delete:1
Removes vessel from fleet.

Sample responses

<RESPONSE>
<STATUS>
<SUCCESS CODE="7" DESCRIPTION="FLEET ITEM UPDATED" />
</STATUS>
</RESPONSE>
                    
<RESPONSE>
<STATUS>
<ERROR CODE="21" DESCRIPTION="VESSEL NOT FOUND IN FLEET" />
</STATUS>
</RESPONSE>
                    


Back to top

API Service Request