Developer Portal
Insights
PurpleTRACMTIPodium
Other
Other
  • Weather
Insights
PurpleTRACMTIPodium
Other
Other
  • Weather
  1. Port Analytics
  • Start Here
    • API Overview
    • Getting Started
    • Authentication
    • Quick Start
    • Testing & Sandbox
  • Concepts & Terminology
    • Concepts & Terminology
    • Notifications & Webhooks
    • Errors & Status Codes
    • Pagination & Filtering
    • Versioning & Deprecation
    • Changelog
  • Reference Data
    • Vessel Types
    • Vessel Classes
    • Vessel Statuses
    • Zone & Port Types
  • Build & Operate
    • AI Assistants & Agents
    • FAQ
    • SDKs & Code Generation
  • Vessel & Voyage
    • Overview
    • Vessel Insights
      • Overview
      • Vessel Search
      • Vessel Characteristics
    • Voyage Insights
      • Overview
      • Worked Examples
      • Vessel Port Calls
      • Vessel Zone & Port Events
      • Vessel AIS Reporting Gaps
      • Vessel STS Pairings
      • Positional Discrepancies
      • Port State Control
    • Vessel Positions
      • Vessel Positions
      • Historical Vessel Track
      • Latest Vessel Positions
    • Vessel Notifications
      • Worked Examples
      • Get Vessel Notification Subscriptions
      • Create Vessel Notification Subscription
      • Get Vessel Notification Subscription
      • Edit Vessel Notification Subscription
      • Get Vessel Notifications by Subscription ID
      • Get All Vessel Notifications
      • Delete Vessel Notification Subscription
  • Port & Trade
    • Overview
    • Choosing Port Endpoints
    • Port Insights
      • Port Insights
      • Berth Calls by Port
      • Inbound Vessels
    • Port Analytics
      • Port Analytics
      • Port Analytics: Worked Examples
      • Berth KPIs
        GET
      • Berth Details
        GET
      • Port Arrival & Departure Analytics
        GET
  • Domain & Fleet
    • Overview
    • Choosing Zone Endpoints
    • Zone Insights
      • Overview
    • Zone Analytics
      • Zone Analytics
      • Zone Analytics: Worked Examples
      • Zone Entry & Exit Analytics
    • Fleet Management
      • Fleet Management
      • Fleet Management: Worked Examples
      • List Fleets
      • Create Fleet
      • Get Fleet Details
      • Delete Fleet
      • Update Fleet
      • List Fleet Vessels
      • Get Fleet Composition
      • List Fleet Events
    • Custom Zones
      • Custom Zones
      • Create Custom Zone
      • Edit Custom Zone
  • Zones & Ports
    • Overview
    • Zone & Port Insights
      • Zone & Port Search
      • Get Single Zone or Port
      • Zone & Port Traffic
      • Vessels in Zone or Port
    • Zone & Port Notifications
      • Zone & Port Notifications
      • Zone & Port Notifications: Worked Examples
      • Create Zone & Port Notification Subscription
      • Get Zone & Port Notification Subscriptions
      • Edit Zone & Port Notification Subscription
      • Delete Zone & Port Notification Subscription
      • Get Zone & Port Notification Subscription
      • Search Zone & Port Notifications
      • Get Zone & Port Notifications by Subscription ID
      • Get All Zone & Port Notifications
  • Schemas
    • VesselTankerCharacteristicsResponse
    • ImoBatchSearchResponse
    • ReportedDestination
    • AisFieldDeltaNavigationalStatus
    • AisFieldDeltaErrorResponse
    • BerthDetailsDto
    • BerthListQuery
    • BerthPortInfoDto
    • BerthSummaryDto
    • DwellTimeDataPointDto
    • OccupancyDto
    • PortAnalyticsItem
    • PortAnalyticsQuery
    • PortAnalyticsResponse
    • PortAnalyticsTotals
    • TopVisitorDto
    • VesselTypeMixDto
    • ZoneAnalyticsItem
    • ZoneAnalyticsQuery
    • ZoneAnalyticsResponse
    • ZoneDetail
    • PortDetail
    • PositionReport
    • PositionalDiscrepancyEvent
    • AisSpoofingErrorResponse
    • AisSpoofingVesselInformation
    • VesselPortsFilter
    • ZoneDetails
    • PortDetails
    • CustomZoneDetails
    • CircleDetails
    • PortEventDetails
    • PortCallEventDetails
    • BerthInformationPortCall
    • PortVessel
    • PortListResponse
    • ZoneDefinitionResponse
    • CustomZoneResponse
    • ArrivalsDeparturesResponse
    • VesselsInZonePortResponse
    • BerthEventsResponse
    • VoyagePortCallsResponse
    • VoyageZonePortEventsResponse
    • CustomZoneRequest
    • CustomCircle
    • ZoneServiceErrorResponse
    • ZoneServiceVesselInformation
    • VesselIdentifier
    • LatestVesselFilter
    • CircleZone
    • PolygonZone
    • GeographicFilter
    • HistoricalPositionSearchRequest
    • LatestPositionSearchRequest
    • VesselInfo
    • MatchedDestination
    • ConsolidatedPosition
    • CpsApiErrorResponse
    • CpsApiPaginationMeta
    • CpsApiNavigationalStatus
    • AnalyticsServiceErrorResponse
    • ResponseMeta
    • FlagDetail
    • CountryOfBuild
    • Ownership
    • VesselTankerCharacteristics
    • VesselCharacteristicsResponse
    • VesselSummary
    • VesselSearchResponse
    • ImoBatchSearchMeta
    • ImoBatchSearchSummary
    • ImoVesselSummary
    • ImoErrorEntry
    • ImoBatchSearchData
    • AssetInformationServiceErrorResponse
    • AssetInformationServiceDimensions
    • AssetInformationServiceVesselCharacteristics
    • EmailSettingsDTO
    • VesselFilterRequestDTO
    • ZonePortFilterRequestResponseDTO
    • SettingsResponseDto
    • SubscriptionResponseDTO
    • NotificationResponseDTO
    • EventNotificationServiceMetaData
    • BerthEventDetails
    • PscInspection
    • CustomPolygon
    • ZoneServiceMeta
    • HistoricalPositionsResponse
    • FleetListResponse
    • FleetListMeta
    • FleetSummary
    • FleetItem
    • VesselPosition
    • FleetVesselItem
    • FleetDetailMeta
    • FleetDetail
    • AnalyticsServiceVesselInformation
    • FailedVessel
    • CreateFleetV2Request
    • CreateFleetV2Response
    • UpdateFleetV2Request
    • FleetManagementApiMeta
    • FleetManagementApiErrorResponse
    • AssetInformationServiceCountryOfBuild
    • BerthDetailMetaDto
    • FleetEventNavigationalStatus
    • LegacyStsPairingsResponse
    • VesselZonesFilter
    • EventNotificationServiceErrorResponse
    • VesselAisReportingGapsFilter
    • GapReportingErrorResponse
    • VesselStsPairingsFilter
    • VoyageVesselInformation
    • StsPairingsResponse
    • VesselPositionalDiscrepanciesFilter
    • VesselDraughtChangeFilter
    • PscInspectionServiceErrorResponse
    • ReportingStatus
    • VesselAisDestinationChangeFilter
    • DaysNotReportingRange
    • VesselAisEtaChangeFilter
    • AnalyticsServiceMeta
    • VesselMmsiChangeFilter
    • FleetInformation
    • VesselNavigationalStatusChangeFilter
    • FleetCompositionResponse
    • CompositionData
    • VesselInboundBaseResponse
    • Summary
    • TypeAndClass
    • RegistrationAndFlag
    • AnalyticsServiceCountryOfBuild
    • BuildAndOrigin
    • SizeAndDimensions
    • CategoryItem
    • ChartSection
    • RankedSection
    • BerthDetailQueryDto
    • SizeSection
    • DimensionsSection
    • AisGapStartedPosition
    • AisGapEndedPosition
    • ZoneCentroid
    • GapReportingMetaData
    • ZoneInformation
    • StsPairingServiceMeta
    • PscPortInformation
    • AisSpoofingMeta
    • FleetEventsResponse
    • PscInspectionServiceMetaData
    • FleetEventsData
    • ZoneServicePaginationMeta
    • EventVesselInformation
    • VesselInbound
    • ZoneEventDetails
    • ZoneEventResponse
    • Schedule
    • AisGapEventResponse
    • StsPairingEventResponse
    • StsPairedVessel
    • PositionalDiscrepancyEventResponse
    • Centroid
    • DiscrepancyPositionStart
    • DiscrepancyPositionEnd
    • PscEventResponse
    • BerthDetailResponseDto
    • GapEventsResponse
    • StsPairingsData
    • PscInspectionsResponse
    • Point
    • GapEventData
    • StsPairingEvent
    • PscInspectionData
    • LatestPosition
    • VesselScreening
    • GapEvent
    • Location
    • BerthKpiDto
    • FlagCodesDTO
    • PortInformation
    • BerthListMeta
    • GapPosition
    • StsPairingServiceVesselInformation
    • AnalyticsServiceNavigationalStatus
    • AisFieldDeltaVesselInformation
    • VesselStatus
    • GapReportingNavigationalStatus
    • StsPairingServiceErrorResponse
    • PscInspectionServiceVesselInformation
    • AisFieldDeltaMetaData
    • BerthListResponseDto
    • GapReportingVesselInformation
    • VesselSettingsRequestDto
    • LegacyMeta
    • PolygonDetails
    • PositionalDiscrepancyData
    • ZonePortSettingsRequestDto
    • FleetVesselListResponse
    • VesselFlag
    • LegacyStsPairingsData
    • PositionalDiscrepancyResponse
    • VesselSubscriptionRequestDTO
    • LegacyStsPairing
    • BerthTerminalGroupDto
    • ZoneServiceNavigationalStatus
    • ZonePortSubscriptionRequestDTO
    • LegacyPairedVessel
    • UpdateFleetV2Response
    • StsPairingServiceVesselCharacteristics
    • MaritimeAnalyticsBeErrorResponse
    • FleetSummaryV2
    • FleetDetailResponse
    • GapDto
    • StsPairingServiceDimensions
    • VesselIdentifiers
    • RejectedVessels
    • BerthInformation
    • VesselPositionsGroup
    • SubscriptionSingleResponseDTO
    • VesselResultsSummary
    • LatestVesselPositionItem
    • OccupancyPaginationDto
    • SubscriptionsResponseDTO
    • SubscriptionIdsRequestDTO
    • VesselEntryDetails
    • PortAnalyticsDataEntry
    • LatestPositionDetails
    • LatestPositionsResponse
    • FleetSummaryV2Update
    • PortAnalyticsMeta
    • VesselResultsDetail
    • ZonePortVessel
    • BerthEvent
    • VoyagePortCall
    • VoyagePortZoneEvent
    • PortDwellSeriesEntryDto
    • PortInfoDto
    • TopVesselDto
    • VesselVisitDto
    • ZoneAnalyticsDataEntry
    • ZoneAnalyticsMeta
    • ZoneAnalyticsTotals
    • ZoneInfoDto
  1. Port Analytics

