openapi: 3.0.2
info:
title: MarineTraffic Events AIS API Vessel Historical Track 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: Vessel Historical Track
paths:
/exportvesseltrack/{api_key}:
get:
tags:
- Vessel Historical Track
summary: Single Vessel Historical Positions
description: "Get all historical positions of a single vessel for a specific period of time. Notes
\n - Default resolution for returned positions is up to 2 minutes. Use \"period\" parameter to limit the frequency of positions
\n - Weather data is returned once within each hour's results
\n - Information about AIS-transmitted data
\n - **SPEED** speed over ground returned in (knots x10)
\n - **TIMESTAMP** UTC second when the report was generated (0-59)
\n - Historical positions are available since January 2015
\n - **Hourly** and **daily** records are the first records received during the hour or the day respectively
\n - When the **period** is **hourly**, the data field **HEADING** is not available for positions older than 2017-11-17
\n - **Hourly** records are available for dates after 2014-08-28
\n - Weather data for **winds** are available for dates after 2015-05-27
\n - Weather data for **waves**, **swells** and **currents** are available for dates after 2021-01-21
\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: exportvesseltrack
parameters:
- $ref: '#/components/parameters/api_key'
- $ref: '#/components/parameters/v_PS01'
- $ref: '#/components/parameters/shipid_PS01'
- $ref: '#/components/parameters/mmsi_PS01'
- $ref: '#/components/parameters/imo_PS01'
- $ref: '#/components/parameters/days_PS01'
- $ref: '#/components/parameters/fromdate_PS01'
- $ref: '#/components/parameters/todate_PS01'
- $ref: '#/components/parameters/period_PS01'
- $ref: '#/components/parameters/msgtype_PS01'
- $ref: '#/components/parameters/protocol'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/200_ps01_default'
- $ref: '#/components/schemas/200_ps01_extended'
application/xml:
schema:
oneOf:
- $ref: '#/components/schemas/200_ps01_default'
- $ref: '#/components/schemas/200_ps01_extended'
examples:
Default:
summary: Simple
value: "\n\n \n \n \n \n \n"
Extended:
summary: Extended
value: "\n\n \n \n \n \n \n \n \n \n \n \n"
'400':
description: Bad Request
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/400_ps01_days_out_of_limit'
- $ref: '#/components/schemas/400_ps01_missing_ship_identifier'
application/xml:
schema:
oneOf:
- $ref: '#/components/schemas/400_ps01_days_out_of_limit'
- $ref: '#/components/schemas/400_ps01_missing_ship_identifier'
examples:
Days out of limit:
summary: Days out of limit
value: "\n\n \n \n \n"
Missing ship identifier:
summary: Missing ship 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"
'/exportvesseltrack/{api_key} ':
get:
tags:
- Vessel Historical Track
summary: Vessel Historical Positions in an Area
description: "Get vessel historical positions for a single or for all vessels inside an area of your preference for a specific period of time.\n \nNotes \n - Default resolution for returned positions is up to 2 minutes. Use \"period\" parameter to limit the frequency of positions
\n - Weather data is returned once within each hour's results
\n - Information about AIS-transmitted data
\n - **SPEED** speed over ground returned in (knots x10)
\n - **TIMESTAMP** UTC second when the report was generated (0-59)
\n - Historical positions are available since January 2015
\n - **Hourly** and **daily** records are the first records received during the hour or the day respectively
\n - When the **period** is **hourly**, the data field **HEADING** is not available for positions older than 2017-11-17
\n - **Hourly** records are available for dates after 2014-08-28
\n - Weather data for **winds** are available for dates after 2015-05-27
\n - Weather data for **waves**, **swells** and **currents** are available for dates after 2021-01-21
\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: exportvesseltrack_
parameters:
- $ref: '#/components/parameters/api_key'
- $ref: '#/components/parameters/v_PS01'
- $ref: '#/components/parameters/days_PS01'
- $ref: '#/components/parameters/fromdate_PS01'
- $ref: '#/components/parameters/todate_PS01'
- $ref: '#/components/parameters/MINLAT_PS01'
- $ref: '#/components/parameters/MAXLAT_PS01'
- $ref: '#/components/parameters/MINLON_PS01'
- $ref: '#/components/parameters/MAXLON_PS01'
- $ref: '#/components/parameters/shipid_PS01_2'
- $ref: '#/components/parameters/mmsi_PS01'
- $ref: '#/components/parameters/imo_PS01'
- $ref: '#/components/parameters/period_PS01'
- $ref: '#/components/parameters/msgtype_PS01'
- $ref: '#/components/parameters/protocol'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/200_ps01_default'
- $ref: '#/components/schemas/200_ps01_extended'
application/xml:
schema:
oneOf:
- $ref: '#/components/schemas/200_ps01_default'
- $ref: '#/components/schemas/200_ps01_extended'
examples:
Default:
summary: Simple
value: "\n\n \n \n \n \n \n"
Extended:
summary: Extended
value: "\n\n \n \n \n \n \n \n \n \n \n \n"
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/400_ps01_area_out_of_bound'
application/xml:
schema:
$ref: '#/components/schemas/400_ps01_area_out_of_bound'
examples:
Area out of bound:
summary: Area out of bound
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:
schemas:
400_ps01_missing_ship_identifier:
title: Missing ship 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: '2'
detail: VESSEL MMSI OR IMO OR SHIPID MISSING
400_ps01_area_out_of_bound:
title: Area out of bound
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: 1k
detail: BOX OUT OF BOUNDS
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_ps01_extended:
title: Extended
type: array
items:
type: object
properties:
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
STATUS:
type: string
description: The AIS Navigational Status of the subject vessel as input by the vessel's crew. There might be discrepancies with the vessel's detail page when vessel speed is near zero (0) knots
SPEED:
type: string
description: The speed (in knots x10) that the subject vessel is reporting according to AIS transmissions
LON:
type: string
description: Longitude - a geographic coordinate that specifies the east-west position of the vessel on the Earth's surface
LAT:
type: string
description: Latitude - a geographic coordinate that specifies the north-south position of the vessel on the Earth's surface
COURSE:
type: string
description: The course (in degrees) that the subject vessel is reporting according to AIS transmissions
HEADING:
type: string
description: The heading (in degrees) that the subject vessel is reporting according to AIS transmissions
TIMESTAMP:
type: string
description: The date and time (in UTC) that the subject vessel's position or event was recorded by MarineTraffic
format: date-time
SHIP_ID:
type: string
description: A uniquely assigned ID by MarineTraffic for the subject vessel
WIND_ANGLE:
type: string
description: The current angle of the wind in the subject area (in degrees, compared to True North)
WIND_SPEED:
type: string
description: The current wind speed in the subject area (in knots)
WIND_TEMP:
type: string
description: The current temperature of the wind in the subject area (in Celsius degrees)
SIGNIFICANT_WAVE_HEIGHT:
type: string
description: The significant wave height in the subject area (in meters x10)
WIND_WAVE_HEIGHT:
type: string
description: The height of the wind waves in the subjects area (in meters x10)
WIND_WAVE_PERIOD:
type: string
description: The period of the wind waves in the subject area (in seconds)
WIND_WAVE_DIRECTION:
type: string
description: The direction of the wind waves in the subject area (in degrees, compared to True North)
SWELL_HEIGHT:
type: string
description: The height of the swells in the subject area (in meters x10)
SWELL_PERIOD:
type: string
description: The period of the swells in the subject area (in seconds)
SWELL_DIRECTION:
type: string
description: The direction of the swells in the subject area (in degrees, compared to True North)
CURRENTS_ANGLE:
type: string
description: The angle of the currents in the subject area (in degrees, compared to True North)
CURRENTS_SPEED:
type: string
description: The speed of the currents in the subject area (in knots x100)
example:
- MMSI: '239982500'
IMO: '8348678'
STATUS: '5'
SPEED: '0'
LON: '23.726880'
LAT: '37.878850'
COURSE: '0'
HEADING: '320'
TIMESTAMP: '2021-02-08T12:57:01.000Z'
SHIP_ID: '4317723'
WIND_ANGLE: '326'
WIND_SPEED: '10'
WIND_TEMP: '23'
SIGNIFICANT_WAVE_HEIGHT: '2'
WIND_WAVE_DIRECTION: '314'
WIND_WAVE_HEIGHT: '1'
WIND_WAVE_PERIOD: '16'
SWELL_HEIGHT: '1'
SWELL_PERIOD: '26'
CURRENTS_ANGLE: '308'
CURRENTS_SPEED: '20'
SWELL_DIRECTION: '317'
- MMSI: '249032000'
IMO: '9351098'
STATUS: '15'
SPEED: '2'
LON: '23.548990'
LAT: '37.903030'
COURSE: '160'
HEADING: '160'
TIMESTAMP: '2021-02-08T12:57:05.000Z'
SHIP_ID: '362849'
WIND_ANGLE: '333'
WIND_SPEED: '12'
WIND_TEMP: '23'
SIGNIFICANT_WAVE_HEIGHT: '3'
WIND_WAVE_DIRECTION: '320'
WIND_WAVE_HEIGHT: '3'
WIND_WAVE_PERIOD: '24'
SWELL_HEIGHT: '0'
SWELL_PERIOD: '31'
CURRENTS_ANGLE: '21'
CURRENTS_SPEED: '20'
SWELL_DIRECTION: '303'
400_ps01_days_out_of_limit:
title: Days out of limit
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: 9c
detail: DAYS ABOVE ALLOWED LIMIT
200_ps01_default:
title: Simple
type: array
items:
type: object
properties:
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
STATUS:
type: string
description: The AIS Navigational Status of the subject vessel as input by the vessel's crew. There might be discrepancies with the vessel's detail page when vessel speed is near zero (0) knots
SPEED:
type: string
description: The speed (in knots x10) that the subject vessel is reporting according to AIS transmissions
LON:
type: string
description: Longitude - a geographic coordinate that specifies the east-west position of the vessel on the Earth's surface
LAT:
type: string
description: Latitude - a geographic coordinate that specifies the north-south position of the vessel on the Earth's surface
COURSE:
type: string
description: The course (in degrees) that the subject vessel is reporting according to AIS transmissions
HEADING:
type: string
description: The heading (in degrees) that the subject vessel is reporting according to AIS transmissions
TIMESTAMP:
type: string
description: The date and time (in UTC) that the subject vessel's position or event was recorded by MarineTraffic
format: date-time
SHIP_ID:
type: string
description: A uniquely assigned ID by MarineTraffic for the subject vessel
example:
- MMSI: '239982500'
IMO: '8348678'
STATUS: '5'
SPEED: '0'
LON: '23.726880'
LAT: '37.878850'
COURSE: '0'
HEADING: '320'
TIMESTAMP: '2021-02-08T12:57:01.000Z'
SHIP_ID: '4317723'
- MMSI: '249032000'
IMO: '9351098'
STATUS: '15'
SPEED: '2'
LON: '23.548990'
LAT: '37.903030'
COURSE: '160'
HEADING: '160'
TIMESTAMP: '2021-02-08T12:57:05.000Z'
SHIP_ID: '362849'
parameters:
shipid_PS01_2:
name: shipid
in: query
description: A uniquely assigned ID by MarineTraffic for the subject vessel You can instead use imo or mmsi
required: false
schema:
type: integer
MAXLON_PS01:
name: MAXLON
in: query
description: Use with MINLAT, MAXLAT, MINLON to define an area for which you wish to either get all the historical vessels' positions or historical positions for a specific vessel The absolute value of MAXLAT - MINLAT + MAXLON - MINLON has to be equal to or less than 2 If you do not define a vessel, the maximum period for which you can look back has a maximum period of one day
required: true
schema:
type: number
MINLAT_PS01:
name: MINLAT
in: query
description: Use with MAXLAT, MINLON, MAXLON to define an area for which you wish to either get all the historical vessels' positions or historical positions for a specific vessel The absolute value of MAXLAT - MINLAT + MAXLON - MINLON has to be equal to or less than 2 If you do not define a vessel, the maximum period for which you can look back has a maximum period of one day
required: true
schema:
type: number
todate_PS01:
name: todate
in: query
description: Use with fromdate instead of days to get data for a date period
required: false
schema:
type: string
format: date-time
period_PS01:
name: period
in: query
description: "Limit position per vessel. Omit to get all the available positions Values are: \n - hourly: get one position per hour
\n - daily: get one position per day
\n
"
required: false
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
MINLON_PS01:
name: MINLON
in: query
description: Use with MINLAT, MAXLAT, MAXLON to define an area for which you wish to either get all the historical vessels' positions or historical positions for a specific vessel The absolute value of MAXLAT - MINLAT + MAXLON - MINLON has to be equal to or less than 2 If you do not define a vessel, the maximum period for which you can look back has a maximum period of one day
required: true
schema:
type: number
mmsi_PS01:
name: mmsi
in: query
description: The Maritime Mobile Service Identity (MMSI) of the vessel you wish to track
required: false
schema:
type: integer
fromdate_PS01:
name: fromdate
in: query
description: Use with todate instead of days to get data for a date period
required: false
schema:
type: string
format: date-time
v_PS01:
name: v
in: query
description: Version of the service to be executed. Use version 3 to get the latest
schema:
type: integer
default: 1
api_key:
name: api_key
in: path
description: 'API key: 40-character hexadecimal number'
required: true
schema:
type: string
imo_PS01:
name: imo
in: query
description: The International Maritime Organization (IMO) number of the vessel you wish to track
required: false
schema:
type: integer
MAXLAT_PS01:
name: MAXLAT
in: query
description: Use with MINLAT, MINLON, MAXLON to define an area for which you wish to either get all the historical vessels' positions or historical positions for a specific vessel The absolute value of MAXLAT - MINLAT + MAXLON - MINLON has to be equal to or less than 2 If you do not define a vessel, the maximum period for which you can look back has a maximum period of one day
required: true
schema:
type: number
msgtype_PS01:
name: msgtype
in: query
description: "Resolution of the response. Available values: If used with the value extended, the response includes also weather data"
required: false
schema:
type: string
default: simple
days_PS01:
name: days
in: query
description: The number of days, starting from the time of request and going backwards, for which the response should look for position data Maximum value is 190 (days)
required: true
schema:
type: integer
shipid_PS01:
name: shipid
in: query
description: A uniquely assigned ID by MarineTraffic for the subject vessel You can instead use imo or mmsi
required: true
schema:
type: integer