Skip to content
Navo24 Navo24
GETAPI key

Find a port

GETapi.navo24.com/v1/distance/ports

Search ports by name or UN/LOCODE prefix. Ports on the routing network come first, then other UN/LOCODE seaports.

Query parameters

qstringrequired

At least 2 characters: part of a name, or a UN/LOCODE prefix.

limitinteger

1 to 100, default 20.

Response schema

8 fields

Derived from the example response, nested as the JSON is.

dataobject[]

The payload. Everything an endpoint returns sits under this key.

data[]object
locodestring

UN/LOCODE of the place.

namestring

Human-readable name.

countrystring

Country name.

country_codestring

ISO 3166-1 alpha-2 country code.

latnumber

Latitude.

lngnumber

Longitude.

sourcestring

Where the answer on this call came from: direct_carrier or warm_db.

Errors

A failure answers with an HTTP error status and { "error": { "code", "message" } }. Branch on the code, and log the message.

invalid_request400

q is shorter than 2 characters or limit is not an integer.

curl 'https://api.navo24.com/v1/distance/ports?q=rotter&limit=2' \
  -H "Authorization: Bearer tmcp_YOUR_API_KEY"
Response
{
  "data": [
    {
      "locode": "NLRTM",
      "name": "Rotterdam",
      "country": "Netherlands",
      "country_code": "NL",
      "lat": 51.90438,
      "lng": 4.44245,
      "source": "network"
    },
    {
      "locode": "USRAJ",
      "name": "Rotterdam",
      "country": "United States",
      "country_code": "US",
      "lat": 42.78333,
      "lng": -73.96667,
      "source": "unlocode"
    }
  ]
}