Skip to content

Last updated

Changelog

MarineTraffic API

HealthyRead-only

Vessel and port data from MarineTraffic: search vessels by name, IMO or MMSI; vessel particulars; latest AIS position and voyage (destination, ETA); port search and details; and the ships in or near a port. Generated from www.marinetraffic.com.

Base URL
https://api.maviapi.com/v1/sites/marinetraffic
7
Endpoints
31 min ago
Last verified
99.1%
Uptime / 7d
1733ms
p50 latency
GET/vessels10 credits per 12 rows

Search vessels

Search vessels by name, IMO or MMSI. Each match carries its particulars (IMO, MMSI, call sign, flag, type, size). The site returns at most 12 matches per query and has no paging: use a fuller name, or the IMO/MMSI, to reach a specific vessel.

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringRequiredin query

Vessel name (at least 3 characters), IMO number or MMSI

integerOptionalin query

Rows per page (default 50, max 200)

integerOptionalin query

Rows to skip

booleanOptionalin query

Bypass and repopulate the cache (answers are cached for 5 minutes)

Fields inside data.

querystringe.g."ever given"
totalintegere.g.1
countintegere.g.1
vesselsobject[]19 fields
ship_idstringMarineTraffic ship ide.g."5630138"
refstringIdentifier accepted by /vessels/{imo} (works for vessels without an IMO)e.g."shipid:5630138"
namestringe.g."EVER GIVEN"
ais_namestringe.g."EVER GIVEN"
imostringe.g."9811000"
mmsistringe.g."636026627"
call_signstringe.g."A8AB9"
flagstringe.g."Liberia"
flag_codestringe.g."LR"
vessel_typestringe.g."Container Ship"
ais_typestringe.g."Cargo - Hazard A (Major)"
marketstringe.g."CONTAINER SHIPS"
size_classstringe.g."ULCV"
length_mnumbere.g.399.94
width_mnumbere.g.59
ais_classstringe.g."Class A"
home_portstringnullable
urlstringe.g."https://www.marinetraffic.com/en/ais/details/ships/shipid:5630138"
matched_onstringe.g."EVER GIVEN"
Next to data, every response also has cached, source and pagination.
cachedbooleane.g.false
sourcestringe.g."marinetraffic:web"
paginationobject5 fields
totalintegere.g.182
limitintegere.g.50
offsetintegere.g.0
countintegere.g.50
has_morebooleane.g.true
Try itLive
GET
https://api.maviapi.com/v1/sites/marinetraffic/vessels?query=ever%20given&limit=50&offset=0&refresh=false
Request
curl "https://api.maviapi.com/v1/sites/marinetraffic/vessels?query=ever%20given&limit=50&offset=0&refresh=false" \
-H "Authorization: Bearer $MAVI_KEY"
Example933 B
{
  "data": {
    "query": "ever given",
    "total": 1,
    "count": 1,
    "vessels": [
      {
        "ship_id": "5630138",
        "ref": "shipid:5630138",
        "name": "EVER GIVEN",
        "ais_name": "EVER GIVEN",
        "imo": "9811000",
        "mmsi": "636026627",
        "call_sign": "A8AB9",
        "flag": "Liberia",
        "flag_code": "LR",
        "vessel_type": "Container Ship",
        "ais_type": "Cargo - Hazard A (Major)",
        "market": "CONTAINER SHIPS",
        "size_class": "ULCV",
        "length_m": 399.94,
        "width_m": 59,
        "ais_class": "Class A",
        "home_port": null,
        "url": "https://www.marinetraffic.com/en/ais/details/ships/shipid:5630138",
        "matched_on": "EVER GIVEN"
      }
    ]
  },
  "cached": false,
  "source": "marinetraffic:web",
  "pagination": {
    "total": 182,
    "limit": 50,
    "offset": 0,
    "count": 50,
    "has_more": true
  }
}

Get all the data, no code

Collect every page of GET /vessels into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.

Use MarineTraffic API from Claude, ChatGPT and your coding tools

