# Baltic & Finland Port Calls & Congestion (Digitraffic) (`itulo/digitraffic-port-calls-marine`) Actor

Real-time & scheduled Baltic Sea and Finnish port calls, vessel ETA/ETD berth schedules, cargo flags, turnaround times, and port congestion summaries from Fintraffic Digitraffic Marine Open Data (CC BY 4.0).

- **URL**: https://apify.com/itulo/digitraffic-port-calls-marine.md
- **Developed by:** [Italo Armenti](https://apify.com/itulo) (community)
- **Categories:** Business, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 vessel port call or port congestion summary rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Baltic & Finland Vessel Port Calls & Port Congestion — Digitraffic Marine API (`itulo/digitraffic-port-calls-marine`)

Real-time and scheduled **Baltic Sea & Finnish maritime vessel port calls**, berth ETA/ETD schedules, planned turnaround durations, corporate shipping agents, and per-port congestion metrics powered by **Fintraffic Digitraffic Marine Open Data** (`meri.digitraffic.fi/api/port-call/v1/port-calls`; keyless CC BY 4.0).

Ships as both a **Pay-Per-Event Apify Actor** (`itulo/digitraffic-port-calls-marine`) and an open-source **stdio MCP Server** (`src/mcp-server.js`).

> **Independent Tool Notice:** Not affiliated with or endorsed by Fintraffic; uses no Fintraffic or Digitraffic logos.

***

### Supported Modes for Maritime & Supply-Chain Automation

- **`port_calls` (Normalized Vessel Arrivals & Departures):** Filter by UN/LOCODE port (`FIHEL` Helsinki, `FITKU` Turku, `FIHKO` Hanko, `FIKTK` Kotka, `FIHMN` Hamina, `FIRAU` Rauma, `FIOUL` Oulu), vessel name, IMO number, ETA window, and `cargoOnly`. Outputs `portToVisit`, `prevPort`, `nextPort`, `portAreaName`, `berthName`, `vesselName`, `imoLloyds`, `radioCallSign`, `nationality`, `vesselTypeCode`, `arrivalWithCargo`, `etaUtc`, `etdUtc`, `plannedTurnaroundHours`, and corporate `shippingAgents`.
- **`port_congestion_summary` (Port-Level Turnaround & Berth Load):** Computes `totalPortCalls`, `cargoPortCalls`, `cargoSharePct`, `avgPlannedTurnaroundHours`, `activeBerthsCount`, and `flagStatesCount` per port.
- **GDPR By Design:** Strips `shipMasterArrival`, `shipMasterDeparture`, and free-text security notes, and restricts `shippingAgents` to corporate legal entities.

***

### Pay-Per-Event Pricing (`PAY_PER_EVENT`)

| Event Name | Price (USD) | Description |
|---|---|---|
| `actor-start` | **$0.01 / run** | Flat fee for starting an Actor run |
| `port-call-record` | **$0.0015 / record** ($1.50 / 1,000) | Each normalized vessel port call schedule or port congestion summary row written to the dataset (primary event) |

***

### Data Licence & Attribution Compliance

- **Licence:** Creative Commons Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)).
- **Mandatory Attribution on Every Record:** `Source: Fintraffic / digitraffic.fi, license CC 4.0 BY`

***

### Connect to Claude Desktop, Cursor & MCP Clients (Model Context Protocol)

You can use **`itulo/digitraffic-port-calls-marine`** as a live tool inside **Claude Desktop**, **Cursor**, **Windsurf**, or any MCP-compatible AI agent in two ways:

#### Option A: Hosted Apify MCP Server (`@apify/actors-mcp-server`)

Zero local setup required. Add this to your `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`, Windows: `%APPDATA%\Claude\claude_desktop_config.json`) or Cursor `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "digitraffic-marine": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "itulo/digitraffic-port-calls-marine"
      ],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_API_TOKEN"
      }
    }
  }
}
```

#### Option B: Local Stdio MCP Server (Open-Source CLI)

Run the bundled stdio MCP server (`src/mcp-server.js`) directly on your machine. Exposed MCP tools: `digitraffic_port_calls`, `digitraffic_port_congestion_summary`, `digitraffic_licence_info`.

```json
{
  "mcpServers": {
    "digitraffic-marine-local": {
      "command": "node",
      "args": [
        "/absolute/path/to/tools/digitraffic-port-calls-marine/src/mcp-server.js"
      ]
    }
  }
}
```

***

### n8n, Make.com & REST API Integration (One-Call Sync JSON)

Trigger **`itulo/digitraffic-port-calls-marine`** synchronously and get the normalized JSON dataset items back in a single HTTP request — ideal for **n8n `HTTP Request` nodes**, **Make.com**, **Zapier**, or cron webhooks:

- **Method:** `POST`
- **Endpoint:** `https://api.apify.com/v2/acts/itulo~digitraffic-port-calls-marine/run-sync-get-dataset-items?token=YOUR_APIFY_API_TOKEN`
- **Headers:** `Content-Type: application/json`

#### cURL Example

