MarineTraffic Ports API
Ports, anchorages and offshore terminals whose name or UN/LOCODE matches the text, in the site's relevance order (the site returns at most about 12 matches). Each row has the port id, name, type, country, UN/LOCODE, coordinates, size and the name or code it matched on.
https://api.maviapi.com/v1/sites/marinetraffic/ports5 credits per callParameters
| Name | Required | Example | Description |
|---|---|---|---|
querystring in query | Optional | rotterdam | port name (at least 3 characters) or UN/LOCODE, e.g. "rotterdam" or "NLRTM" |
Response fields
querye.g."rotterdam"totale.g.7counte.g.7ports
port_ide.g."2036"namee.g."ROTTERDAM"typee.g."Port"countrye.g."NETHERLANDS"country_codee.g."NL"unlocodee.g."NLRTM"latitudee.g.51.943306longitudee.g.4.1418123sizee.g."Large"matched_one.g."ROTTERDAM"urle.g."https://www.marinetraffic.com/en/ais/details/ports/2036"pagination
counte.g.7has_moree.g.falsenext_cursorfetched_ate.g."2026-11-27T10:13:03.176Z"agee.g.0Example request
Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.
curl 'https://api.maviapi.com/v1/sites/marinetraffic/ports' \
-H "Authorization: Bearer $MAVI_KEY"MarineTraffic Ports API questions
What you get, what it costs and how to call it.
What does the MarineTraffic Ports API return?
Ports, anchorages and offshore terminals whose name or UN/LOCODE matches the text, in the site's relevance order (the site returns at most about 12 matches). Each row has the port id, name, type, country, UN/LOCODE, coordinates, size and the name or code it matched on. The response has query, total, count, ports, pagination, fetched_at and age.
Which parameters does the MarineTraffic Ports API take?
Every parameter of GET /ports is optional. You can pass query.
How much does one MarineTraffic Ports API call cost?
One successful call costs 5 credits. A failed call costs nothing. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. 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 Ports API?
Send an HTTPS GET request to https://api.maviapi.com/v1/sites/marinetraffic/ports with your API key in the Authorization header, as in the example request on this page. Create a key on your API keys page, or try the endpoint first in the console with the free test key.
Is the MarineTraffic Ports API official?
No. It is an independent, hosted API from maviapi for the public data on marinetraffic.com, and it is not made, endorsed or supported by MarineTraffic. Its parameters and response fields are documented on this page.