Find ports by name, country, or UNLOCODE
Changed onSearch the ports database by name, UN/LOCODE, type, country, or geographic area. Fuzzy search finds ports by approximate name. Geographic search returns ports within a radius of a coordinate. A single request can return multiple matches, for example all ports in Italy.
Credit cost: 1 per port found, capped at 500 credits per request.
Request
- Base URLhttps://api.datalastic.com
- Auth
- API key in header x-api-key
- or API key in query parameter api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Full or partial port name.
0 for exact name match (default), 1 for approximate match.
Filter by port classification.
Centre latitude. Use with lon and radius.
Centre longitude. Use with lat and radius.
Search radius in nautical miles. Maximum 50.
Response
Matching ports.
Example response
{
"data": [
{
"uuid": "37a8ac5b-d126-d7ce-9aca-7b8249c2efd2",
"port_name": "ROTTERDAM",
"country_iso": "NL",
"country_name": "Netherlands",
"unlocode": "NLRTM",
"port_type": "Port",
"lat": 51.94331,
"lon": 4.141812,
"area_lvl1": "UK Coast & Atlantic",
"area_lvl2": "Rotterdam Area",
"terminals": [
{
"terminal_code": "MPT",
"terminal_name": "MARIN PORT TERMINAL",
"company_name": "PEREZ TORRES MARITIMA S.L.",
"lat": 42.405278,
"lon": -8.692778,
"url": "https://www.ptmar.com/en/puertos/puerto-marin",
"address": "Muelle comercial s/n, 36900 Marin, Pontevedra, Spain"
}
]
}
],
"meta": {
"duration": 0.012,
"endpoint": "/api/v0/vessel",
"success": true,
"next": "00e32b7a-4067-d6b2-8d73-2bdda4fe72bb"
}
}Changes
- breaking
the
queryrequest parameterport_typewas restricted to a list of enum values - warning
deleted the
queryrequest parameterapi-key - info
added the new optional
queryrequest parameterlat - info
added the new optional
queryrequest parameterlon - info
added the new optional
queryrequest parameterradius - info
added the new enum value
Anchorageto thequeryrequest parameterport_type - info
added the new enum value
Canalto thequeryrequest parameterport_type - info
added the new enum value
Demolition Yardto thequeryrequest parameterport_type - info
added the new enum value
Fishing Harbourto thequeryrequest parameterport_type - info
added the new enum value
Marinato thequeryrequest parameterport_type - info
added the new enum value
Offshore Terminalto thequeryrequest parameterport_type - info
added the new enum value
Portto thequeryrequest parameterport_type - info
added the new enum value
Shelterto thequeryrequest parameterport_type - info
added the media type
application/jsonfor the response with the status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
//to the response with the status - info
added the optional property
/to the response with the status
- breaking
- info
added the new optional
queryrequest parameterfuzzy - info
added the new optional
queryrequest parameterport_type
- info