```bash
curl -s -X POST \
  "https://api.apify.com/v2/acts/itulo~digitraffic-port-calls-marine/run-sync-get-dataset-items?token=${APIFY_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"modes":["port_calls","port_congestion_summary"],"ports":["FIHEL","FITKU","FIHKO","FIKTK"],"cargoOnly":false,"maxResults":30}'
```

***

### LangChain, CrewAI, Node.js & Python SDK Snippets

#### Node.js (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('itulo/digitraffic-port-calls-marine').call({
  "modes": [
    "port_calls",
    "port_congestion_summary"
  ],
  "ports": [
    "FIHEL",
    "FITKU",
    "FIHKO",
    "FIKTK"
  ],
  "cargoOnly": false,
  "maxResults": 30
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python (`apify-client` / LangChain `ApifyWrapper` / CrewAI)

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("itulo/digitraffic-port-calls-marine").call(run_input={
  "modes": [
    "port_calls",
    "port_congestion_summary"
  ],
  "ports": [
    "FIHEL",
    "FITKU",
    "FIHKO",
    "FIKTK"
  ],
  "cargoOnly": false,
  "maxResults": 30
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
for row in items:
    print(row)
```

#### LangChain Python Tool

```python
from langchain_community.utilities import ApifyWrapper

apify = ApifyWrapper()
loader = apify.call_actor(
    actor_id="itulo/digitraffic-port-calls-marine",
    run_input={
  "modes": [
    "port_calls",
    "port_congestion_summary"
  ],
  "ports": [
    "FIHEL",
    "FITKU",
    "FIHKO",
    "FIKTK"
  ],
  "cargoOnly": false,
  "maxResults": 30
},
    dataset_mapping_function=lambda item: str(item),
)
docs = loader.load()
```

***

### Frequently Asked Questions (FAQ)

#### Which maritime ports and vessel identifiers are supported?

It queries the official Fintraffic Digitraffic Marine Port Call REST API (`meri.digitraffic.fi/api/port-call/v1/port-calls`) covering all Finnish and Baltic UN/LOCODE ports (`FIHEL` Helsinki, `FIKTK` Kotka, `FIHMN` Hamina, `FITKU` Turku, `FIHKO` Hanko, `FIRAU` Rauma, `FIOUL` Oulu, etc.). You can filter by `ports`, `vesselName`, `imoNumber`, `cargoOnly`, and `etaFrom`/`etaTo`.

#### What does `port_congestion_summary` calculate?

It aggregates active and scheduled vessel calls per UN/LOCODE port, returning `totalPortCalls`, `cargoPortCalls`, `cargoSharePct`, `avgPlannedTurnaroundHours`, `activeBerthsCount`, `flagStatesCount`, and the earliest/latest ETA window for supply-chain bottleneck monitoring.

#### How are ship master personal names handled for GDPR compliance?

Raw Digitraffic port call payloads can include natural-person ship master names (`shipMasterArrival`, `shipMasterDeparture`). This tool explicitly drops all master/crew personal fields and filters `shippingAgents` to corporate entities only (`Oy`, `Ab`, `Ltd`, `Shipping`, `Logistics`, `Agency`, etc.).

**Related Search Keywords:** Digitraffic Port Calls API · Baltic Sea Vessel Schedule & ETA API · Finland Maritime Port Congestion API · Fintraffic Marine Open Data API · Port of Helsinki Kotka Hamina Turku Vessel Arrivals · Digitraffic Marine MCP Server

# Actor input Schema

## `modes` (type: `array`):

Select output modes: port_calls (individual vessel port calls) and/or port_congestion_summary (aggregated per-port traffic & turnaround stats).

## `ports` (type: `array`):

Filter by port UN/LOCODEs (e.g. FIHEL Helsinki, FITKU Turku, FIHKO Hanko, FIKTK Kotka, FIRAU Rauma, FIOUL Oulu). Leave empty for all ports.

## `cargoOnly` (type: `boolean`):

When true, filters to port calls where arrivalWithCargo is true.

## `vesselQuery` (type: `string`):

Optional substring filter matching vesselName, IMO number, or radio callsign.

## `maxResults` (type: `integer`):

Maximum number of individual port_call records to output.

## Actor input object example

```json
{
  "modes": [
    "port_calls",
    "port_congestion_summary"
  ],
  "ports": [
    "FIHEL",
    "FITKU",
    "FIHKO",
    "FIKTK"
  ],
  "cargoOnly": false,
  "vesselQuery": "",
  "maxResults": 30
}
```

# Actor output Schema

## `results` (type: `string`):

Normalized port call and port congestion summary rows with mandatory Fintraffic Digitraffic CC BY 4.0 attribution.

## `summary` (type: `string`):

Summary metadata and mandatory Fintraffic Digitraffic CC BY 4.0 attribution.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("itulo/digitraffic-port-calls-marine").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("itulo/digitraffic-port-calls-marine").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call itulo/digitraffic-port-calls-marine --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,itulo/digitraffic-port-calls-marine"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dxdnGaaKiTq4Mhql6/builds/QO5ede2tP3UJ7TIPS/openapi.json
