group_by and period_aggregation parameters together to controlgroup_by | period_aggregation | Response shape |
|---|---|---|
NONE | DAILY / WEEKLY / MONTHLY / QUARTERLY / YEARLY | One data point per period, each with a single item containing the combined arrival and departure totals. Suitable for a time-series line chart. |
VESSEL_TYPE | DAILY / WEEKLY / MONTHLY / QUARTERLY / YEARLY | One data point per period, each with one item per vessel type. Suitable for a stacked or clustered bar chart. |
VESSEL_TYPE | NONE | A single data point containing one item per vessel type, summed across the entire date range. Suitable for a donut or pie chart. |
period_key field on each data point is the last calendar day of theDAILY, the Sunday ending the weekWEEKLY, and the last day of the month, quarter or year for MONTHLY,QUARTERLY and YEARLY. With period_aggregation=NONE it is the literalNONE. When date_end falls mid-period, the period_key stillgroup_by=NONE, the items array in each data point will alwaysgroup_by_key set to "none".items array.totals object reflects aggregate counts across the entire date rangecurl --location 'https://api.polestar-production.com/maritime-analytics/v1/analytics/ports/unlocode/NOFRK/arrivals-departures?group_by=NONE&period_aggregation=MONTHLY&date_start=2024-01-01&date_end=2024-03-31&vessel_types=Chemical%20Tanker&flag_codes=NOR&vessel_class=Handysize%20Chemical%20Tanker&limit=undefined&offset=undefined&berth_type=Quay&top_visitors_limit=undefined&top_visitors_sort=undefined' \
--header 'api-key: <api-key>'{
"meta": {
"request_id": "634944ab-58c0-44c7-adfe-e693367eb79c",
"request_timestamp": "2026-09-30T10:28:54Z"
},
"query": {
"date_start": "2026-06-01",
"date_end": "2026-08-31",
"group_by": "NONE",
"period_aggregation": "MONTHLY"
},
"port_information": {
"id": "c750eef6-52c0-4c96-9def-90f7eb8914b4",
"name": "Rotterdam",
"unlocode": "NLRTM",
"country_common_name": "Kingdom of the Netherlands"
},
"totals": {
"arrivals": 18283,
"departures": 18266,
"vessels_per_day": 173,
"max_vessels_per_day": 228,
"avg_dwell_time": 18.36,
"median_dwell_time": 10.66
},
"data": [
{
"items": [
{
"arrivals": 5770,
"departures": 5771,
"group_by_key": "none"
}
],
"period_key": "2026-06-30"
},
{
"items": [
{
"arrivals": 6333,
"departures": 6328,
"group_by_key": "none"
}
],
"period_key": "2026-07-31"
}
],
"dwell_series": [
{
"period_key": "2026-06-30",
"avg_dwell_time": 18.79,
"median_dwell_time": 11.1
},
{
"period_key": "2026-07-31",
"avg_dwell_time": 18.15,
"median_dwell_time": 10.32
}
],
"top_visitors": [
{
"vessel_name": "NOVA",
"imo_number": "9166479",
"flag_code": "TGO",
"flag_name": "Togo",
"ship_type_level_3": "General cargo",
"vessel_class": "Large General Cargo",
"visit_count": 180
},
{
"vessel_name": "INVOTIS VII",
"imo_number": "8354732",
"flag_code": "NLD",
"flag_name": "Netherlands",
"ship_type_level_3": "General cargo",
"vessel_class": "Large General Cargo",
"visit_count": 167
}
]
}