Live WebSocket stream (Pro and Business plans; sources: `aisstream`, `barentswatch`, `digitraffic`, `openwaters`). ?key= is accepted here only
Send one subscription message within 5 s: {"bbox":[[lat_min,lon_min,lat_max,lon_max],…]} and/or {"mmsi":[…]}; at most 10 boxes, each side at most the plan's max_bbox_deg, and 1000 MMSIs. The server answers {"type":"subscribed"} with bbox, mmsi, sources, private_vessels, attribution and notice, then sends {"type":"position"} messages (the Position fields with rot and ais_class) and {"type":"status","live":"stale"|"ok","since":…} when the live view stops or resumes being current. The stream is included in the plan and uses no credits; concurrent connections are limited per account (429 Too many connections). Close codes: 4000 no subscription in time, 4001 empty subscription, 4002 invalid subscription, 4003 not included in your plan (also after a plan change, when the subscription exceeds the new plan, or for the newest streams beyond the new plan's connection limit), 4004 API key revoked, 1011 server error.
Request
- Base URL: https://api.aistrail.com
- URL: https://api.aistrail.com/v1/stream
- Auth: HTTP bearer
Changes
No recorded changes to this operation across all 2 revisions of this API.