13

The automatic identification system (AIS) is an automatic tracking system that uses transponders on ships to locate them. There are also databases that provide information about the ship — size, type, owner, registration, etc.

I need real-time data, preferably for the River Thames or the English Channel. Failing that, Singapore, Hong Kong or any major European (preferably German) river or port. Does anyone know of a free API to access any of this data?

Patrick Hoefler
  • 5,790
  • 4
  • 31
  • 47

5 Answers5

8

The Norwegian Coastal Administration have an open AIS stream available, licensed under the Norwegian Licence for Open Government Data (NLOD) 2.0.

It's a TCP endpoint that you can access with a tool such as nc and pipe through a decoder like gpsdecode:

nc 153.44.253.27 5631|gpsdecode                                                                                                                                                                                                                                                                                                                                                    130 ↵
{"class":"AIS","device":"stdin","type":3,"repeat":0,"mmsi":258201500,"scaled":true,"status":5,"status_text":"Moored","turn":"nan","speed":0.0,"accuracy":true,"lon":16.548040,"lat":68.798587,"course":360.0,"heading":511,"second":48,"maneuver":0,"raim":true,"radio":40442}
{"class":"AIS","device":"stdin","type":1,"repeat":0,"mmsi":257078370,"scaled":true,"status":0,"status_text":"Under way using engine","turn":"fastright","speed":3.8,"accuracy":true,"lon":6.019022,"lat":60.055675,"course":137.0,"heading":166,"second":47,"maneuver":0,"raim":false,"radio":23112}
ryanjdillon
  • 103
  • 3
Robin Moffatt
  • 181
  • 1
  • 4
6

Live AIS data for most of the globe is available from https://aisstream.io for free.

The catch is the data is delivered via WebSocket and not a raw tcp connection. There are a few examples in their github of using the api with various languages such as javascript and python.

Sara C
  • 76
  • 1
  • 2
5

AIS data for the USA is available from https://marinecadastre.gov/ais/.

I don't know about an API, but the site offers a variety of Arc Python-based tools that may lead you to a solution.

Stu Smith
  • 196
  • 1
  • 1
    Thanks and upvote.Whiel it's not live, so no use to me, it could be of great use to anyone who wants a mouton of historical data. "The data available below contain records for U.S. coastal waters for calendar years 2009 through 2017. Records are filtered to one minute" *BUT* "Ship name and call sign fields have been removed, and the MMSI (Maritime Mobile Service Identity) field has been encrypted for the 2010 through 2014 data" Still very useful, though – Mawg says reinstate Monica Jun 02 '19 at 11:19
4

I cannot find anything free. if you want it enough, then you can join AIS hub, BUT they require that you provide a feed before you can share the feeds of all other members.

The cheapest AIS receiver that I can find costs about $60, plus antenna.

If it's worth it, only you can decide.

1

To add to the list of sources mentioned above:

Denmark - https://dma.dk/safety-at-sea/navigational-information/ais-data (https://web.ais.dk/aisdata/)

Finland - https://www.digitraffic.fi/meriliikenne/

  • Thanks for that. The Danish one looks to have an annual fee of approx $200. I am not usre about the Finnish one, although it does not seem to require an API key. The APIs listed on https://www.digitraffic.fi/meriliikenne/#restjson-rajapinnat are in English, and I can feed the rest of the page to Google Translate if required. – Mawg says reinstate Monica Dec 11 '23 at 14:23
  • 1
    Ah fair point on the danish one not being free for realtime applications, I've only been using the ftp to grab the historical (couple of days delayed) data from the ftp. – Graham More Dec 12 '23 at 15:35
  • 2
    Sorry just adding another comment regarding Norwegian source above, the https://kystdatahuset.no/ws/swagger/index.html page is useful for exploring the available endpoints. (My rep isn't high enough to comment on that answer :/) – Graham More Dec 12 '23 at 15:38