Skip to content

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.

GEThttps://api.maviapi.com/v1/sites/marinetraffic/ports5 credits per call

Parameters

NameRequiredExampleDescription
querystring in queryOptionalrotterdamport name (at least 3 characters) or UN/LOCODE, e.g. "rotterdam" or "NLRTM"

Response fields

querystringe.g."rotterdam"
totalintegere.g.7
countintegere.g.7
portsobject[]11 fields
port_idstringe.g."2036"
namestringe.g."ROTTERDAM"
typestringe.g."Port"
countrystringe.g."NETHERLANDS"
country_codestringe.g."NL"
unlocodestringe.g."NLRTM"
latitudenumbere.g.51.943306
longitudenumbere.g.4.1418123
sizestringe.g."Large"
matched_onstringe.g."ROTTERDAM"
urlstringe.g."https://www.marinetraffic.com/en/ais/details/ports/2036"
paginationobject3 fields
countintegere.g.7
has_morebooleane.g.false
next_cursornull
fetched_atstringe.g."2026-11-27T10:13:03.176Z"
ageintegere.g.0

Example request

Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.

cURL
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.