Ship events (API key)
vessel_eventsEvents of a ship between two times (UTC, ISO 8601), computed from the AIS Trail archive. from and to are optional: without to, now (24 hours ago on plans without live data); without from, 7 days before to (on Free, no earlier than the oldest day the plan includes), as on the REST endpoint. Give mmsi or imo (with imo, every MMSI that reported that IMO number in the range). Types: ENTER_ZONE and EXIT_ZONE (arrival at and departure from a port or anchorage; port_id for port_calls, zone port or anchorage), STATE_CHANGED (MOVING, NOT_MOVING, LONG_STOP), NAME_CHANGED, IMO_CHANGED, CALLSIGN_CHANGED, DESTINATION_CHANGED and DRAUGHT_CHANGED (old and new value); only when asked by name or with types ['all']: AIS_GAP (long AIS silence while under way; old_value hours, new_value nautical miles), ENCOUNTER (slow close approach to another ship outside port areas, a candidate ship-to-ship transfer; new_value the other ship's MMSI), FLAG_CHANGED (the IMO number reappears under an MMSI with another flag) and POSITION_JUMP (a physically impossible position jump). Rows: [time, event, old_value, new_value, lat, lon, mmsi, port_id, zone, sanctions, detail]; detail says more about behaviour events. The sanctions column gives the codes of the sanctions lists (OFAC, UK, EU) that name the ship's IMO number; informational only, not a compliance determination. Needs an AIS Trail API key sent by the MCP client as the HTTP header 'Authorization: Bearer ap_live_…'. At most 200 events per call and at most 31 days; the plan's history depth, credits (1 per event returned), rate limit and 24-hour delay (on plans without live data) apply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End, e.g. 2026-10-08T00:00:00Z; default: now (24 hours ago on plans without live data) | |
| imo | No | 7-digit IMO number; covers every MMSI that reported it in the range. Give mmsi or imo | |
| from | No | Start, e.g. 2026-10-01T00:00:00Z; default: 7 days before to (on Free, no earlier than the oldest day the plan includes) | |
| mmsi | No | 9-digit MMSI of the ship; give mmsi or imo | |
| types | No | Event types; default: every type except AIS_GAP, ENCOUNTER, FLAG_CHANGED, POSITION_JUMP. ['all'] for every type. |