Port Analytics

Three endpoints that count rather than list: how much traffic a port handled over a period, how its berths performed, and what happened at one berth in particular.
Port Insights answers who and when. This answers how many, how long, and how busy.

The three endpoints#

EndpointAnswers
GET /v1/analytics/ports/{id_type}/{id}/arrivals-departuresHow many vessels arrived and left over this period, broken down how I asked?
GET /v1/analytics/ports/{id_type}/{id}/berthsWhich berths does this port have, and how long do vessels sit at them?
GET /v1/analytics/ports/{id_type}/{id}/berths/{berth_id}Everything about one berth, in one response
These endpoints sit behind a base path of their own
Port Analytics is served by our maritime analytics service, which the gateway reaches at /maritime-analytics. Call it at https://api.polestar-production.com/maritime-analytics/v1/analytics/ports/.... The reference pages show the path the service sees, without that prefix, because every other Insights endpoint carries its service prefix in the path itself and these carry it in the base URL.

Addressing a port#

id_type is id for the internal UUID or unlocode for the UN/LOCODE, and {id} is the value. If your data already carries a UN/LOCODE you can skip the port search entirely.

Arrivals and departures over a period#

arrivals-departures counts port-level movements and buckets them. group_by and period_aggregation are both required, and the combination decides the shape of the response:
group_byperiod_aggregationWhat you getChart it as
NONEDAILY, WEEKLY, MONTHLY, QUARTERLY or YEARLYOne data point per period, each holding a single combined arrival and departure countA line over time
VESSEL_TYPEany periodOne data point per period, each holding one item per vessel typeA stacked or clustered bar
VESSEL_TYPENONEA single data point holding one item per vessel type, summed across the whole rangeA donut or a pie
When group_by is NONE, every items array holds exactly one element with group_by_key set to "none". Vessel types with nothing in a period are left out of that period rather than returned as zero.
Narrow the traffic with vessel_types, vessel_class and flag_codes, all repeatable. The totals object is calculated after every filter has been applied, so it agrees with the data array rather than describing the unfiltered port.
Alongside the counts the response carries dwell_series, average and median hours at berth per period, and top_visitors, the vessels calling most often over the range. top_visitors returns ten entries by default and up to 50.
The period key is the end of the period, not the start
period_key is always the last calendar day of its bucket: the Sunday that closes a week, the last day of a month or quarter. It stays the end of the full period even when your date_end falls part way through one, so a chart axis built from it will not shift as you extend the range.
berth_type on this endpoint filters the dwell series alone. Arrival and departure counts ignore it. Pass it when you want dwell figures for container berths and the movement totals for the whole port.

