# Container Tracking API, Vizion Milestones, ETAs and Positions (`nabeelbaghoor/container-tracking-api`) Actor

Track ocean containers through the Vizion API: latest status, carrier ETA and Vizion predictive ETA, every milestone across ocean, terminal and Class I rail, vessel traces, last known positions, transit schedules, risk briefs and port dwell metrics. Read only. Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/container-tracking-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Developer tools, Business, Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 container shipment status returneds

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

## Container Tracking API, Vizion Milestones, ETAs and Positions

Read the live status, ETA and every milestone of the ocean containers your Vizion account tracks, through the Vizion API with your own API key, as one clean dataset row per container, milestone, position, sailing, risk brief or port metric.

Vizion is a container tracking and ocean freight visibility platform. Its API standardizes container milestone events from ocean carriers, terminals, AIS and Class I railroads into one payload per container. This actor wraps its read only endpoints on prod.vizionapi.com (and the demo environment): give it container numbers such as MRKU3252720, master bills of lading, booking numbers or Vizion reference IDs and get origin and destination ports, carrier ETA and ETD, the Vizion predictive ETA, actual arrival, the latest milestone, the vessel and voyage, and the full milestone history, ready to download as JSON, CSV or Excel, schedule, or feed into a TMS, ERP, Google Sheets, BI dashboards and AI agents. Bring your own API key.

BYOK, not live tested: every path, parameter and enum comes from the OpenAPI definition Vizion publishes at docs.vizionapi.com/openapi/endpoints.json, and every route was confirmed live by probing it on 2026-10-24. The actor has not been run against a live Vizion key.

### What it does

- **Container shipment status**: one row per container with origin and destination ports (UN/LOCODE and name), inland origin and destination, carrier ETD and ETA, the Vizion predictive ETA, actual departure and arrival, the latest actual milestone with its time, place and transport mode, vessel name, IMO and voyage, container ISO type, demurrage and detention charges when the carrier reports them, tags, and the whole milestone list.
- **Container milestone events**: one row per milestone (gate out, gate in, loaded, vessel departure, vessel arrival, discharge, rail loading, available for pickup and the rest) with time, standardized and raw description, planned or actual, source (carrier, terminal, AIS, rail or Vizion), DCSA event type and classifier, POL or POD role, location with coordinates, vessel and voyage.
- **Bill of lading and booking tracking**: a master bill of lading or booking number leads to every container reference under it.
- **Reference lifecycle events**: creation, deactivation, extraction attempts, new updates and estimated departure and arrival changes, filtered by type and date.
- **Container vessel trace** (Vizion Pro tier): the vessel positions behind a container's journey, with speed, heading and optional projected points.
- **Last known container positions** (Vizion Pro tier): the latest position of every container in your account, with live AIS coordinates when it is on a vessel.
- **Tracked references**: the references your account tracks, filtered by active or inactive, carrier, last update status (such as no data or invalid container), created or updated date and tag.
- **Point to point transit schedules**: upcoming sailings between two ports with every leg, transshipment port, service and voyage, for CMA CGM, COSCO, Hapag-Lloyd, HMM, Maersk, Matson, MSC, ONE, OOCL, Evergreen and ZIM.
- **Supply chain risk briefs**: Vizion analyst briefs on the lanes you ship (severity, categories, Markdown summary and sources), and the shipments of yours each one affects.
- **Port and location performance**: import and export dwell, berth time, arrival to berth, import and export TEU and average delay for a port, country, continent or region, as one figure or a weekly or monthly series with a comparison.
- **Supported carriers**: every carrier Vizion tracks with its carrier code.
- **Read only and safe**: every call is a GET. The actor never creates, edits, tags, unsubscribes or deletes a reference, so it never adds a billable reference to your Vizion account.
- **Pay only for results**: containers with no reference or no update yet, and lookups the provider refuses, are recorded as a free row that says why, never charged.

### How to use it