Add this URL as a custom connector and sign in to maviapi. Nothing to install.

How to connect
https://mcp.maviapi.com/mcp

Or run it locally, with each endpoint of MarineTraffic API as its own tool:

claude mcp add maviapi -e MAVIAPI_TOOLS=marinetraffic -- npx -y '@maviapi/mcp'

Import MarineTraffic API into Postman and other tools

How to import

Paste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.

  • OpenAPI 3.1
    https://api.maviapi.com/v1/apis/marinetraffic/openapi.json
  • Postman
    https://api.maviapi.com/v1/apis/marinetraffic/postman.json

The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.

Build with the MarineTraffic API

Choose a starting endpoint

  • Search vessels GET /vessels

    Search vessels by name, IMO or MMSI. Each match carries its particulars (IMO, MMSI, call sign, flag, type, size). The site returns at most 12 matches per query and has no paging: use a fuller name, or the IMO/MMSI, to reach a specific vessel.

    Parameters and response fields for GET /vessels
    Request parameters
    NameType / locationRequiredDescription
    querystring / queryYesVessel name (at least 3 characters), IMO number or MMSI
    limitinteger / queryNoRows per page (default 50, max 200)
    offsetinteger / queryNoRows to skip
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    querystring
    totalinteger
    countinteger
    vesselsobject[]
    vessels[].ship_idstringMarineTraffic ship id
    vessels[].refstringIdentifier accepted by /vessels/{imo} (works for vessels without an IMO)
    vessels[].namestring
    vessels[].ais_namestring
    vessels[].imostring
    vessels[].mmsistring
    vessels[].call_signstring
    vessels[].flagstring
    vessels[].flag_codestring
    vessels[].vessel_typestring
    vessels[].ais_typestring
    vessels[].marketstring
    vessels[].size_classstring
    vessels[].length_mnumber
    vessels[].width_mnumber
    vessels[].ais_classstring
    vessels[].home_portstring
    vessels[].urlstring
    vessels[].matched_onstring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring
    paginationobject
    pagination.totalinteger
    pagination.limitinteger
    pagination.offsetinteger
    pagination.countinteger
    pagination.has_moreboolean
  • Search ports GET /ports

    Search ports, anchorages and offshore terminals by name or UN/LOCODE, with country, UN/LOCODE and coordinates. The site returns at most about 12 matches per query and has no paging.

    Parameters and response fields for GET /ports
    Request parameters
    NameType / locationRequiredDescription
    querystring / queryYesPort name (at least 3 characters) or UN/LOCODE
    limitinteger / queryNoRows per page (default 50, max 200)
    offsetinteger / queryNoRows to skip
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    querystring
    totalinteger
    countinteger
    portsobject[]
    ports[].port_idstring
    ports[].namestring
    ports[].typestring
    ports[].countrystring
    ports[].country_codestring
    ports[].unlocodestring
    ports[].latitudenumber
    ports[].longitudenumber
    ports[].sizestring
    ports[].matched_onstring
    ports[].urlstring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring
    paginationobject
    pagination.totalinteger
    pagination.limitinteger
    pagination.offsetinteger
    pagination.countinteger
    pagination.has_moreboolean
  • Port Vessels GET /ports/{port}/vessels

    Ships currently in or near a port: every vessel the live map shows within radius_km of the port's position, nearest first, with position, speed, course, destination and size. `complete` is false only if part of the area could not be read.

    Parameters and response fields for GET /ports/{port}/vessels
    Request parameters
    NameType / locationRequiredDescription
    portstring / pathYesUN/LOCODE or MarineTraffic port id
    radius_kmnumber / queryNoSearch radius around the port position, 0.5 to 15 km
    vessel_typestring / queryNoOnly vessels of this map category Allowed values: cargo, tanker, passenger, fishing, tug_special, high_speed, pleasure, navigation_aid, unspecified.
    movingboolean / queryNotrue: only vessels moving at 1 knot or more; false: only vessels stopped or moored
    limitinteger / queryNoRows per page (default 50, max 200)
    offsetinteger / queryNoRows to skip
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    portobject
    port.port_idstring
    port.namestring
    port.unlocodestring
    port.country_codestring
    port.latitudenumber
    port.longitudenumber
    radius_kmnumber
    vessel_typestring
    movingboolean
    completeboolean
    map_requestsinteger
    countinteger
    vesselsobject[]
    vessels[].ship_idstring
    vessels[].refstring
    vessels[].namestring
    vessels[].flag_codestring
    vessels[].vessel_typestring
    vessels[].latitudenumber
    vessels[].longitudenumber
    vessels[].distance_kmnumber
    vessels[].speed_knotsnumber
    vessels[].coursenumber
    vessels[].headingnumber
    vessels[].destinationstring
    vessels[].length_mnumber
    vessels[].width_mnumber
    vessels[].dwtnumber
    vessels[].position_age_minutesinteger
    vessels[].timestampstring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring
    paginationobject
    pagination.totalinteger
    pagination.limitinteger
    pagination.offsetinteger
    pagination.countinteger
    pagination.has_moreboolean
  • Vessel details GET /vessels/{imo}

    Registry details of one vessel: name, IMO, MMSI, call sign, flag, type, commercial market and size class, length and width. Build year is not public on the site (login only) and is not returned.

    Parameters and response fields for GET /vessels/{imo}
    Request parameters
    NameType / locationRequiredDescription
    imostring / pathYes7-digit IMO number, 9-digit MMSI, or shipid:<id> (the `ref` of a list row, for vessels with no IMO)
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    ship_idstringMarineTraffic ship id
    refstringIdentifier accepted by /vessels/{imo} (works for vessels without an IMO)
    namestring
    ais_namestring
    imostring
    mmsistring
    call_signstring
    flagstring
    flag_codestring
    vessel_typestring
    ais_typestring
    marketstring
    size_classstring
    length_mnumber
    width_mnumber
    ais_classstring
    home_portstring
    urlstring
    summarystring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring
  • Vessel position GET /vessels/{imo}/position

    Latest AIS position of one vessel (lat/lon, speed, course, heading, navigational status, time of report) with its voyage: reported destination, ETA, departure and arrival ports.

    Parameters and response fields for GET /vessels/{imo}/position
    Request parameters
    NameType / locationRequiredDescription
    imostring / pathYes7-digit IMO number, 9-digit MMSI, or shipid:<id>
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    namestring
    imostring
    mmsistring
    ship_idstring
    latitudenumber
    longitudenumber
    speed_knotsnumber
    coursenumber
    headingnumber
    rate_of_turnnumber
    draught_mnumber
    statusstring
    areastring
    timestampstring
    position_age_minutesinteger
    received_bystringTerrestrial (station) or roaming/satellite reception
    in_rangeboolean
    destinationstringDestination as reported by the crew over AIS
    etastring
    voyage_progress_pctnumber
    departure_portobject
    departure_port.port_idstring
    departure_port.namestring
    departure_port.unlocodestring
    departure_port.country_codestring
    departure_timestring
    arrival_portobject
    arrival_port.port_idstring
    arrival_port.namestring
    arrival_port.unlocodestring
    arrival_port.country_codestring
    arrival_timestring
    arrival_time_kindstring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring
  • Port details GET /ports/{port}

    Details of one port: name, UN/LOCODE, country, type, size, coordinates, time zone, other names and its anchorages.

    Parameters and response fields for GET /ports/{port}
    Request parameters
    NameType / locationRequiredDescription
    portstring / pathYesUN/LOCODE (e.g. NLRTM) or MarineTraffic port id (e.g. 2036, the port_id of /ports)
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    port_idstring
    namestring
    unlocodestring
    countrystring
    country_codestring
    typestring
    sizestring
    latitudenumber
    longitudenumber
    utc_offset_hoursnumber
    alternative_namesstring[]
    anchoragesobject[]
    anchorages[].port_idstring
    anchorages[].namestring
    related_portsobject[]
    related_ports[].port_idstring
    related_ports[].namestring
    summarystring
    urlstring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring
  • Track a vessel or port GET /track

    One call from free text to the live picture. kind=vessel: resolves an IMO, MMSI or exact vessel name and returns its details and latest position. kind=port: resolves a UN/LOCODE or exact port name and returns its details and the nearest vessels within 5 km. An ambiguous name answers 400 with candidates.

    Parameters and response fields for GET /track
    Request parameters
    NameType / locationRequiredDescription
    querystring / queryYesVessel name/IMO/MMSI, or port name/UN/LOCODE
    kindstring / queryNoWhat to resolve the text to Allowed values: vessel, port.
    nearbyinteger / queryNokind=port: how many nearby vessels to include (0 to 50)
    refreshboolean / queryNoBypass and repopulate the cache (answers are cached for 5 minutes)
    Response fields inside data
    FieldTypeDescription
    kindstring
    resolvedobject
    resolved.inputstring
    resolved.idstring
    resolved.namestring
    resolved.typestring
    vesselobject
    vessel.ship_idstringMarineTraffic ship id
    vessel.refstringIdentifier accepted by /vessels/{imo} (works for vessels without an IMO)
    vessel.namestring
    vessel.ais_namestring
    vessel.imostring
    vessel.mmsistring
    vessel.call_signstring
    vessel.flagstring
    vessel.flag_codestring
    vessel.vessel_typestring
    vessel.ais_typestring
    vessel.marketstring
    vessel.size_classstring
    vessel.length_mnumber
    vessel.width_mnumber
    vessel.ais_classstring
    vessel.home_portstring
    vessel.urlstring
    positionobject
    position.namestring
    position.imostring
    position.mmsistring
    position.ship_idstring
    position.latitudenumber
    position.longitudenumber
    position.speed_knotsnumber
    position.coursenumber
    position.headingnumber
    position.rate_of_turnnumber
    position.draught_mnumber
    position.statusstring
    position.areastring
    position.timestampstring
    position.position_age_minutesinteger
    position.received_bystringTerrestrial (station) or roaming/satellite reception
    position.in_rangeboolean
    position.destinationstringDestination as reported by the crew over AIS
    position.etastring
    position.voyage_progress_pctnumber
    position.departure_portobject
    position.departure_port.port_idstring
    position.departure_port.namestring
    position.departure_port.unlocodestring
    position.departure_port.country_codestring
    position.departure_timestring
    position.arrival_portobject
    position.arrival_port.port_idstring
    position.arrival_port.namestring
    position.arrival_port.unlocodestring
    position.arrival_port.country_codestring
    position.arrival_timestring
    position.arrival_time_kindstring
    portobject
    port.port_idstring
    port.namestring
    port.unlocodestring
    port.countrystring
    port.country_codestring
    port.typestring
    port.sizestring
    port.latitudenumber
    port.longitudenumber
    port.utc_offset_hoursnumber
    port.alternative_namesstring[]
    port.anchoragesobject[]
    port.anchorages[].port_idstring
    port.anchorages[].namestring
    port.related_portsobject[]
    port.related_ports[].port_idstring
    port.related_ports[].namestring
    port.summarystring
    port.urlstring
    nearbyobject
    nearby.radius_kmnumber
    nearby.countinteger
    nearby.vesselsobject[]
    nearby.vessels[].ship_idstring
    nearby.vessels[].refstring
    nearby.vessels[].namestring
    nearby.vessels[].flag_codestring
    nearby.vessels[].vessel_typestring
    nearby.vessels[].latitudenumber
    nearby.vessels[].longitudenumber
    nearby.vessels[].distance_kmnumber
    nearby.vessels[].speed_knotsnumber
    nearby.vessels[].coursenumber
    nearby.vessels[].headingnumber
    nearby.vessels[].destinationstring
    nearby.vessels[].length_mnumber
    nearby.vessels[].width_mnumber
    nearby.vessels[].dwtnumber
    nearby.vessels[].position_age_minutesinteger
    nearby.vessels[].timestampstring
    Fields beside data
    FieldTypeDescription
    cachedboolean
    sourcestring

