Last updated
ChangelogMarineTraffic API
HealthyRead-onlyVessel 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.
/vessels10 credits per 12 rowsSearch 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.
Authorization: Bearer <key> on every request.Parameters
Vessel name (at least 3 characters), IMO number or MMSI
Rows per page (default 50, max 200)
Rows to skip
Bypass and repopulate the cache (answers are cached for 5 minutes)
Response fields
Fields inside data.
querye.g."ever given"totale.g.1counte.g.1vessels
ship_idMarineTraffic ship ide.g."5630138"refIdentifier accepted by /vessels/{imo} (works for vessels without an IMO)e.g."shipid:5630138"namee.g."EVER GIVEN"ais_namee.g."EVER GIVEN"imoe.g."9811000"mmsie.g."636026627"call_signe.g."A8AB9"flage.g."Liberia"flag_codee.g."LR"vessel_typee.g."Container Ship"ais_typee.g."Cargo - Hazard A (Major)"markete.g."CONTAINER SHIPS"size_classe.g."ULCV"length_me.g.399.94width_me.g.59ais_classe.g."Class A"home_porturle.g."https://www.marinetraffic.com/en/ais/details/ships/shipid:5630138"matched_one.g."EVER GIVEN"Next to data, every response also has cached, source and pagination.
cachede.g.falsesourcee.g."marinetraffic:web"pagination
totale.g.182limite.g.50offsete.g.0counte.g.50has_moree.g.truecurl "https://api.maviapi.com/v1/sites/marinetraffic/vessels?query=ever%20given&limit=50&offset=0&refresh=false" \-H "Authorization: Bearer $MAVI_KEY"
{
"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.
https://mcp.maviapi.com/mcpOr 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 importPaste 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 /vesselsSearch 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 Name Type / location Required Description query string / query Yes Vessel name (at least 3 characters), IMO number or MMSI limit integer / query No Rows per page (default 50, max 200) offset integer / query No Rows to skip refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description query string total integer count integer vessels object[] vessels[].ship_id string MarineTraffic ship id vessels[].ref string Identifier accepted by /vessels/{imo} (works for vessels without an IMO) vessels[].name string vessels[].ais_name string vessels[].imo string vessels[].mmsi string vessels[].call_sign string vessels[].flag string vessels[].flag_code string vessels[].vessel_type string vessels[].ais_type string vessels[].market string vessels[].size_class string vessels[].length_m number vessels[].width_m number vessels[].ais_class string vessels[].home_port string vessels[].url string vessels[].matched_on string Fields beside data Field Type Description cached boolean source string pagination object pagination.total integer pagination.limit integer pagination.offset integer pagination.count integer pagination.has_more boolean - Search ports
GET /portsSearch 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 Name Type / location Required Description query string / query Yes Port name (at least 3 characters) or UN/LOCODE limit integer / query No Rows per page (default 50, max 200) offset integer / query No Rows to skip refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description query string total integer count integer ports object[] ports[].port_id string ports[].name string ports[].type string ports[].country string ports[].country_code string ports[].unlocode string ports[].latitude number ports[].longitude number ports[].size string ports[].matched_on string ports[].url string Fields beside data Field Type Description cached boolean source string pagination object pagination.total integer pagination.limit integer pagination.offset integer pagination.count integer pagination.has_more boolean - Port Vessels
GET /ports/{port}/vesselsShips 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 Name Type / location Required Description port string / path Yes UN/LOCODE or MarineTraffic port id radius_km number / query No Search radius around the port position, 0.5 to 15 km vessel_type string / query No Only vessels of this map category Allowed values: cargo, tanker, passenger, fishing, tug_special, high_speed, pleasure, navigation_aid, unspecified. moving boolean / query No true: only vessels moving at 1 knot or more; false: only vessels stopped or moored limit integer / query No Rows per page (default 50, max 200) offset integer / query No Rows to skip refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description port object port.port_id string port.name string port.unlocode string port.country_code string port.latitude number port.longitude number radius_km number vessel_type string moving boolean complete boolean map_requests integer count integer vessels object[] vessels[].ship_id string vessels[].ref string vessels[].name string vessels[].flag_code string vessels[].vessel_type string vessels[].latitude number vessels[].longitude number vessels[].distance_km number vessels[].speed_knots number vessels[].course number vessels[].heading number vessels[].destination string vessels[].length_m number vessels[].width_m number vessels[].dwt number vessels[].position_age_minutes integer vessels[].timestamp string Fields beside data Field Type Description cached boolean source string pagination object pagination.total integer pagination.limit integer pagination.offset integer pagination.count integer pagination.has_more boolean - 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 Name Type / location Required Description imo string / path Yes 7-digit IMO number, 9-digit MMSI, or shipid:<id> (the `ref` of a list row, for vessels with no IMO) refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description ship_id string MarineTraffic ship id ref string Identifier accepted by /vessels/{imo} (works for vessels without an IMO) name string ais_name string imo string mmsi string call_sign string flag string flag_code string vessel_type string ais_type string market string size_class string length_m number width_m number ais_class string home_port string url string summary string Fields beside data Field Type Description cached boolean source string - Vessel position
GET /vessels/{imo}/positionLatest 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 Name Type / location Required Description imo string / path Yes 7-digit IMO number, 9-digit MMSI, or shipid:<id> refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description name string imo string mmsi string ship_id string latitude number longitude number speed_knots number course number heading number rate_of_turn number draught_m number status string area string timestamp string position_age_minutes integer received_by string Terrestrial (station) or roaming/satellite reception in_range boolean destination string Destination as reported by the crew over AIS eta string voyage_progress_pct number departure_port object departure_port.port_id string departure_port.name string departure_port.unlocode string departure_port.country_code string departure_time string arrival_port object arrival_port.port_id string arrival_port.name string arrival_port.unlocode string arrival_port.country_code string arrival_time string arrival_time_kind string Fields beside data Field Type Description cached boolean source string - 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 Name Type / location Required Description port string / path Yes UN/LOCODE (e.g. NLRTM) or MarineTraffic port id (e.g. 2036, the port_id of /ports) refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description port_id string name string unlocode string country string country_code string type string size string latitude number longitude number utc_offset_hours number alternative_names string[] anchorages object[] anchorages[].port_id string anchorages[].name string related_ports object[] related_ports[].port_id string related_ports[].name string summary string url string Fields beside data Field Type Description cached boolean source string - Track a vessel or port
GET /trackOne 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 Name Type / location Required Description query string / query Yes Vessel name/IMO/MMSI, or port name/UN/LOCODE kind string / query No What to resolve the text to Allowed values: vessel, port. nearby integer / query No kind=port: how many nearby vessels to include (0 to 50) refresh boolean / query No Bypass and repopulate the cache (answers are cached for 5 minutes) Response fields inside data Field Type Description kind string resolved object resolved.input string resolved.id string resolved.name string resolved.type string vessel object vessel.ship_id string MarineTraffic ship id vessel.ref string Identifier accepted by /vessels/{imo} (works for vessels without an IMO) vessel.name string vessel.ais_name string vessel.imo string vessel.mmsi string vessel.call_sign string vessel.flag string vessel.flag_code string vessel.vessel_type string vessel.ais_type string vessel.market string vessel.size_class string vessel.length_m number vessel.width_m number vessel.ais_class string vessel.home_port string vessel.url string position object position.name string position.imo string position.mmsi string position.ship_id string position.latitude number position.longitude number position.speed_knots number position.course number position.heading number position.rate_of_turn number position.draught_m number position.status string position.area string position.timestamp string position.position_age_minutes integer position.received_by string Terrestrial (station) or roaming/satellite reception position.in_range boolean position.destination string Destination as reported by the crew over AIS position.eta string position.voyage_progress_pct number position.departure_port object position.departure_port.port_id string position.departure_port.name string position.departure_port.unlocode string position.departure_port.country_code string position.departure_time string position.arrival_port object position.arrival_port.port_id string position.arrival_port.name string position.arrival_port.unlocode string position.arrival_port.country_code string position.arrival_time string position.arrival_time_kind string port object port.port_id string port.name string port.unlocode string port.country string port.country_code string port.type string port.size string port.latitude number port.longitude number port.utc_offset_hours number port.alternative_names string[] port.anchorages object[] port.anchorages[].port_id string port.anchorages[].name string port.related_ports object[] port.related_ports[].port_id string port.related_ports[].name string port.summary string port.url string nearby object nearby.radius_km number nearby.count integer nearby.vessels object[] nearby.vessels[].ship_id string nearby.vessels[].ref string nearby.vessels[].name string nearby.vessels[].flag_code string nearby.vessels[].vessel_type string nearby.vessels[].latitude number nearby.vessels[].longitude number nearby.vessels[].distance_km number nearby.vessels[].speed_knots number nearby.vessels[].course number nearby.vessels[].heading number nearby.vessels[].destination string nearby.vessels[].length_m number nearby.vessels[].width_m number nearby.vessels[].dwt number nearby.vessels[].position_age_minutes integer nearby.vessels[].timestamp string Fields beside data Field Type Description cached boolean source string
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.
| List | CSV columns |
|---|---|
Search vesselsGET /vessels | ship_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 /ports | port_id, name, type, country, country_code, unlocode, latitude, longitude, size, matched_on, url |
Port VesselsGET /ports/{port}/vessels | ship_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 '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.
Related APIs
- 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โฆ