Port calls across ports, filtered by port, country, UN/LOCODE or bounding box (Starter, Pro and Business plans)

Filters combine (all must match); without filters every port is included. meta carries no subject field.

get/v1/port-calls

Request

  • Base URL: https://api.aistrail.com
  • URL: https://api.aistrail.com/v1/port-calls
  • Auth: HTTP bearer

Query parameters

port_idstring

Up to 100 port ids, comma separated

countrystring

ISO 3166-1 alpha-2 country code of the port, e.g. NL

locodestring

UN/LOCODE of the port, e.g. NLRTM

bboxstring

lat_min,lon_min,lat_max,lon_max: ports inside the box

fromstring date-time

ISO 8601 start; default: to minus 30 days

tostring date-time

ISO 8601 end (exclusive); default: now on plans with live data, otherwise now minus 24 h. Later values are clamped (see meta.embargo_cutoff). One query may span at most 366 days

event'any' | 'arrival' | 'departure'

any = calls in port at any time in the range (default); arrival = calls that arrived in the range; departure = calls that departed in the range

format'json' | 'csv' | 'xlsx'

json, csv (text/csv) or xlsx (Excel workbook); csv and xlsx page through the Link / X-Next-Cursor headers

zones'port' | 'anchorage' | 'all'

port = port calls (default); anchorage = waits at the port's anchorage: a stop of at least 1 hour just outside the port area (up to 12 km beyond it); all = both, in one order

layout'calls' | 'events'

calls = one row per port call (default); events = one ENTER_ZONE row at arrival and, once the vessel has left, one EXIT_ZONE row at departure, with the draught reported then (json: events instead of port_calls). Paging and credits stay per port call

limitinteger

Port calls per page, up to 10000 or the plan's rows per page when that is lower; default 1000

cursorstring

Opaque cursor from meta.next_cursor. When given, from, to, event and the filters are taken from the cursor

Response

Port calls

Changes

No recorded changes to this operation across all 2 revisions of this API.