Export MarineTraffic data to CSV

Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.

ListCSV columns
Search vesselsGET /vesselsship_id, ref, name, ais_name, imo, mmsi, call_sign, flag, flag_code, vessel_type, ais_type, market, size_class, length_m, width_m, ais_class, home_port, url, matched_on
Search portsGET /portsport_id, name, type, country, country_code, unlocode, latitude, longitude, size, matched_on, url
Port VesselsGET /ports/{port}/vesselsship_id, ref, name, flag_code, vessel_type, latitude, longitude, distance_km, speed_knots, course, heading, destination, length_m, width_m, dwt, position_age_minutes, timestamp

A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work

MarineTraffic API questions

What you get, what it costs and how to call it.

Is there an official MarineTraffic API?

Yes. MarineTraffic offers APIs for live AIS ship tracking, real-time and past vessel events, predictions and ship details. Source: MarineTraffic AIS Data API (checked 2026-11-25). This MarineTraffic API is a separate, unofficial one: an independent, hosted API from maviapi for the public data on marinetraffic.com. It is not made, endorsed or supported by MarineTraffic.

What data can I get from the MarineTraffic API?

The MarineTraffic API has 7 endpoints. Each returns JSON with the parameters and fields documented above:

  • GET /vessels: Search vessels by name, IMO or MMSI.
  • GET /ports: Search ports, anchorages and offshore terminals by name or UN/LOCODE, with country, UN/LOCODE and coordinates.
  • GET /ports/{port}/vessels: Ships currently in or near a port: every vessel the live map shows within radius_km of the port's position, nearest first, with position, speed, courseโ€ฆ
  • GET /vessels/{imo}: Registry details of one vessel: name, IMO, MMSI, call sign, flag, type, commercial market and size class, length and width.
  • GET /vessels/{imo}/position: Latest AIS position of one vessel (lat/lon, speed, course, heading, navigational status, time of report) with its voyage: reported destination, ETA, departureโ€ฆ
  • GET /ports/{port}: Details of one port: name, UN/LOCODE, country, type, size, coordinates, time zone, other names and its anchorages.
  • GET /track: One call from free text to the live picture.

