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?


5 Answers 5


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.


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 5631|gpsdecode                                                                                                                                                                                                                                                                                                                                                    130 ↵
{"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}
  • 1
    Thanks. This looks useful. Plus, it takes me back to 4 or 5 very pleasant years in Hvalstad :-)
    – Mawg
    Commented Feb 25, 2021 at 11:56
  • Do you, by any chance, have a URL for the API documents, in English? My Norwegian has become rusty in 20 years away :-/
    – Mawg
    Commented Feb 25, 2021 at 12:00
  • 1
    Maybe Google Translate could help? IIUC it's just standard AIS data. I used gpsd.gitlab.io/gpsd/AIVDM.html#_ais_payload_interpretation to interpret it Commented Feb 25, 2021 at 12:05
  • 1
    I've edited my question to include an example Commented Feb 25, 2021 at 13:20
  • 1
    If Google Translate is correct, it looks like it just returns data for Norwegian coastal stations, is that correct?
    – jjmerelo
    Commented May 3, 2023 at 12:19

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.

  • 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
    Commented Jun 2, 2019 at 11:19

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.


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 digitraffic.fi/meriliikenne/#restjson-rajapinnat are in English, and I can feed the rest of the page to Google Translate if required.
    – Mawg
    Commented Dec 11, 2023 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. Commented Dec 12, 2023 at 15:35
  • 3
    Sorry just adding another comment regarding Norwegian source above, the 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 :/) Commented Dec 12, 2023 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.