1. Get a Vizion API key. Vizion issues keys to its customers through its sales team (vizionapi.com); existing customers get one from Vizion support. A demo environment key (demo.vizionapi.com, up to 50 active references and 15,000 calls a month) works too: set the environment to Demo.
2. Paste the key into the API key field, or set the DATA_API_KEY environment secret. The key is sent only to the Vizion API in the X-API-Key header and is removed from everything the actor logs.
3. Pick a mode, enter your container numbers, bills of lading, bookings, lanes or locations, and run. Containers must already be tracked in your Vizion account (created there, or through your own integration).
4. Download the dataset or connect it to your workflow through the Apify API, webhooks or integrations.

A missing or rejected key, or a plan without the chosen endpoint, ends the run cleanly with a status message that explains what to change, and nothing is charged.

### Input

| Field | Modes | Description |
| --- | --- | --- |
| `mode` | all | `shipmentStatus` (default), `milestoneEvents`, `lifecycleEvents`, `containerTrace`, `listReferences`, `lastKnownPositions`, `transitSchedules`, `riskBriefs`, `riskBriefShipments`, `portPerformance` or `carriers` |
| `containerIds`, `billsOfLading`, `bookingNumbers`, `referenceIds` | status, milestones, lifecycle, trace | One per line, such as `MRKU3252720` |
| `searchInactive` | status, milestones, lifecycle, trace | Also look among completed references (default on) |
| `includePlanned` | milestones | Keep ETAs and ETDs as well as actual events (default on) |
| `eventTypes`, `eventsFrom`, `eventsTo`, `eventOrder` | lifecycle | Event filters |
| `includeProjected` | trace | Add projected vessel positions |
| `referenceState`, `carrierCode`, `lastUpdateStatus`, `createdFrom`, `createdTo`, `updatedFrom`, `updatedTo`, `tagNames` | tracked references | Reference filters |
| `activeOnly` | last known positions | Active references only (default on) |
| `lanes`, `departureFrom`, `departureTo`, `scheduleCarriers` | schedules | Lanes such as `USHOU;CNSHA`, departure window, carriers |
| `briefIds` | affected shipments | Risk brief IDs |
| `locationNamespace`, `locationCodes`, `metrics`, `periodStart`, `periodEnd`, `grain`, `compare` | performance | Location, metric, period and series options |
| `environment` | all | `production` (default) or `demo` |
| `maxResults` | all | Row ceiling for the run (default 100) |
| `requestsPerMinute` | all | Pacing, default 60 |
| `apiKey` | all | Your Vizion API key (or the DATA_API_KEY secret) |

Example: latest status and ETA of two containers and every container on a bill of lading.

```json
{
    "mode": "shipmentStatus",
    "containerIds": ["MRKU3252720", "CMAU2118620"],
    "billsOfLading": ["MEDUMJ799185"]
}
```

Example: weekly import dwell at Los Angeles with the change from the week before.

```json
{
    "mode": "portPerformance",
    "locationCodes": ["USLAX"],
    "metrics": ["import_dwell"],
    "periodStart": "2026-09-01",
    "periodEnd": "2026-09-30",
    "grain": "week",
    "compare": "prior_period"
}
```

### Example output