How much does the MarineTraffic API cost?

Calls are paid in credits from your maviapi plan, and only successful calls are charged. Every endpoint of this API costs 10 credits per call. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $1.96. Failed calls are free. A call that returns more rows than one page pays that price again for each further page. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.

How do I call the MarineTraffic API?

Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /vessels:

cURL
curl 'https://api.maviapi.com/v1/sites/marinetraffic/vessels?query=ever+given' \
  -H "Authorization: Bearer $MAVI_KEY"

Create a key on your API keys page, or try any endpoint first in the console above with the free test key.

What are the ways to get MarineTraffic data as JSON?

Each way to get MarineTraffic data as JSON fits a different need:

  • MarineTraffic AIS Data API: MarineTraffic offers APIs for live AIS ship tracking, real-time and past vessel events, predictions and ship details. Better when you need write access, account data or an agreement with MarineTraffic.
  • Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on marinetraffic.com are yours. Better for a one-off pull from a page that rarely changes.
  • Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
  • RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
  • maviapi: The MarineTraffic API on this page: 7 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.

What happens when marinetraffic.com changes its layout?

Your code does not change. maviapi keeps the MarineTraffic API working when marinetraffic.com changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.

Will an update break my MarineTraffic API integration?

No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.

  • Tripadvisor API

    Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), withโ€ฆ

  • Google Maps API

    Structured data from maps.google.com.

  • Kiwi.com API

    Search and compare flights on Kiwi.com, itineraries with live prices, airlines, routes and departure/arrival timesโ€ฆ