Seaports API
TransportationMAINTAINED1 token / call

Seaports API

3,805 seaports in 195 countries from the NGA World Port Index: depths, vessel limits, facilities and UN/LOCODE

Every seaport on Earth, from the mariner's reference. The NGA World Port Index (Pub 150, public domain): 3,805 ports in 195 countries, each with UN/LOCODE, coordinates, harbor size and type, shelter quality, tidal range, channel/anchorage/pier depths, maximum vessel dimensions, first-port-of-entry and compulsory-pilotage flags, tug availability, repair and drydock capability, plus normalized facility lists (container, ro-ro, liquid bulk, cranes, medical, railway...) and ship-supply availability (fuel oil, provisions, potable water...). Look Rotterdam up as NLRTM (large river-basin harbor, 11 m channel, compulsory pilotage, major repairs), filter for container-capable ports with 15+ m channels (83 worldwide), find the nearest port to any coordinate (San Pedro β†’ Port of Los Angeles, 2.2 km), or count ports per country (US: 666, 21 of them large). UN/LOCODEs are normalized whether or not the source spaced them. Shipping and logistics software, freight platforms, marine insurance, cruise tools and supply-chain risk β€” pairs with our Tides, Buoys and Tariff Codes APIs for the full maritime picture.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "ok": true,
  "port": {
    "id": 31140,
    "name": "Rotterdam",
    "alt_name": null,
    "unlocode": "NLRTM",
    "country": "Netherlands",
    "region": "Netherlands -- 30980",
    "water_body": "North Sea; North Atlantic Ocean",
    "lat": 51.9,
    "lng": 4.4833,
    "harbor_size": "Large",
    "harbor_type": "River (Basins)",
    "shelter": "Fair",
    "tidal_range_m": 1,
    "channel_depth_m": 11,
    "anchorage_depth_m": 11,
    "cargo_pier_depth_m": 6.4,
    "max_vessel_length_m": 0,
    "max_vessel_beam_m": 0,
    "max_vessel_draft_m": 0,
    "first_port_of_entry": true,
    "pilotage_compulsory": true,
    "tugs_assistance": true,
    "repairs": "Major",
    "drydock": null,
    "facilities": [
      "wharves",
      "cranes_fixed",
      "cranes_mobile",
      "cranes_floating",
      "medical",
      "garbage_disposal"
    ],
    "supplies": [
      "provisions",
      "potable_water",
      "fuel_oil",
      "diesel_oil",
      "deck",
      "engine"
    ]
  }
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform β€” anime, finance, sports, and more.

Use cases for Seaports API

  • Check whether a port can take a vessel by channel depth, pier depth and maximum vessel dimensions.

  • Resolve a UN/LOCODE or port name to coordinates and harbour characteristics in shipping software.

  • Find the nearest ports to a position with the facilities a voyage needs, from drydock to fuel oil.

  • Build port directories with pilotage, tug, repair and first-port-of-entry flags.

Seaports API endpoints

Every endpoint with its parameters and a real example response.

GETData Sources

https://api-seaports.dataandapis.com/v1/sources

This endpoint takes no parameters.

Example request

curl "https://api-seaports.dataandapis.com/v1/sources" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "sources": [
    {
      "slug": "nga-wpi",
      "name": "World Port Index (Pub 150)",
      "publisher": "US National Geospatial-Intelligence Agency",
      "licence": "US government work (public domain)",
      "source_url": "https://msi.nga.mil/Publications/WPI",
      "file_url": "https://msi.nga.mil/api/publications/download?key=16920959/SFH00000/UpdatedPub150.csv&type=view",
      "cadence": "updated periodically by NGA; occasional re-scrape",
      "record_count": 3805,
      "retrieved_at": "2026-09-06"
    }
  ]
}

GETNearest Ports

https://api-seaports.dataandapis.com/v1/seaports/nearest

Query parameters

ParameterExample
lat33.74Required
lng-118.27Required

Example request