Vessel type coverage#

Port Analytics counts commercial vessels only, across 11 categories: Bulk Carrier, Bulk/Oil Carrier, Chemical Tanker, Container (FC), Dry Cargo Barge, General Cargo, Liquified Gas Carrier (LNG), Oil Tanker, Other Tanker, Specialised Carrier and Tank Barge.
Zone Analytics counts all 16 categories, commercial and not. A zone drawn over a port will not return the same numbers, and the difference is coverage rather than data quality.

Berths and dwell time#

berths returns every berth at a port, grouped by terminal operator, with dwell statistics for the period you ask for. Dwell time is the hours a vessel spends at a berth, measured from arrival_time to departure_time, and each berth reports it as minimum, average, median and maximum across the visits in range.
The kpi block is the summary card: total_berths, min_dwell_time, max_dwell_time and terminal_operators. Under it, terminals holds one entry per operator, each with its berths and their specifications: structural type, facility, length, maximum LOA, maximum deadweight and depth at low water.
Filter with berth_type for the structural kind, Quay or Jetty, and terminal_name for the operator. Paging is by berth, limit defaulting to 500.

One berth in detail#

berths/{berth_id} returns everything a berth page needs in a single response, under three top-level keys: berth_details, dwell_time_series and occupancy:
berth_details, the specification card. The static fields do not move with your query; avg_dwell_time and median_dwell_time are recalculated for your date range and flag filter
dwell_time_series, the chart points. A period with no visits returns null rather than 0, so an empty week is visibly empty rather than a dip to zero
occupancy.visits and occupancy.gaps, the individual vessel visits and the idle time between them
occupancy.top_vessels, ranked by total dwell across the whole range
vessel_flag takes ISO 3166-1 alpha-3 codes here. The occupancy timeline pages by day rather than by record: page_size is a number of days, defaulting to 14.
The response tells you how to render itself
The query block carries two values we derive from the length of your date range, so you do not have to work out the thresholds yourself. view_mode is gantt for a range of 90 days or less and table beyond that. dwell_series_granularity is daily for 30 days or less and weekly beyond that. Draw the visits-and-gaps timeline when view_mode is gantt, and the top-vessels table when it is table, where gaps comes back empty.