An illustrative shipment status row, shaped like the documented update payload (values follow the documentation's example, not live data). The full Vizion update is kept under `details`.

```json
{
    "mode": "shipmentStatus",
    "modeLabel": "Container shipment status",
    "recordType": "shipmentStatus",
    "query": "MRKU3252720",
    "found": true,
    "referenceId": "69f036d7-b9bc-4209-8cd5-de167978e44f",
    "containerId": "MRKU3252720",
    "billOfLading": null,
    "carrierScac": "MAEU",
    "lastUpdateStatus": "data_received",
    "containerIso": "45G1",
    "originUnlocode": "INMUN",
    "originPort": "Mundra (INMUN)",
    "destinationUnlocode": "USCHS",
    "destinationPort": "Charleston (USCHS)",
    "atd": "2025-07-16T02:53:00.000+05:30",
    "eta": null,
    "predictedEta": null,
    "ata": "2025-08-23T06:02:00.000-04:00",
    "latestEvent": "Gate in empty",
    "eventTime": "2025-09-03T12:31:00.000-05:00",
    "latestEventLocation": "Memphis (USMEM)",
    "transportMode": "Truck",
    "vessel": "MAERSK CHICAGO",
    "milestoneCount": 27,
    "milestones": [{ "timestamp": "2025-07-03T00:17:00.000+05:30", "description": "Gate out from origin port", "planned": false, "source": "carrier", "mode": "Truck", "location": "Mundra (INMUN)" }],
    "note": null,
    "details": { "id": "8515dc93-979d-438c-a5cc-44ad1ec87e78", "status": "data_received", "payload": { "milestones": ["..."] } }
}
```

A milestone row carries `eventTime`, `description`, `rawDescription`, `planned`, `source`, `transportMode`, `locationName`, `locationUnlocode`, `latitude`, `longitude`, `vessel`, `vesselImo`, `voyage`, `shipmentLocationType` (POL, POD and so on), `dcsaEventType` and `dcsaEventClassifier`. A position row carries `latitude`, `longitude`, `transportMode`, `vessel` and `vesselImo`. A schedule row carries `carrier`, `etd`, `eta`, `transitTimeDays`, `transshipmentPorts`, `services` and `legs`. A risk brief row carries `title`, `severity`, `categories`, `publishedAt`, `summary` and `sources`. A performance row carries `metric`, `unit`, `periodStart`, `periodEnd`, `value`, `comparisonValue` and `isPartial`.

### Pricing

| Event | Price | Charged for |
| --- | --- | --- |
| `shipment-status` | 0.015 USD | Each container's latest status with the full milestone list |
| `tracking-event` | 0.005 USD | Each milestone, lifecycle event or trace point |
| `tracking-reference` | 0.005 USD | Each tracked reference, affected shipment or carrier |
| `container-position` | 0.01 USD | Each last known container position |
| `transit-offering` | 0.01 USD | Each scheduled sailing |
| `risk-brief` | 0.01 USD | Each risk brief |
| `port-performance` | 0.01 USD | Each performance figure |

Refused and empty lookups are never charged. Your Vizion plan is billed separately by Vizion; Vizion bills references you create, not the GET requests this actor makes.

### FAQ

#### What is the Vizion API?

It is the container tracking API of Vizion, Inc. It tracks ocean containers by container number, master bill of lading or booking number with the carrier code or automatic carrier identification, and returns standardized milestone events from ocean carriers, terminals, AIS vessel data and Class I railroads, with DCSA event codes, on prod.vizionapi.com.

#### How do I get the ETA of a container?

Choose Container shipment status and enter the container number. The `eta` column is the carrier's planned arrival at the destination port, `predictedEta` is the Vizion predictive ETA, and `ata` is the actual arrival once the vessel has arrived.

#### Does this actor start tracking new containers?

No. It is read only and never creates a reference, so it never adds a billable reference to your Vizion account. Start tracking in Vizion (its API, BoxTrack app, Airtable, Zapier or No Code Workbook integrations), then read the data here.

#### Can I track by bill of lading or booking number?

Yes, when your account already tracks that bill of lading or booking. The actor finds its parent reference and reads every child container reference under it.

#### Which carriers are supported?

Vizion's reference filters list carrier codes for Maersk, MSC, CMA CGM, COSCO, Hapag-Lloyd, ONE, Evergreen, Yang Ming, HMM, ZIM, OOCL, PIL, Wan Hai, Matson, Hamburg Sud, APL, ANL, Safmarine, Sealand and more. Run the Supported carriers mode for the live list with each carrier code.

#### Why does container trace or last known positions end with a plan message?

Both are Vizion Pro tier endpoints, and point to point schedules, Risk Briefs and Performance need their own capability on your account. Without it Vizion answers 401 or 403 and the run ends cleanly with that explanation; ask support@vizionapi.com to enable it.

#### How many API calls does a run use?

One or two calls to find each container's reference, then one call per container for status and milestones, or one call per page of a list. The run log reports the exact request count. GET requests are not billed by Vizion; demo keys are capped at 15,000 calls a month.

#### Do I need my own Vizion API key?

Yes. This is a bring your own key actor: it calls Vizion with your key, under your plan and your agreement with Vizion.

### Keyword map

Container tracking API, ocean container tracking, shipment tracking API, container ETA API, vessel ETA, predictive ETA, bill of lading tracking, booking number tracking, container milestones, DCSA event codes, intermodal rail tracking, Class I rail container tracking, last known container position, AIS container location, ocean freight visibility, supply chain visibility API, point to point ocean schedules, port dwell time, berth time, port congestion metrics, supply chain risk intelligence, demurrage and detention, Vizion API, BoxTrack.

### Licensing and data use

Vizion data is used here under your own Vizion subscription, and Vizion's API contract terms are agreed privately with each customer. Keep the results within the uses your agreement with Vizion allows. This actor is not affiliated with or endorsed by Vizion.

# Actor input Schema

## `mode` (type: `string`):

Container shipment status: one row per tracked container with origin and destination ports, carrier ETA, Vizion predictive ETA, actual arrival, latest milestone and vessel, from its most recent update. Container milestone events: one row per milestone across ocean, terminal and rail. Reference lifecycle events, Container vessel trace (Pro tier) and Last known container positions (Pro tier). Tracked references lists what your account tracks. Point to point transit schedules, Supply chain risk briefs, Shipments affected by a risk brief, Port and location performance and Supported carriers. Every call is a read only GET, which Vizion does not bill.

## `containerIds` (type: `array`):

Container status, milestone, lifecycle and trace modes. One ISO 6346 container number per line, such as MRKU3252720. The container must already be tracked as a reference in your Vizion account; this actor never creates references.

## `billsOfLading` (type: `array`):

Container status, milestone, lifecycle and trace modes. One master bill of lading number per line. Every container reference under it is read.

## `bookingNumbers` (type: `array`):

Container status, milestone, lifecycle and trace modes. One carrier booking number per line. Every container reference under it is read.

## `referenceIds` (type: `array`):

Container status, milestone, lifecycle and trace modes. One Vizion reference UUID per line, as returned by the Tracked references mode or your own integration.

## `searchInactive` (type: `boolean`):

Container status, milestone, lifecycle and trace modes. When no active reference matches a container, bill of lading or booking, also look among inactive (completed or unsubscribed) references.

## `includePlanned` (type: `boolean`):

Container milestone events only. Keeps estimated milestones (ETAs, ETDs and the Vizion predictive ETA) alongside actual ones.

## `eventTypes` (type: `array`):

Reference lifecycle events only, optional. Keeps only these event types, such as estimated arrival changed.

## `eventsFrom` (type: `string`):

Reference lifecycle events only, optional. YYYY-MM-DD; events that occurred on or after it.

## `eventsTo` (type: `string`):

Reference lifecycle events only, optional. YYYY-MM-DD; events that occurred on or before it.

## `eventOrder` (type: `string`):

Reference lifecycle events only. Sort order on the time the event occurred.

## `includeProjected` (type: `boolean`):

Container vessel trace only. Adds forecast vessel positions alongside actual ones when your account has the projected trace capability.

## `referenceState` (type: `string`):

Tracked references only. Active references are still being tracked; inactive ones were completed, auto unsubscribed or unsubscribed.

## `carrierCode` (type: `string`):

Tracked references only, optional. Keeps references of this Vizion carrier code, such as MAEU for Maersk or MSCU for MSC.

## `lastUpdateStatus` (type: `string`):

Tracked references only, optional. Keeps references whose last update has this status, such as no data or invalid container, to find shipments that need attention.

## `createdFrom` (type: `string`):

Tracked references only, optional. YYYY-MM-DD; references created on or after it.

## `createdTo` (type: `string`):

Tracked references only, optional. YYYY-MM-DD; references created on or before it.

## `updatedFrom` (type: `string`):

Tracked references only, optional. YYYY-MM-DD; references changed on or after it. With the inactive state it lists references deactivated since then.

## `updatedTo` (type: `string`):

Tracked references only, optional. YYYY-MM-DD; references changed on or before it.

## `tagNames` (type: `array`):

Tracked references only, optional. Up to 10 Vizion tag names, matched without regard to case.

## `activeOnly` (type: `boolean`):

Last known container positions only. Restricts the positions to active references.

## `lanes` (type: `array`):

Point to point transit schedules only. One lane per line as origin and destination UN/LOCODEs separated by ";", such as USHOU;CNSHA or CNSHA;NLRTM.

## `departureFrom` (type: `string`):

Point to point transit schedules only, optional. YYYY-MM-DD; Vizion defaults to today.

## `departureTo` (type: `string`):

Point to point transit schedules only, optional. YYYY-MM-DD; Vizion defaults to 14 days after the earliest departure.

## `scheduleCarriers` (type: `array`):

Point to point transit schedules only, optional. Keeps sailings operated by these carriers.

## `briefIds` (type: `array`):

Shipments affected by a risk brief only. One brief_id per line, from the Supply chain risk briefs mode.

## `locationNamespace` (type: `string`):

Port and location performance only. How the location codes are read.

## `locationCodes` (type: `array`):

Port and location performance only. One location code per line, such as the UN/LOCODE USLAX or NLRTM, or a country code for the country type.

## `metrics` (type: `array`):

Port and location performance only. One row set per location and metric.

## `periodStart` (type: `string`):

Port and location performance only, required there. YYYY-MM-DD, inclusive.

## `periodEnd` (type: `string`):

Port and location performance only, required there. YYYY-MM-DD, inclusive.

## `grain` (type: `string`):

Port and location performance only, optional. A weekly or monthly series instead of one figure for the whole period.

## `compare` (type: `string`):

Port and location performance only, optional. Adds a comparison value. Prior year cannot be combined with a grain.

## `environment` (type: `string`):

Which Vizion environment your key and references belong to. References created in one are not visible in the other.

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

The most rows this run returns and charges for.

## `requestsPerMinute` (type: `integer`):

Pacing for calls to the Vizion API. Your Vizion plan sets the real ceiling.

## `apiKey` (type: `string`):

Your own Vizion API key. Stored as a secret and sent only to prod.vizionapi.com or demo.vizionapi.com in the X-API-Key header; it is never logged. You can instead set the DATA_API_KEY environment secret.

## Actor input object example

```json
{
  "mode": "shipmentStatus",
  "containerIds": [
    "MRKU3252720"
  ],
  "searchInactive": true,
  "includePlanned": true,
  "eventOrder": "asc",
  "includeProjected": false,
  "referenceState": "active",
  "activeOnly": true,
  "locationNamespace": "unlocode",
  "environment": "production",
  "maxResults": 100,
  "requestsPerMinute": 60
}
```

# Actor output Schema

## `records` (type: `string`):

One row per container status, milestone, event, position, reference, carrier, sailing, risk brief or performance figure.

# 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 = {
    "containerIds": [
        "MRKU3252720"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/container-tracking-api").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 = { "containerIds": ["MRKU3252720"] }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/container-tracking-api").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 '{
  "containerIds": [
    "MRKU3252720"
  ]
}' |
apify call nabeelbaghoor/container-tracking-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/container-tracking-api"
        }
    }
}
```

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/hqhp5PVmF9JdsTmHS/builds/5a5zRrwZZJLAA1QFI/openapi.json