curl "https://api-seaports.dataandapis.com/v1/seaports/nearest?lat=33.74&lng=-118.27" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "query": {
    "lat": 33.74,
    "lng": -118.27
  },
  "ports": [
    {
      "id": 16080,
      "name": "Los Angeles",
      "alt_name": "San Pedro; Terminal Island; Wilmington",
      "unlocode": "USLAX",
      "country": "United States",
      "region": "United States W Coast -- 16000",
      "water_body": "North Pacific Ocean",
      "lat": 33.75,
      "lng": -118.25,
      "harbor_size": "Large",
      "harbor_type": "Coastal (Breakwater)",
      "shelter": "Excellent",
      "tidal_range_m": 2.7,
      "channel_depth_m": 16.1,
      "anchorage_depth_m": 9.4,
      "cargo_pier_depth_m": 16.8,
      "max_vessel_length_m": 400,
      "max_vessel_beam_m": 61.2,
      "max_vessel_draft_m": 15,
      "first_port_of_entry": true,
…
Show full response
{
  "ok": true,
  "query": {
    "lat": 33.74,
    "lng": -118.27
  },
  "ports": [
    {
      "id": 16080,
      "name": "Los Angeles",
      "alt_name": "San Pedro; Terminal Island; Wilmington",
      "unlocode": "USLAX",
      "country": "United States",
      "region": "United States W Coast -- 16000",
      "water_body": "North Pacific Ocean",
      "lat": 33.75,
      "lng": -118.25,
      "harbor_size": "Large",
      "harbor_type": "Coastal (Breakwater)",
      "shelter": "Excellent",
      "tidal_range_m": 2.7,
      "channel_depth_m": 16.1,
      "anchorage_depth_m": 9.4,
      "cargo_pier_depth_m": 16.8,
      "max_vessel_length_m": 400,
      "max_vessel_beam_m": 61.2,
      "max_vessel_draft_m": 15,
      "first_port_of_entry": true,
      "pilotage_compulsory": true,
      "tugs_assistance": true,
      "repairs": "Major",
      "drydock": null,
      "facilities": [
        "wharves",
        "anchorage",
        "roro",
        "solid_bulk",
        "liquid_bulk",
        "container",
        "breakbulk",
        "oil_terminal",
        "cranes_fixed",
        "cranes_mobile",
        "cranes_floating",
        "medical",
        "garbage_disposal"
      ],
      "supplies": [
        "provisions",
        "potable_water",
        "fuel_oil",
        "diesel_oil",
        "deck",
        "engine"
      ],
      "distance_km": 2.2
    },
    {
      "id": 16070,
      "name": "Long Beach",
      "alt_name": null,
      "unlocode": "USLGB",
      "country": "United States",
      "region": "United States W Coast -- 16000",
      "water_body": "North Pacific Ocean",
      "lat": 33.7667,
      "lng": -118.1833,
      "harbor_size": "Medium",
      "harbor_type": "Coastal (Breakwater)",
      "shelter": "Excellent",
      "tidal_range_m": 1.2,
      "channel_depth_m": 23.2,
      "anchorage_depth_m": 11,
      "cargo_pier_depth_m": 16.8,
      "max_vessel_length_m": 400,
      "max_vessel_beam_m": 61,
      "max_vessel_draft_m": 22.1,
      "first_port_of_entry": true,
      "pilotage_compulsory": true,
      "tugs_assistance": true,
      "repairs": "Major",
      "drydock": null,
      "facilities": [
        "wharves",
        "anchorage",
        "roro",
        "solid_bulk",
        "liquid_bulk",
        "container",
        "breakbulk",
        "cranes_fixed",
        "cranes_mobile",
        "cranes_floating",
        "medical",
        "garbage_disposal"
      ],
      "supplies": [
        "provisions",
        "potable_water",
        "fuel_oil",
        "diesel_oil",
        "deck",
        "engine"
      ],
      "distance_km": 8.5
    },
    {
      "id": 16110,
      "name": "El Segundo",
      "alt_name": null,
      "unlocode": "USELS",
      "country": "United States",
      "region": "United States W Coast -- 16000",
      "water_body": "North Pacific Ocean",
      "lat": 33.9167,
      "lng": -118.4333,
      "harbor_size": "Very Small",
      "harbor_type": "Open Roadstead",
      "shelter": "Fair",
      "tidal_range_m": 1.8,
      "channel_depth_m": 4.9,
      "anchorage_depth_m": 0,
      "cargo_pier_depth_m": 0,
      "max_vessel_length_m": 0,
      "max_vessel_beam_m": 0,
      "max_vessel_draft_m": 0,
      "first_port_of_entry": false,
      "pilotage_compulsory": true,
      "tugs_assistance": false,
      "repairs": null,
      "drydock": null,
      "facilities": [
        "wharves",
        "anchorage",
        "medical"
      ],
      "supplies": [
        "provisions"
      ],
      "distance_km": 24.8
    }
  ]
}

GETPort Detail

https://api-seaports.dataandapis.com/v1/seaports/{key}

Path parameters

ParameterExample
keyNLRTMRequired

Example request

curl "https://api-seaports.dataandapis.com/v1/seaports/NLRTM" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "port": {
    "id": 31140,
    "name": "Rotterdam",
    "alt_name": null,
    "unlocode": "NLRTM",
    "country": "Netherlands",
    "region": "Netherlands -- 30980",
    "water_body": "North Sea; North Atlantic Ocean",
    "lat": 51.9,
    "lng": 4.4833,
    "harbor_size": "Large",
    "harbor_type": "River (Basins)",
    "shelter": "Fair",
    "tidal_range_m": 1,
    "channel_depth_m": 11,
    "anchorage_depth_m": 11,
    "cargo_pier_depth_m": 6.4,
    "max_vessel_length_m": 0,
    "max_vessel_beam_m": 0,
    "max_vessel_draft_m": 0,
    "first_port_of_entry": true,
    "pilotage_compulsory": true,
    "tugs_assistance": true,
    "repairs": "Major",
    "drydock": null,
    "facilities": [
…
Show full response
{
  "ok": true,
  "port": {
    "id": 31140,
    "name": "Rotterdam",
    "alt_name": null,
    "unlocode": "NLRTM",
    "country": "Netherlands",
    "region": "Netherlands -- 30980",
    "water_body": "North Sea; North Atlantic Ocean",
    "lat": 51.9,
    "lng": 4.4833,
    "harbor_size": "Large",
    "harbor_type": "River (Basins)",
    "shelter": "Fair",
    "tidal_range_m": 1,
    "channel_depth_m": 11,
    "anchorage_depth_m": 11,
    "cargo_pier_depth_m": 6.4,
    "max_vessel_length_m": 0,
    "max_vessel_beam_m": 0,
    "max_vessel_draft_m": 0,
    "first_port_of_entry": true,
    "pilotage_compulsory": true,
    "tugs_assistance": true,
    "repairs": "Major",
    "drydock": null,
    "facilities": [
      "wharves",
      "cranes_fixed",
      "cranes_mobile",
      "cranes_floating",
      "medical",
      "garbage_disposal"
    ],
    "supplies": [
      "provisions",
      "potable_water",
      "fuel_oil",
      "diesel_oil",
      "deck",
      "engine"
    ]
  }
}

GETPorts By Country

https://api-seaports.dataandapis.com/v1/seaports/stats

This endpoint takes no parameters.

Example request

curl "https://api-seaports.dataandapis.com/v1/seaports/stats" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "by": "country",
  "stats": [
    {
      "group": "United States",
      "ports": 666,
      "large": 21
    },
    {
      "group": "Canada",
      "ports": 285,
      "large": 4
    },
    {
      "group": "United Kingdom",
      "ports": 186,
      "large": 7
    },
    {
      "group": "Japan",
      "ports": 163,
      "large": 11
    },
    {
      "group": "Norway",
      "ports": 141,
      "large": 1
…
Show full response
{
  "ok": true,
  "by": "country",
  "stats": [
    {
      "group": "United States",
      "ports": 666,
      "large": 21
    },
    {
      "group": "Canada",
      "ports": 285,
      "large": 4
    },
    {
      "group": "United Kingdom",
      "ports": 186,
      "large": 7
    },
    {
      "group": "Japan",
      "ports": 163,
      "large": 11
    },
    {
      "group": "Norway",
      "ports": 141,
      "large": 1
    },
    {
      "group": "Indonesia",
      "ports": 123,
      "large": 3
    },
    {
      "group": "Italy",
      "ports": 123,
      "large": 12
    },
    {
      "group": "Sweden",
      "ports": 92,
      "large": 3
    },
    {
      "group": "Philippines",
      "ports": 71,
      "large": 2
    },
    {
      "group": "Denmark",
      "ports": 69,
      "large": 1
    },
    {
      "group": "Russia",
      "ports": 68,
      "large": 4
    },
    {
      "group": "Australia",
      "ports": 66,
      "large": 5
    },
    {
      "group": "China",
      "ports": 66,
      "large": 5
    },
    {
      "group": "France",
      "ports": 66,
      "large": 6
    },
    {
      "group": "Greece",
      "ports": 57,
      "large": 1
    },
    {
      "group": "India",
      "ports": 55,
      "large": 4
    },
    {
      "group": "Turkey",
      "ports": 54,
      "large": 3
    },
    {
      "group": "Spain",
      "ports": 52,
      "large": 3
    },
    {
      "group": "Brazil",
      "ports": 45,
      "large": 4
    },
    {
      "group": "Iceland",
      "ports": 42,
      "large": 0
    },
    {
      "group": "Chile",
      "ports": 39,
      "large": 0
    },
    {
      "group": "Argentina",
      "ports": 37,
      "large": 1
    },
    {
      "group": "Finland",
      "ports": 37,
      "large": 5
    },
    {
      "group": "Germany",
      "ports": 36,
      "large": 5
    },
    {
      "group": "Malaysia",
      "ports": 35,
      "large": 3
    },
    {
      "group": "Mexico",
      "ports": 35,
      "large": 0
    },
    {
      "group": "Cuba",
      "ports": 34,
      "large": 6
    },
    {
      "group": "Egypt",
      "ports": 32,
      "large": 5
    },
    {
      "group": "Venezuela",
      "ports": 31,
      "large": 1
    },
    {
      "group": "Nigeria",
      "ports": 27,
      "large": 2
    },
    {
      "group": "Ukraine",
      "ports": 26,
      "large": 3
    },
    {
      "group": "Greenland",
      "ports": 23,
      "large": 0
    },
    {
      "group": "New Zealand",
      "ports": 22,
      "large": 2
    },
    {
      "group": "Papua New Guinea",
      "ports": 22,
      "large": 0
    },
    {
      "group": "Angola",
      "ports": 21,
      "large": 0
    },
    {
      "group": "Ireland",
      "ports": 21,
      "large": 1
    },
    {
      "group": "Thailand",
      "ports": 21,
      "large": 1
    },
    {
      "group": "Peru",
      "ports": 20,
      "large": 0
    },
    {
      "group": "United Arab Emirates",
      "ports": 20,
      "large": 1
    },
    {
      "group": "Estonia",
      "ports": 19,
      "large": 4
    },
    {
      "group": "Iran",
      "ports": 18,
      "large": 0
    },
    {
      "group": "Netherlands",
      "ports": 18,
      "large": 2
    },
    {
      "group": "Portugal",
      "ports": 18,
      "large": 3
    },
    {
      "group": "Algeria",
      "ports": 17,
      "large": 2
    },
    {
      "group": "Dominican Republic",
      "ports": 17,
      "large": 0
    },
    {
      "group": "Croatia",
      "ports": 16,
      "large": 2
    },
    {
      "group": "Saudi Arabia",
      "ports": 16,
      "large": 0
    },
    {
      "group": "Tunisia",
      "ports": 16,
      "large": 0
    },
    {
      "group": "Vietnam",
      "ports": 16,
      "large": 0
    },
    {
      "group": "Colombia",
      "ports": 14,
      "large": 0
    },
    {
      "group": "Libya",
      "ports": 14,
      "large": 0
    },
    {
      "group": "Puerto Rico",
      "ports": 14,
      "large": 0
    },
    {
      "group": "South Korea",
      "ports": 14,
      "large": 2
    },
    {
      "group": "Madagascar",
      "ports": 13,
      "large": 0
    },
    {
      "group": "Morocco",
      "ports": 12,
      "large": 3
    },
    {
      "group": "Panama",
      "ports": 12,
      "large": 0
    },
    {
      "group": "Jamaica",
      "ports": 11,
      "large": 0
    },
    {
      "group": "Mozambique",
      "ports": 11,
      "large": 0
    },
    {
      "group": "Romania",
      "ports": 11,
      "large": 0
    },
    {
      "group": "Gabon",
      "ports": 10,
      "large": 0
    }
  ]
}

GETSearch Ports

https://api-seaports.dataandapis.com/v1/seaports

Query parameters

ParameterExample
countryNetherlandsOptional
facilityOptional
harbor_sizeLargeOptional
min_channel_depth_mOptional
qrotterdamOptional

Example request

curl "https://api-seaports.dataandapis.com/v1/seaports?country=Netherlands&harbor_size=Large&q=rotterdam" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "ok": true,
  "page": 1,
  "limit": 25,
  "total": 1,
  "total_pages": 1,
  "ports": [
    {
      "id": 31140,
      "name": "Rotterdam",
      "alt_name": null,
      "unlocode": "NLRTM",
      "country": "Netherlands",
      "region": "Netherlands -- 30980",
      "water_body": "North Sea; North Atlantic Ocean",
      "lat": 51.9,
      "lng": 4.4833,
      "harbor_size": "Large",
      "harbor_type": "River (Basins)",
      "shelter": "Fair",
      "tidal_range_m": 1,
      "channel_depth_m": 11,
      "anchorage_depth_m": 11,
      "cargo_pier_depth_m": 6.4,
      "max_vessel_length_m": 0,
      "max_vessel_beam_m": 0,
      "max_vessel_draft_m": 0,
      "first_port_of_entry": true,
…
Show full response
{
  "ok": true,
  "page": 1,
  "limit": 25,
  "total": 1,
  "total_pages": 1,
  "ports": [
    {
      "id": 31140,
      "name": "Rotterdam",
      "alt_name": null,
      "unlocode": "NLRTM",
      "country": "Netherlands",
      "region": "Netherlands -- 30980",
      "water_body": "North Sea; North Atlantic Ocean",
      "lat": 51.9,
      "lng": 4.4833,
      "harbor_size": "Large",
      "harbor_type": "River (Basins)",
      "shelter": "Fair",
      "tidal_range_m": 1,
      "channel_depth_m": 11,
      "anchorage_depth_m": 11,
      "cargo_pier_depth_m": 6.4,
      "max_vessel_length_m": 0,
      "max_vessel_beam_m": 0,
      "max_vessel_draft_m": 0,
      "first_port_of_entry": true,
      "pilotage_compulsory": true,
      "tugs_assistance": true,
      "repairs": "Major",
      "drydock": null,
      "facilities": [
        "wharves",
        "cranes_fixed",
        "cranes_mobile",
        "cranes_floating",
        "medical",
        "garbage_disposal"
      ],
      "supplies": [
        "provisions",
        "potable_water",
        "fuel_oil",
        "diesel_oil",
        "deck",
        "engine"
      ]
    }
  ]
}

Where the data comes from

Source
NGA World Port Index, Publication 150 (public domain).
Freshness
Reloaded with each NGA publication.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
5endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses β€” auto-completion in your IDE
  • Tracks the API in lockstep β€” new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-seaports.dataandapis.com/v1/sources',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Seaports API Β· X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key
import axios from 'axios';

const url = 'https://api-seaports.dataandapis.com/v1/sources';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time β€” we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales β†’

Questions about Seaports API

Ship Seaports API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.