Search ports by name, country, UN/LOCODE or bounding box
Changed onPorts of the World Port Index and UN/LOCODE. q matches the name or an alternate name (case and accent insensitive): exact names first, then names starting with q, then the rest; larger harbors first within each group. Response: ports (Port objects), count, total, offset, next_offset (null on the last page) and meta (attribution and notice). Port lookups use no credits.
Request
- Base URL: https://api.aistrail.com
- URL: https://api.aistrail.com/v1/ports
- Auth: HTTP bearer
Query parameters
2 to 64 characters
ISO 3166-1 alpha-2 country code, e.g. NL
UN/LOCODE, e.g. NLRTM
lat_min,lon_min,lat_max,lon_max
Up to 100 port ids, comma separated
1-500
0-10000; use next_offset from the previous page
json, csv (text/csv) or xlsx (Excel workbook); csv and xlsx columns id, name, alternate_names (| separated), country, locode, lat, lon, harbor_size, harbor_type, radius_km, with X-Count, X-Total and X-Attribution headers
Response
ok
Changes
- info
added the new enum value
xlsxto thequeryrequest parameterformat - info
added the media type
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetfor the response with the status
- info