{"openapi":"3.1.0","info":{"title":"Seaports API","version":"1.0.0","description":"The NGA World Port Index (WPI / Pub 150) as an API — 3,800+ maritime ports across 195 countries. Look up any port by its WPI number (e.g. 31140 → Rotterdam) or UN/LOCODE (e.g. NLRTM); search by name, country, harbor size or water body; or find every port within a radius of any coordinate (great-circle distance). Each record carries the UN/LOCODE, country, coordinates, harbor size and type, channel/anchorage/pier depths, maximum vessel length and draft, plus facility flags (container, oil/LNG terminal, ro-ro, dry dock, …). Ideal for shipping, logistics, maritime and supply-chain tools.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/seaports-api","description":"oanor gateway"}],"tags":[{"name":"Seaports"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/nearby":{"get":{"operationId":"get_v1_nearby","tags":["Seaports"],"summary":"Ports within a radius of a coordinate","description":"","parameters":[{"name":"lat","in":"query","required":false,"description":"Latitude (-90..90)","schema":{"type":"string"},"example":"51.9"},{"name":"lon","in":"query","required":false,"description":"Longitude (-180..180)","schema":{"type":"string"},"example":"4.48"},{"name":"radius_km","in":"query","required":false,"description":"Search radius in km (1-20000, default 200)","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Max results (1-100, default 10)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":10,"total":27,"center":{"lat":51.9,"lon":4.48},"results":[{"id":"31140","name":"Rotterdam","country":"Netherlands","latitude":51.9,"longitude":4.48333,"un_locode":"NL RTM","water_body":"North Sea; North Atlantic Ocean","distance_km":0.2,"harbor_size":"Large","harbor_type":"River (Basins)"},{"id":"31130","name":"Schiedam","country":"Netherlands","latitude":51.9,"longitude":4.4,"un_locode":"NL SCI","water_body":"North Sea; North Atlantic Ocean","distance_km":5.5,"harbor_size":"Very Small","harbor_type":"River (Basins)"},{"id":"31120","name":"Vlaardingen","country":"Netherlands","latitude":51.9,"longitude":4.35,"un_locode":"NL VLA","water_body":"North Sea; North Atlantic Ocean","distance_km":8.9,"harbor_size":"Very Small","harbor_type":"River (Basins)"},{"id":"31150","name":"Dordrecht","country":"Netherlands","latitude":51.81667,"longitude":4.65,"un_locode":"NL DOR","water_body":"North Sea; North Atlantic Ocean","distance_km":14.9,"harbor_size":"Medium","harbor_type":"River (Natural)"},{"id":"31100","name":"Maassluis","country":"Netherlands","latitude":51.91667,"longitude":4.25,"un_locode":"NL MSL","water_body":"North Sea; North Atlantic Ocean","distance_km":15.9,"harbor_size":"Very Small","harbor_type":"Canal or Lake"},{"id":"31080","name":"Hoek Van Holland","country":"Netherlands","latitude":51.95,"longitude":4.13333,"un_locode":"NL HVH","water_body":"North Sea; North Atlantic Ocean","distance_km":24.4,"harbor_size":"Very Small","harbor_type":"River (Basins)"},{"id":"31085","name":"Europoort","country":"Netherlands","latitude":51.95,"longitude":4.11667,"un_locode":"NL EUR","water_body":"North Sea; North Atlantic Ocean","distance_km":25.5,"harbor_size":"Medium","harbor_type":"Canal or Lake"},{"id":"31070","name":"Scheveningen","country":"Netherlands","latitude":52.1,"longitude":4.26667,"un_locode":"NL SCE","water_body":"North Sea; North Atlantic Ocean","distance_km":26.6,"harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"31060","name":"Amsterdam","country":"Netherlands","latitude":52.36667,"longitude":4.9,"un_locode":"NL AMS","water_body":"North Sea; North Atlantic Ocean","distance_km":59.3,"harbor_size":"Large","harbor_type":"Canal or Lake"},{"id":"31215","name":"Hansweert","country":"Netherlands","latitude":51.45,"longitude":4,"un_locode":"NL HAN","water_body":"North Sea; North Atlantic Ocean","distance_km":60,"harbor_size":"Very Small","harbor_type":"Coastal (Tide Gates)"}],"radius_km":200},"meta":{"timestamp":"2026-05-31T03:55:45.055Z","request_id":"96561864-7223-424c-8eae-11a5031ee97b"},"status":"ok","message":"Nearby ports listed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/port":{"get":{"operationId":"get_v1_port","tags":["Seaports"],"summary":"A single port by WPI number or UN/LOCODE","description":"","parameters":[{"name":"id","in":"query","required":false,"description":"World Port Index number, e.g. 31140 (Rotterdam)","schema":{"type":"string"},"example":"31140"},{"name":"locode","in":"query","required":false,"description":"UN/LOCODE, e.g. NLRTM","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"id":"31140","name":"Rotterdam","region":"Netherlands","country":"Netherlands","shelter":"Fair","latitude":51.9,"longitude":4.48333,"un_locode":"NL RTM","facilities":{"medical":true,"wharves":true,"dry_dock":true},"water_body":"North Sea; North Atlantic Ocean","harbor_size":"Large","harbor_type":"River (Basins)","channel_depth_m":11,"anchorage_depth_m":11,"cargo_pier_depth_m":6.4,"pilotage_compulsory":true},"meta":{"timestamp":"2026-05-31T03:55:45.123Z","request_id":"1cfeba99-f4fb-4df2-9340-3f7e847b8995"},"status":"ok","message":"Port retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/search":{"get":{"operationId":"get_v1_search","tags":["Seaports"],"summary":"Search by name with country / harbor-size / water-body filters","description":"","parameters":[{"name":"q","in":"query","required":false,"description":"Name search, e.g. rotterdam","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Country, e.g. Spain","schema":{"type":"string"},"example":"Spain"},{"name":"harbor_size","in":"query","required":false,"description":"Very Small | Small | Medium | Large","schema":{"type":"string"}},{"name":"water_body","in":"query","required":false,"description":"Water body substring, e.g. Mediterranean","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Results per page (1-100, default 20)","schema":{"type":"string"},"example":"20"},{"name":"offset","in":"query","required":false,"description":"Pagination offset","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":20,"limit":20,"total":52,"offset":0,"filters":{"country":"spain"},"results":[{"id":"38420","name":"Hornillo","country":"Spain","latitude":37.4,"longitude":-1.55,"water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Natural)"},{"id":"37770","name":"La Coruna","country":"Spain","latitude":43.36667,"longitude":-8.4,"un_locode":"ES LCG","water_body":"North Atlantic Ocean","harbor_size":"Small","harbor_type":"Coastal (Natural)"},{"id":"38440","name":"Alicante","country":"Spain","latitude":38.33333,"longitude":-0.48333,"un_locode":"ES ALC","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Medium","harbor_type":"Coastal (Breakwater)"},{"id":"45730","name":"Ceuta","country":"Spain","latitude":35.9,"longitude":-5.31667,"un_locode":"ES CEU","water_body":"Strait of Gibraltar; North Atlantic Ocean","harbor_size":"Medium","harbor_type":"Coastal (Breakwater)"},{"id":"38290","name":"Cadiz","country":"Spain","latitude":36.53333,"longitude":-6.3,"un_locode":"ES CAD","water_body":"North Atlantic Ocean","harbor_size":"Medium","harbor_type":"Coastal (Breakwater)"},{"id":"38220","name":"Huelva","country":"Spain","latitude":37.25,"longitude":-6.95,"un_locode":"ES HUV","water_body":"North Atlantic Ocean","harbor_size":"Medium","harbor_type":"River (Natural)"},{"id":"37740","name":"Ferrol","country":"Spain","latitude":43.48333,"longitude":-8.23333,"un_locode":"ES FRO","water_body":"North Atlantic Ocean","harbor_size":"Medium","harbor_type":"River (Natural)"},{"id":"37560","name":"Gijon","country":"Spain","latitude":43.55,"longitude":-5.66667,"un_locode":"ES GIJ","water_body":"Bay of Biscay; North Atlantic Ocean","harbor_size":"Small","harbor_type":"Coastal (Breakwater)"},{"id":"38310","name":"Algeciras","country":"Spain","latitude":36.13333,"longitude":-5.43333,"un_locode":"ES ALG","water_body":"Strait of Gibraltar; North Atlantic Ocean","harbor_size":"Small","harbor_type":"Coastal (Breakwater)"},{"id":"37600","name":"Aviles","country":"Spain","latitude":43.6,"longitude":-5.93333,"un_locode":"ES AVS","water_body":"Bay of Biscay; North Atlantic Ocean","harbor_size":"Small","harbor_type":"Canal or Lake"},{"id":"38375","name":"Motril","country":"Spain","latitude":36.75,"longitude":-3.51667,"un_locode":"ES MOT","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"38390","name":"Almeria","country":"Spain","latitude":36.83333,"longitude":-2.46667,"un_locode":"ES LEI","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Small","harbor_type":"Coastal (Breakwater)"},{"id":"38500","name":"El Grao","country":"Spain","latitude":39.96667,"longitude":0.01667,"un_locode":"ES GCS","water_body":"Balearic Sea; Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"38610","name":"Ibiza","country":"Spain","latitude":38.9,"longitude":1.45,"un_locode":"ES IBZ","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"37350","name":"Bermeo","country":"Spain","latitude":43.41667,"longitude":-2.71667,"un_locode":"ES BRM","water_body":"Bay of Biscay; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"38380","name":"Adra","country":"Spain","latitude":36.73333,"longitude":-3.03333,"un_locode":"ES ADR","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"38410","name":"Aguilas","country":"Spain","latitude":37.4,"longitude":-1.56667,"un_locode":"ES AGU","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Natural)"},{"id":"38460","name":"Puerto De Gandia","country":"Spain","latitude":39,"longitude":-0.15,"un_locode":"ES GAN","water_body":"Balearic Sea; Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"},{"id":"37470","name":"Santander","country":"Spain","latitude":43.46667,"longitude":-3.78333,"un_locode":"ES SDR","water_body":"Bay of Biscay; North Atlantic Ocean","harbor_size":"Medium","harbor_type":"River (Natural)"},{"id":"38435","name":"Torrevieja","country":"Spain","latitude":37.96667,"longitude":-0.68333,"un_locode":"ES TOR","water_body":"Mediterranean Sea; North Atlantic Ocean","harbor_size":"Very Small","harbor_type":"Coastal (Breakwater)"}]},"meta":{"timestamp":"2026-05-31T03:55:45.194Z","request_id":"9fe8d2dd-21f7-4419-96f6-18665096d8e3"},"status":"ok","message":"Ports listed","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Totals & harbor-size breakdown","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"id = World Port Index number. Depths/sizes in metres. Facility flags may be null when unsurveyed.","total":3804,"fields":["id","name","alt_name","un_locode","country","region","water_body","latitude","longitude","harbor_size","harbor_type","harbor_use","shelter","channel_depth_m","anchorage_depth_m","cargo_pier_depth_m","max_vessel_length_m","max_vessel_draft_m","facilities","pilotage_compulsory"],"source":"NGA World Port Index (WPI / Pub 150)","countries":195,"with_locode":3345,"harbor_sizes":[{"size":"Very Small","count":2114},{"size":"Small","count":1017},{"size":"Medium","count":370},{"size":"Large","count":174}]},"meta":{"timestamp":"2026-05-31T03:55:45.262Z","request_id":"d0f1caf8-4cbe-4401-9fa7-b44b25ca88cd"},"status":"ok","message":"Meta retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":3000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":650,"monthly_call_quota":45000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1650,"monthly_call_quota":250000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4300,"monthly_call_quota":1200000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/seaports-api"}