Matching AIS destination values to port UN/Locodes
Vessels report their destination port in AIS static voyage messages (message type 5 for class A and message type 24 for class B AIS) as free text values. However there is no standard for these values and they can take many variations on port names, sometimes including locodes, country codes or local variations of port names among other values.
Each port does however have a recognised international code which is the United Nations Code for Trade and Transport Locations( UN/LOCODE) from the database defined here
When the AIS reported destination is successfully matched, the following fields will be added to the standard Vessels API response
Matched port example:
Vessels API has a port matching algorithm that takes the destination value and tries to match it a unlocode for the destination port. As shown example below the different port name entered by captain for port KR PUS. Attached the results snapshot from our database below for different destination labels entered. Please note AIS Destination value is entered by captain here, Unlocode is standard name of port and Port_name is the mapped port after matching the destination.