openapi: 3.0.2
info:
title: MarineTraffic Events AIS API Search Vessel API
version: 1.0.0
description: Port calls, berth calls, and event timelines for single vessels and entire ports — surfacing every arrival, departure, and berth touch detected by the global AIS network.
contact:
name: MarineTraffic
url: https://www.marinetraffic.com/
servers:
- url: https://services.marinetraffic.com/api
tags:
- name: Search Vessel
paths:
/shipsearch/{api_key}:
get:
tags:
- Search Vessel
summary: Search Vessel by Identifier
description: "Search for a vessel by unique identifier. Notes
\n - The frequency of allowed API calls is specific to your API key and is detailed in your contract as a number of successful calls per time period. For example “2 calls per minute”. Regardless of this agreed limit, each API key is technically restricted to a maximum of 100 total (including successful and unsuccessful) requests per minute to ensure system stability.
\n
"
operationId: shipsearch
parameters:
- $ref: '#/components/parameters/api_key'
- $ref: '#/components/parameters/shipid_VD03'
- $ref: '#/components/parameters/mmsi_VD03'
- $ref: '#/components/parameters/imo_VD03'
- $ref: '#/components/parameters/shiptype_VD03'
- $ref: '#/components/parameters/type_name_id_VD03'
- $ref: '#/components/parameters/protocol'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/200_vd03_default'
application/xml:
schema:
$ref: '#/components/schemas/200_vd03_default'
examples:
Default:
summary: Simple
value: "\n\n \n"
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/400_vd03_missing_search_identifier'
application/xml:
schema:
$ref: '#/components/schemas/400_vd03_missing_search_identifier'
examples:
Missing search identifier:
summary: Missing search identifier
value: "\n\n \n \n \n"
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/429_too_many_requests'
application/xml:
schema:
$ref: '#/components/schemas/429_too_many_requests'
examples:
Area out of bound:
summary: Too Many Requests
value: "\n\n \n \n \n"
'/shipsearch/{api_key} ':
get:
tags:
- Search Vessel
summary: Search Vessel by Name
description: "Search for vessels by vessel name. Notes In case of multiple results:\n \n - the first 100 matches will be fetched
\n - exact matches are always first on the returned list
\n
\n \n \n - Only active vessels are returned
\n - The frequency of allowed API calls is specific to your API key and is detailed in your contract as a number of successful calls per time period. For example “2 calls per minute”. Regardless of this agreed limit, each API key is technically restricted to a maximum of 100 total (including successful and unsuccessful) requests per minute to ensure system stability.
\n
"
operationId: shipsearch_
parameters:
- $ref: '#/components/parameters/api_key'
- $ref: '#/components/parameters/shipname_VD03'
- $ref: '#/components/parameters/shiptype_VD03'
- $ref: '#/components/parameters/type_name_id_VD03'
- $ref: '#/components/parameters/protocol'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/200_vd03_default'
application/xml:
schema:
$ref: '#/components/schemas/200_vd03_default'
examples:
Default:
summary: Simple
value: "\n \n \n \n \n \n \n \n \n "
'400':
description: Bad Request
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/400_vd03_invalid_search_string_length'
- $ref: '#/components/schemas/400_vd03_missing_search_term'
application/xml:
schema:
oneOf:
- $ref: '#/components/schemas/400_vd03_invalid_search_string_length'
- $ref: '#/components/schemas/400_vd03_missing_search_term'
examples:
Invalid search string length:
summary: Invalid search string length
value: "\n\n \n \n \n"
Missing search term:
summary: Missing search term
value: "\n\n \n \n \n"
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/429_too_many_requests'
application/xml:
schema:
$ref: '#/components/schemas/429_too_many_requests'
examples:
Area out of bound:
summary: Too Many Requests
value: "\n\n \n \n \n"
components:
parameters:
shipid_VD03:
name: shipid
in: query
description: A uniquely assigned ID by MarineTraffic for the subject vessel You can instead use mmsi or imo
required: true
schema:
type: integer
shipname_VD03:
name: shipname
in: query
description: The vessel name. The results will contain all vessels whose name is like the given words
required: true
schema:
type: string
type_name_id_VD03:
name: type_name_id
in: query
description: 'Data filter: AIS Shiptype Find more information here'
required: false
schema:
type: integer
shiptype_VD03:
name: shiptype
in: query
description: "Filter data by vessel type: \n - 2: Fishing
\n - 4: High Speed Craf
\n - 6: Passenger
\n - 7: Cargo
\n - 8: Tanker
"
required: false
schema:
type: integer
imo_VD03:
name: imo
in: query
description: The International Maritime Organization (IMO) number of the vessel you wish to track NOTE: Using IMO may potentially return multiple records as multiple vessels might have transponded the same IMO
required: false
schema:
type: integer
mmsi_VD03:
name: mmsi
in: query
description: The Maritime Mobile Service Identity (MMSI) of the vessel you wish to track NOTE: Using MMSI may potentially return multiple records as multiple vessels might have transponded the same MMSI
required: false
schema:
type: integer
api_key:
name: api_key
in: path
description: 'API key: 40-character hexadecimal number'
required: true
schema:
type: string
protocol:
name: protocol
in: query
description: "Response type. Use one of the following: \n - xml
\n - csv
\n - json
\n - jsono
"
required: false
schema:
type: string
default: xml
schemas:
400_vd03_missing_search_identifier:
title: Missing search identifier
type: object
properties:
errors:
type: array
items:
type: object
properties:
code:
type: string
description: Error code
detail:
type: string
description: Error message
example:
errors:
- code: '54'
detail: NO SEARCH TERM SUPPLIED
400_vd03_missing_search_term:
title: Missing search term
type: object
properties:
errors:
type: array
items:
type: object
properties:
code:
type: string
description: Error code
detail:
type: string
description: Error message
example:
errors:
- code: '54'
detail: NO SEARCH TERM SUPPLIED
429_too_many_requests:
title: Too many requests
type: object
properties:
errors:
type: array
items:
type: object
properties:
code:
type: string
description: Error code
detail:
type: string
description: Error message
example:
errors:
- code: 1r
detail: TOO MANY REQUESTS
200_vd03_default:
title: Simple
type: array
items:
type: object
properties:
SHIPNAME:
type: string
description: The Shipname of the subject vessel
MMSI:
type: string
description: Maritime Mobile Service Identity - a nine-digit number sent in digital form over a radio frequency that identifies the vessel's transmitter station
IMO:
type: string
description: International Maritime Organisation number - a seven-digit number that uniquely identifies vessels
SHIP_ID:
type: string
description: A uniquely assigned ID by MarineTraffic for the subject vessel
CALLSIGN:
type: string
description: A uniquely designated identifier for the vessel's transmitter station
TYPE_NAME:
type: string
description: The Type of the subject vessel
DWT:
type: string
description: Deadweight - a measure (in metric tons) of how much weight a vessel can safely carry (excluding the vessel's own weight)
FLAG:
type: string
description: The flag of the subject vessel according to AIS transmissions
COUNTRY:
type: string
description: The country of the subject vessel according to AIS transmissions
YEAR_BUILT:
type: string
description: The year that the subject vessel was built
MT_URL:
type: string
description: URL to the Details page of the subject vessel at MarineTraffic
example:
- SHIPNAME: THE QUEEN JACQUELINE
MMSI: '244740452'
IMO: '0'
SHIP_ID: '639'
CALLSIGN: PE6545
TYPE_NAME: Inland, Ferry
DWT: ''
FLAG: NL
COUNTRY: Netherlands
YEAR_BUILT: ''
MT_URL: http://www.marinetraffic.com/en/ais/details/ships/shipid:639/mmsi:244740452/vessel:639
- SHIPNAME: BACHATA QUEEN
MMSI: '229540000'
IMO: '0'
SHIP_ID: '2771'
CALLSIGN: 9HB3419
TYPE_NAME: Pleasure Craft
DWT: ''
FLAG: MT
COUNTRY: Malta
YEAR_BUILT: ''
MT_URL: http://www.marinetraffic.com/en/ais/details/ships/shipid:2771/mmsi:229540000/vessel:2771
400_vd03_invalid_search_string_length:
title: Invalid search string length
type: object
properties:
errors:
type: array
items:
type: object
properties:
code:
type: string
description: Error code
detail:
type: string
description: Error message
example:
errors:
- code: '11'
detail: KEYWORD SHOULD BE AT LEAST 3 CHARACTERS