The first three digits of a vessel's MMSI number are known as the maritime identification digits (MID).

In the Messages API we append flag and flag_short_code as additional meta data to each message based on the MID and the Country Assignments table below:

"flag": "USA"
"flag_short_code": "US"

The Vessels API uses a combination of the MID and various ship registries to determine the correct vessel flag :

"flag": "US"

Regional Assignments

The first digit of the MID is used as a regional structure:

2 - Europe
3 - North America & the Caribbean Sea
4 - Asia
5 - Pacific and Eastern Indian Oceans and Southeast Asia
6 - Africa and the Atlantic and Western Indian Oceans
7 - South America

Country Assignments

Country Flag - Short Code -  MID 

Europe
Albania - AL - 201
Andorra - AD - 202
Austria - AT - 203
Azores - PT - 204
Belgium - BE - 205
Belarus - BY - 206
Bulgaria - BG - 207
Vatican City State - VA - 208
Cyprus - CY - 209
Cyprus - CY - 210
Germany - DE - 211
Cyprus - CY - 212
Georgia - GE - 213
Moldova - MD - 214
Malta - MT - 215
Armenia - AM - 216
Germany - DE - 218
Denmark - DK - 219
Denmark - DK - 220
Spain - ES - 224
Spain - ES - 225
France - FR - 226
France - FR - 227
Malta - MT - 229
Finland - FI - 230
Faroe Islands - FO - 231
United Kingdom - GB - 232
United Kingdom - GB - 233
United Kingdom - GB - 234
United Kingdom - GB - 235
Gibraltar - GI - 236
Greece - GR - 237
Croatia - HR - 238
Greece - GR - 239
Greece - GR - 240
Greece - GR - 241
Morocco - MA - 242
Hungary - HU - 243
Netherlands - NL - 244
Netherlands - NL - 245
Netherlands - NL - 246
Italy - IT - 247
Malta - MT - 248
Malta - MT - 249
Ireland - IE - 250
Iceland - IS - 251
Liechtenstein - LI - 252
Luxembourg - LU - 253
Monaco - MC - 254
Madeira - PT - 255
Malta - MT - 256
Norway - NO - 257
Norway - NO - 258
Norway - NO - 259
Poland - PL - 261
Montenegro - ME - 262
Portugal - PT - 263
Romania - RO - 264
Sweden - SE - 265
Sweden - SE - 266
Slovak Republic - SK - 267
San Marino - SM - 268
Switzerland - CH - 269
Czech Republic - CZ - 270
Turkey - TR - 271
Ukraine - UA - 272
Russia - RU - 273
Macedonia - MK - 274
Latvia - LV - 275
Estonia - EE - 276
Lithuania - LT - 277
Slovenia - SI - 278
Serbia - RS - 279

North America & the Caribbean Sea
Anguilla - AI - 301
Alaska - US - 303
Antigua and Barbuda - AG - 304
Antigua and Barbuda - AG - 305
Antilles - CW - 306
Aruba - AW - 307
Bahamas - BS - 308
Bahamas - BS - 309
Bermuda - BM - 310
Bahamas - BS - 311
Belize - BZ - 312
Barbados - BB - 314
Canada - CA - 316
Cayman Islands - KY - 319
Costa Rica - CR - 321
Cuba - CU - 323
Dominica - DM - 325
Dominican Republic - DO - 327
Guadeloupe - GP - 329
Grenada - GD - 330
Greenland - GL - 331
Guatemala - GT - 332
Honduras - HN - 335
Haiti - HT - 336
United States of America - US - 338
Jamaica - JM - 339
Saint Kitts and Nevis - KN - 341
Saint Lucia - LC - 343
Mexico - MX - 345
Martinique - MQ - 347
Montserrat - MS - 348
Nicaragua - NI - 350
Panama - PA - 351
Panama - PA - 352
Panama - PA - 353
Panama - PA - 354
Puerto Rico - PR - 358
El Salvador - SV - 359
Saint Pierre and Miquelon - PM - 361
Trinidad and Tobago - TT - 362
Turks and Caicos Islands - TC - 364
United States of America - US - 366
United States of America - US - 367
United States of America - US - 368
United States of America - US - 369
Panama - PA - 370
Panama - PA - 371
Panama - PA - 372
Panama - PA - 373
Saint Vincent and the Grenadines - VC - 375
Saint Vincent and the Grenadines - VC - 376
Saint Vincent and the Grenadines - VC - 377
British Virgin Islands - VG - 378
United States Virgin Islands - VI - 379