Aggregates and events are different endpoints#

Two endpoints on this site report port arrivals and departures, and they return different things.
ReturnsUse when
GET /zone-port-insights/v1/zone-and-port-traffic/{id_type}/{id}Every movement event, one row per arrival or departureYou need the movements themselves: a timeline, an audit trail, a per-vessel history
GET /v1/analytics/ports/{id_type}/{id}/arrivals-departuresCounts of those movements, bucketed and groupedYou need volume: a trend, a distribution, a comparison between periods
The same split holds on the berth side. port-berth-traffic returns BERTH_ARRIVAL and BERTH_DEPARTURE events; the two berth endpoints here return occupancy and dwell built from them.

Date range#

date_start and date_end are required on all three endpoints, inclusive, and yyyy-MM-dd. We treat a date_end in the future as today (UTC). Six rules apply to the berth endpoints and are worth respecting everywhere:
CodeStatusCondition
ERROR_300400date_start is after date_end
ERROR_301400id_type is neither id nor unlocode
ERROR_302404No port matches the identifier
ERROR_303400The range spans more than two years
ERROR_304400date_start is before 2025-01-01
ERROR_305404No berth matches the berth_id
Historical data starts on 2025-01-01. A range reaching back before it is rejected rather than truncated.

Related#

Port Insights
The port search that gives you the identifier, and the events these counts are built from.
Zone Analytics
The same aggregation model applied to zones, across all 16 vessel types.
Vessel Classes
The class names the vessel_class filter expects.
Modified at 2026-10-16 05:47:00
Previous
Inbound Vessels
Next
Port Analytics: Worked Examples
Built with