{"openapi":"3.1.0","info":{"title":"Seaports API","version":"1.0.0","description":"Search a database of 17,000+ seaports worldwide from UN/LOCODE. Find ports by name and country, look one up by its UN/LOCODE, or find all ports near a coordinate (radius search). Each record includes the UN/LOCODE, coordinates, country and connected transport modes (rail, road, airport) — ideal for shipping, freight, supply-chain and logistics applications.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/ports-api","description":"oanor gateway"}],"tags":[{"name":"Ports"},{"name":"Countries"},{"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":["Ports"],"summary":"Seaports near a coordinate (radius search)","description":"","parameters":[{"name":"lat","in":"query","required":true,"description":"Latitude (-90..90)","schema":{"type":"string"},"example":"53.55"},{"name":"lon","in":"query","required":true,"description":"Longitude (-180..180)","schema":{"type":"string"},"example":"9.99"},{"name":"radius_km","in":"query","required":false,"description":"Search radius in km (1-5000, default 200)","schema":{"type":"string"},"example":"100"},{"name":"limit","in":"query","required":false,"description":"Max results (1-100, default 20)","schema":{"type":"string"},"example":"20"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":20,"center":{"lat":53.55,"lon":9.99},"results":[{"name":"Hamburg-Mitte","locode":"DEHTJ","country":"DE","latitude":53.55,"longitude":10.0167,"connections":{"rail":false,"road":true,"airport":false},"distance_km":1.76,"subdivision":"HH","country_name":"Germany"},{"name":"Hamburg","locode":"DEHAM","country":"DE","latitude":53.5167,"longitude":9.9333,"connections":{"rail":true,"road":true,"airport":true},"distance_km":5.27,"subdivision":"HH","country_name":"Germany"},{"name":"Altenwerder","locode":"DEHHV","country":"DE","latitude":53.5167,"longitude":9.9167,"connections":{"rail":false,"road":true,"airport":false},"distance_km":6.1,"subdivision":"HH","country_name":"Germany"},{"name":"Harburg","locode":"DEHBU","country":"DE","latitude":53.4667,"longitude":9.9833,"connections":{"rail":false,"road":false,"airport":false},"distance_km":9.27,"subdivision":"HH","country_name":"Germany"},{"name":"Finkenwerder","locode":"DEXFW","country":"DE","latitude":53.5333,"longitude":9.85,"connections":{"rail":false,"road":true,"airport":true},"distance_km":9.44,"subdivision":"HH","country_name":"Germany"},{"name":"Bullenhausen","locode":"DEBEU","country":"DE","latitude":53.45,"longitude":10.0833,"connections":{"rail":false,"road":true,"airport":false},"distance_km":12.72,"subdivision":"NI","country_name":"Germany"},{"name":"Oortkaten","locode":"DEOTK","country":"DE","latitude":53.4333,"longitude":10.1,"connections":{"rail":false,"road":true,"airport":false},"distance_km":14.88,"subdivision":"HH","country_name":"Germany"},{"name":"Schulau","locode":"DECHL","country":"DE","latitude":53.5833,"longitude":9.7,"connections":{"rail":true,"road":true,"airport":false},"distance_km":19.51,"subdivision":"SH","country_name":"Germany"},{"name":"Hoopte","locode":"DEHPE","country":"DE","latitude":53.4,"longitude":10.1667,"connections":{"rail":false,"road":true,"airport":false},"distance_km":20.37,"subdivision":"NI","country_name":"Germany"},{"name":"Buxtehude","locode":"DEBUX","country":"DE","latitude":53.45,"longitude":9.7,"connections":{"rail":true,"road":true,"airport":false},"distance_km":22.17,"subdivision":"NI","country_name":"Germany"},{"name":"Haseldorf","locode":"DEHLO","country":"DE","latitude":53.6333,"longitude":9.6,"connections":{"rail":false,"road":true,"airport":false},"distance_km":27.36,"subdivision":"SH","country_name":"Germany"},{"name":"Stader Sand","locode":"DESTS","country":"DE","latitude":53.6333,"longitude":9.5167,"connections":{"rail":false,"road":true,"airport":false},"distance_km":32.58,"subdivision":"NI","country_name":"Germany"},{"name":"Stade","locode":"DESTA","country":"DE","latitude":53.6,"longitude":9.4833,"connections":{"rail":true,"road":true,"airport":false},"distance_km":33.91,"subdivision":"NI","country_name":"Germany"},{"name":"Handeloh","locode":"DEXZS","country":"DE","latitude":53.25,"longitude":9.8333,"connections":{"rail":false,"road":false,"airport":false},"distance_km":34.94,"subdivision":"NI","country_name":"Germany"},{"name":"Abbenfleth","locode":"DEABF","country":"DE","latitude":53.6667,"longitude":9.4833,"connections":{"rail":false,"road":true,"airport":false},"distance_km":35.86,"subdivision":"NI","country_name":"Germany"},{"name":"Bützfleth","locode":"DEBUZ","country":"DE","latitude":53.6667,"longitude":9.4833,"connections":{"rail":false,"road":true,"airport":false},"distance_km":35.86,"subdivision":"NI","country_name":"Germany"},{"name":"Barnkrug","locode":"DEBRK","country":"DE","latitude":53.6833,"longitude":9.4667,"connections":{"rail":false,"road":true,"airport":false},"distance_km":37.56,"subdivision":"NI","country_name":"Germany"},{"name":"Altengörs","locode":"DESH4","country":"DE","latitude":53.9,"longitude":10.2,"connections":{"rail":false,"road":false,"airport":false},"distance_km":41.3,"subdivision":"SH","country_name":"Germany"},{"name":"Lauenburg/Elbe","locode":"DELNU","country":"DE","latitude":53.3667,"longitude":10.5667,"connections":{"rail":true,"road":true,"airport":false},"distance_km":43.28,"subdivision":"SH","country_name":"Germany"},{"name":"Drochtersen","locode":"DEDRO","country":"DE","latitude":53.7,"longitude":9.3833,"connections":{"rail":false,"road":true,"airport":false},"distance_km":43.35,"subdivision":"NI","country_name":"Germany"}],"radius_km":100},"meta":{"timestamp":"2026-05-31T00:48:52.076Z","request_id":"b80d1094-7be1-4d9d-a040-e97054ed9663"},"status":"ok","message":"Nearby ports 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/port":{"get":{"operationId":"get_v1_port","tags":["Ports"],"summary":"A single seaport by UN/LOCODE","description":"","parameters":[{"name":"locode","in":"query","required":true,"description":"5-character UN/LOCODE","schema":{"type":"string"},"example":"NLRTM"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Rotterdam","locode":"NLRTM","country":"NL","latitude":51.9167,"longitude":4.5,"connections":{"rail":true,"road":true,"airport":true},"subdivision":"ZH","country_name":"The Netherlands"},"meta":{"timestamp":"2026-05-31T00:48:52.150Z","request_id":"4b138d12-338c-4060-b39d-a9a055c1902f"},"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":["Ports"],"summary":"Search seaports by name and country","description":"","parameters":[{"name":"q","in":"query","required":false,"description":"Port name or UN/LOCODE (substring)","schema":{"type":"string"},"example":"rotterdam"},{"name":"country","in":"query","required":false,"description":"Filter by ISO-2 country code","schema":{"type":"string"},"example":"NL"},{"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":1,"limit":20,"total":1,"offset":0,"filters":{"q":"rotterdam","country":"NL"},"results":[{"name":"Rotterdam","locode":"NLRTM","country":"NL","latitude":51.9167,"longitude":4.5,"connections":{"rail":true,"road":true,"airport":true},"subdivision":"ZH","country_name":"The Netherlands"}]},"meta":{"timestamp":"2026-05-31T00:48:52.223Z","request_id":"3484e989-50ff-4019-9432-28831a25338e"},"status":"ok","message":"Search completed","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/countries":{"get":{"operationId":"get_v1_countries","tags":["Countries"],"summary":"Countries with seaport counts","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":232,"countries":[{"ports":1765,"country":"US"},{"ports":1562,"country":"JP"},{"ports":1350,"country":"GB"},{"ports":879,"country":"DE"},{"ports":808,"country":"FR"},{"ports":765,"country":"CN"},{"ports":741,"country":"NO"},{"ports":580,"country":"CA"},{"ports":531,"country":"NL"},{"ports":484,"country":"BE"},{"ports":432,"country":"ES"},{"ports":377,"country":"AU"},{"ports":377,"country":"PH"},{"ports":358,"country":"GR"},{"ports":327,"country":"IT"},{"ports":317,"country":"SE"},{"ports":297,"country":"ID"},{"ports":282,"country":"IN"},{"ports":259,"country":"RU"},{"ports":239,"country":"DK"},{"ports":231,"country":"FI"},{"ports":221,"country":"EE"},{"ports":206,"country":"BR"},{"ports":176,"country":"MY"},{"ports":170,"country":"HR"},{"ports":142,"country":"TR"},{"ports":132,"country":"VN"},{"ports":131,"country":"IE"},{"ports":123,"country":"PT"},{"ports":111,"country":"AT"},{"ports":110,"country":"MX"},{"ports":105,"country":"CL"},{"ports":105,"country":"CZ"},{"ports":104,"country":"AR"},{"ports":80,"country":"IS"},{"ports":80,"country":"PG"},{"ports":79,"country":"PL"},{"ports":76,"country":"KR"},{"ports":68,"country":"CH"},{"ports":66,"country":"TH"},{"ports":63,"country":"VE"},{"ports":61,"country":"HU"},{"ports":60,"country":"ZA"},{"ports":59,"country":"CR"},{"ports":58,"country":"RO"},{"ports":48,"country":"NZ"},{"ports":44,"country":"AE"},{"ports":43,"country":"IR"},{"ports":43,"country":"PE"},{"ports":41,"country":"EG"},{"ports":41,"country":"NG"},{"ports":39,"country":"CU"},{"ports":38,"country":"PA"},{"ports":38,"country":"SA"},{"ports":36,"country":"AQ"},{"ports":36,"country":"BS"},{"ports":36,"country":"SI"},{"ports":35,"country":"AO"},{"ports":33,"country":"CO"},{"ports":31,"country":"MG"},{"ports":30,"country":"EC"},{"ports":30,"country":"GL"},{"ports":30,"country":"MA"},{"ports":29,"country":"DO"},{"ports":28,"country":"LY"},{"ports":26,"country":"SK"},{"ports":25,"country":"TN"},{"ports":24,"country":"DZ"},{"ports":24,"country":"MM"},{"ports":24,"country":"XZ"},{"ports":23,"country":"BG"},{"ports":23,"country":"FO"},{"ports":23,"country":"TW"},{"ports":22,"country":"IL"},{"ports":22,"country":"IQ"},{"ports":22,"country":"MZ"},{"ports":21,"country":"LK"},{"ports":20,"country":"JM"},{"ports":20,"country":"TZ"},{"ports":19,"country":"MT"},{"ports":19,"country":"SB"},{"ports":18,"country":"PY"},{"ports":18,"country":"TT"},{"ports":18,"country":"UA"},{"ports":17,"country":"MV"},{"ports":17,"country":"OM"},{"ports":17,"country":"YE"},{"ports":16,"country":"LB"},{"ports":16,"country":"LR"},{"ports":16,"country":"NC"},{"ports":16,"country":"PF"},{"ports":15,"country":"FM"},{"ports":15,"country":"GP"},{"ports":15,"country":"RS"},{"ports":15,"country":"SG"},{"ports":15,"country":"UY"},{"ports":14,"country":"CY"},{"ports":14,"country":"FJ"},{"ports":14,"country":"HN"},{"ports":14,"country":"HT"},{"ports":14,"country":"KP"},{"ports":14,"country":"NI"},{"ports":13,"country":"CI"},{"ports":13,"country":"HK"},{"ports":13,"country":"KW"},{"ports":13,"country":"PR"},{"ports":12,"country":"BD"},{"ports":12,"country":"BO"},{"ports":12,"country":"GN"},{"ports":12,"country":"GT"},{"ports":12,"country":"PK"},{"ports":12,"country":"SV"},{"ports":11,"country":"GA"},{"ports":11,"country":"GH"},{"ports":11,"country":"ME"},{"ports":11,"country":"QA"},{"ports":10,"country":"BA"},{"ports":10,"country":"KI"},{"ports":10,"country":"LV"},{"ports":9,"country":"CM"},{"ports":9,"country":"LU"},{"ports":9,"country":"VI"},{"ports":8,"country":"BM"},{"ports":8,"country":"GF"},{"ports":8,"country":"GQ"},{"ports":8,"country":"MQ"},{"ports":8,"country":"SR"},{"ports":8,"country":"SY"},{"ports":8,"country":"VC"},{"ports":7,"country":"AI"},{"ports":7,"country":"AL"},{"ports":7,"country":"CG"},{"ports":7,"country":"GE"},{"ports":7,"country":"GW"},{"ports":7,"country":"IM"},{"ports":7,"country":"KE"},{"ports":7,"country":"RE"},{"ports":7,"country":"SN"},{"ports":7,"country":"SO"},{"ports":7,"country":"VG"},{"ports":6,"country":"AW"},{"ports":6,"country":"AZ"},{"ports":6,"country":"BN"},{"ports":6,"country":"BQ"},{"ports":6,"country":"BY"},{"ports":6,"country":"CD"},{"ports":6,"country":"CK"},{"ports":6,"country":"CW"},{"ports":6,"country":"GY"},{"ports":6,"country":"MU"},{"ports":6,"country":"SL"},{"ports":6,"country":"TC"},{"ports":6,"country":"TM"},{"ports":5,"country":"AG"},{"ports":5,"country":"BH"},{"ports":5,"country":"BZ"},{"ports":5,"country":"KH"},{"ports":5,"country":"LT"},{"ports":5,"country":"SH"},{"ports":5,"country":"ZW"},{"ports":4,"country":"CV"},{"ports":4,"country":"DJ"},{"ports":4,"country":"DM"},{"ports":4,"country":"KM"},{"ports":4,"country":"MK"},{"ports":4,"country":"MR"},{"ports":4,"country":"SJ"},{"ports":4,"country":"SX"},{"ports":4,"country":"TO"},{"ports":4,"country":"VU"},{"ports":4,"country":"YT"},{"ports":3,"country":"AF"},{"ports":3,"country":"BJ"},{"ports":3,"country":"GD"},{"ports":3,"country":"GG"},{"ports":3,"country":"GU"},{"ports":3,"country":"JE"},{"ports":3,"country":"KN"},{"ports":3,"country":"KZ"},{"ports":3,"country":"LC"},{"ports":3,"country":"NA"},{"ports":3,"country":"RW"},{"ports":3,"country":"SC"},{"ports":3,"country":"SD"},{"ports":3,"country":"ST"},{"ports":3,"country":"SZ"},{"ports":3,"country":"TG"},{"ports":3,"country":"TK"},{"ports":3,"country":"UG"},{"ports":3,"country":"UM"},{"ports":3,"country":"WF"},{"ports":2,"country":"AX"},{"ports":2,"country":"BB"},{"ports":2,"country":"BW"},{"ports":2,"country":"ER"},{"ports":2,"country":"FK"},{"ports":2,"country":"GM"},{"ports":2,"country":"GS"},{"ports":2,"country":"HM"},{"ports":2,"country":"JO"},{"ports":2,"country":"MC"},{"ports":2,"country":"MD"},{"ports":2,"country":"MF"},{"ports":2,"country":"MH"},{"ports":2,"country":"MS"},{"ports":2,"country":"MW"},{"ports":2,"country":"NU"},{"ports":2,"country":"PW"},{"ports":2,"country":"UZ"},{"ports":2,"country":"WS"},{"ports":1,"country":"AM"},{"ports":1,"country":"AS"},{"ports":1,"country":"BF"},{"ports":1,"country":"BI"},{"ports":1,"country":"BL"},{"ports":1,"country":"CC"},{"ports":1,"country":"CF"},{"ports":1,"country":"CX"},{"ports":1,"country":"EH"},{"ports":1,"country":"GI"},{"ports":1,"country":"KY"},{"ports":1,"country":"MO"},{"ports":1,"country":"MP"},{"ports":1,"country":"NP"},{"ports":1,"country":"NR"},{"ports":1,"country":"PM"},{"ports":1,"country":"PN"},{"ports":1,"country":"SM"},{"ports":1,"country":"TF"},{"ports":1,"country":"TL"},{"ports":1,"country":"TV"},{"ports":1,"country":"ZM"}],"total_ports":17596},"meta":{"timestamp":"2026-05-31T00:48:52.294Z","request_id":"7ddd9043-9c15-4621-988b-a3dd784d486a"},"status":"ok","message":"Countries 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/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Dataset totals & source","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"total":17596,"fields":["locode","name","country","country_name","subdivision","latitude","longitude","connections"],"source":"UN/LOCODE (locations with seaport function)","countries":232,"with_coordinates":11829},"meta":{"timestamp":"2026-05-31T00:48:52.368Z","request_id":"3680e68c-19e2-4a39-9ea6-55463630b703"},"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":1500,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":900,"monthly_call_quota":50000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2600,"monthly_call_quota":250000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6900,"monthly_call_quota":1000000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/ports-api"}