Asia
Afghanistan - AF - 401
Saudi Arabia - SA - 403
Bangladesh - BD - 405
Bahrain - BH - 408
Bhutan - BT - 410
China - CN - 412
China - CN - 413
China - CN - 414
Taiwan - TW - 416
Sri Lanka - LK - 417
India - IN - 419
Iran - IR - 422
Azerbaijan - AZ - 423
Iraq - IQ - 425
Israel - IL - 428
Japan - JP - 431
Japan - JP - 432
Turkmenistan - TM - 434
Kazakhstan - KZ - 436
Uzbekistan - UZ - 437
Jordan - JO - 438
Korea - KR - 440
Korea - KR - 441
State of Palestine - PS - 443
Democratic People's Republic of Korea - KP - 445
Kuwait - KW - 447
Lebanon - LB - 450
Kyrgyz Republic - KG - 451
Macao - MO - 453
Maldives - MV - 455
Mongolia - MN - 457
Nepal - NP - 459
Oman - OM - 461
Pakistan - PK - 463
Qatar (State of) - QA - 466
Syrian Arab Republic - SY - 468
United Arab Emirates - AE - 470
Tajikistan - TJ - 472
Yemen - YE - 473
Yemen - YE - 475
Hong Kong - HK - 477
Bosnia and Herzegovina - BA - 478

Pacific and Eastern Indian Oceans and Southeast Asia
Adelie Land - FR - 501
Australia - AU - 503
Myanmar - MM - 506
Brunei Darussalam - BN - 508
Micronesia - FM - 510
Palau - PW - 511
New Zealand - NZ - 512
Cambodia - KH - 514
Cambodia - KH - 515
Christmas Island - CX - 516
Cook Islands - CK - 518
Fiji - FJ - 520
Cocos (Keeling) Islands - CC - 523
Indonesia - ID - 525
Kiribati - KI - 529
Lao People's Democratic Republic - LA - 531
Malaysia - MY - 533
Northern Mariana Islands - MP - 536
Marshall Islands - MH - 538
New Caledonia - NC - 540
Niue - NU - 542
Nauru - NR - 544
French Polynesia - PF - 546
Philippines - PH - 548
Papua New Guinea - PG - 553
Pitcairn Island - PN - 555
Solomon Islands - SB - 557
American Samoa - AS - 559
Samoa - WS - 561
Singapore - SG - 563
Singapore - SG - 564
Singapore - SG - 565
Singapore - SG - 566
Thailand - TH - 567
Tonga - TO - 570
Tuvalu - TV - 572
Viet Nam - VN - 574
Vanuatu - VU - 576
Vanuatu - VU - 577
Wallis and Futuna Islands - WF - 578

Africa and the Atlantic and Western Indian Oceans
South Africa - ZA - 601
Angola - AO - 603
Algeria - DZ - 605
Saint Paul and Amsterdam Islands - FR - 607
Ascension Island - GB - 608
Burundi - BI - 609
Benin - BJ - 610
Botswana - BW - 611
Djibouti - DJ - 621
Cameroon - CM - 613
Congo - CG - 615
Comoros - KM - 616
Cabo Verde - CV - 617
Crozet Archipelago - FR - 618
Ivory Coast - CI - 619
Comoros - KM - 620
Egypt - EG - 622
Ethiopia - ET - 624
Eritrea - ER - 625
Gabonese Republic - GA - 626
Ghana - GH - 627
Gambia - GM - 629
Guinea-Bissau - GW - 630
Equatorial Guinea - GQ - 631
Guinea - GN - 632
Burkina Faso - BF - 633
Kenya - KE - 634
Kerguelen Islands - FR - 635
Liberia - LR - 636
Liberia - LR - 637
South Sudan - SS - 638
Libya - LY - 642
Lesotho - LS - 644
Mauritius - MU - 645
Madagascar - MG - 647
Mali - ML - 649
Mozambique - MZ - 650
Mauritania - MR - 654
Malawi - MW - 655
Nigeria - NG - 656
Namibia - NA - 659
Reunion - RE - 660
Rwanda - RW - 661
Sudan - SD - 662
Senegal - SN - 663
Seychelles - SC - 664
Saint Helena - SH - 665
Somali Democratic Republic - SO - 666
Sierra Leone - SL - 667
Sao Tome and Principe - ST - 668
Swaziland - SZ - 669
Chad - TD - 670
Togolese Republic - TG - 671
Tunisian Republic - TN - 672
Tanzania - TZ - 674
Uganda - UG - 675
Democratic Republic of the Congo - CD - 676
Tanzania - TZ - 677
Zambia - ZM - 678
Zimbabwe - ZW - 679

South America
Argentine Republic - AR - 701
Brazil - BR - 710
Bolivia - BO - 720
Chile - CL - 725
Colombia - CO - 730
Ecuador - EC - 735
Falkland Islands - FK - 740
Guiana - GF - 745
Guyana - GY - 750
Paraguay - PY - 755
Peru - PE - 760
Suriname - SR - 765
Uruguay - UY - 770
Venezuela - VE - 775

Did this answer your question?