# MyShipTracking Port Calls and Vessel Traffic Scraper (`jungle_synthesizer/myshiptracking-port-call-vessel-traffic-scraper`) Actor

Port by port vessel traffic from MyShipTracking. Vessels currently in port, expected arrivals with ETA and MMSI, and the recent arrival and departure log, for about 7,000 ports worldwide.

- **URL**: https://apify.com/jungle_synthesizer/myshiptracking-port-call-vessel-traffic-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 57.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## MyShipTracking Port Calls and Vessel Traffic Scraper

Port-by-port vessel traffic from MyShipTracking for about 7,000 ports worldwide. For each port you get three views of the same harbour as flat, ready-to-load rows: the vessels currently in port, the queue of expected arrivals, and the recent arrival and departure log. It is the data behind port congestion, berth turnaround and ETA monitoring.

### What you get

Every row is one vessel at one port, tagged with `record_type`:

| record_type        | What it is                                              | Fields filled |
|--------------------|---------------------------------------------------------|-----------------------------------------------------------------------|
| `in_port`          | A vessel currently in port                              | arrival time (UTC and port local), DWT, GRT, year built, length |
| `expected_arrival` | A vessel on its way to the port                         | MMSI, estimated arrival (UTC) |
| `port_call_event`  | An entry in the port's recent arrival and departure log | `event_type` (ARRIVAL or DEPARTURE), `event_time_utc` |

Every row also carries the port itself (name, id, UN/LOCODE, country, latitude, longitude, area size class, timezone, page URL) and the vessel (name, flag, MMSI, IMO when known, vessel page URL).

Sparse by design: tonnage, year built and length are published only for some vessels, and small craft often have none. Missing values are `null`, never zero. Timestamps are ISO 8601 in UTC (`2026-10-23T16:16:00Z`); `arrived_at_local` is the port's own clock without a zone suffix.

### Example row

```json
{
  "port_name": "AALBORG",
  "port_id": 80,
  "port_unlocode": "DKAAL",
  "port_country": "Denmark",
  "port_country_code": "DK",
  "port_latitude": 57.0599,
  "port_longitude": 9.96008,
  "port_timezone": "Europe/Copenhagen",
  "record_type": "port_call_event",
  "vessel_name": "MERIT",
  "vessel_flag": "GI",
  "mmsi": 236108000,
  "imo": 9197789,
  "event_type": "DEPARTURE",
  "event_time_utc": "2026-10-23T15:48:00Z"
}
```

### Input

| Field          | What it does                                                                               |
|----------------|--------------------------------------------------------------------------------------------|
| `maxItems`     | Stop after this many rows. Required.                                                       |
| `countryCodes` | Only ports in these countries (pick one or several). Leave empty for every port worldwide. |
| `recordTypes`  | Choose any of the three tables. Leave empty for all three.                                 |

Ports are visited in a fixed order, about 700 ports an hour. A single port page usually yields dozens of rows, so a small `maxItems` finishes within a minute. For a complete worldwide pass, raise `maxItems` and the run timeout, or split the job by country.

### Resuming a large crawl

Every run reports a `resumeCursor` in its Output. To continue a long run where it stopped, without paying again for rows you already have, paste that value into the `resumeCursor` input of a new run. Resume promptly: a previous run's data expires with your account's retention window.

### Use cases

- Port congestion and berth-turnaround tracking for freight forwarders and commodity desks
- ETA queues for bunkering, agency and stevedoring planning
- Building a vessel call history by sampling a port's arrival and departure log on a schedule
- Joining MMSI and IMO to your fleet or sanctions lists

### Notes

- Data reflects what MyShipTracking publishes at the moment of the run. The in-port, expected and event tables are live and change continuously.
- The arrival and departure log is a rolling window, so schedule recurring runs and de-duplicate on `port_id` + `mmsi` + `event_type` + `event_time_utc` if you keep history.
- Respect the source's terms of use for your own downstream use of the data.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `resumeCursor` (type: `string`):

Leave empty for a fresh crawl. To CONTINUE a previous run where it stopped — without paying again for records you already received — paste the `resumeCursor` value from that run's Output (the run's OUTPUT key). Resume promptly: the previous run's data expires with your account's retention window (free tier: your ~10 most recent runs).

## `maxItems` (type: `integer`):

Maximum number of records to return.

## `countryCodes` (type: `array`):

Only ports in these countries. Leave empty for every port worldwide.

## `recordTypes` (type: `array`):

Which tables to return for each port. Leave empty for all three.

## Actor input object example

```json
{
  "sp_contact": "Share your email here...",
  "maxItems": 10
}
```

# Actor output Schema

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

No description

# 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 = {
    "sp_contact": "Share your email here...",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/myshiptracking-port-call-vessel-traffic-scraper").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 = {
    "sp_contact": "Share your email here...",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/myshiptracking-port-call-vessel-traffic-scraper").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 '{
  "sp_contact": "Share your email here...",
  "maxItems": 10
}' |
apify call jungle_synthesizer/myshiptracking-port-call-vessel-traffic-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/myshiptracking-port-call-vessel-traffic-scraper"
        }
    }
}
```

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/sLNnrpCUBf5F3tSAx/builds/ghExOeUCrFkzIyxY3/openapi.json
