# APM Terminals Tracking Scraper (`muhammetakkurtt/apm-terminals-tracking-scraper`) Actor

Extract real-time APM Terminals data at scale. Track import availability, container event history and export bookings by container, B/L or booking number, and pull per-terminal vessel schedules — across 33 terminals worldwide. Bulk, structured, no login. Schedule runs or integrate via the Apify API.

- **URL**: https://apify.com/muhammetakkurtt/apm-terminals-tracking-scraper.md
- **Developed by:** [Muhammet Akkurt](https://apify.com/muhammetakkurtt) (community)
- **Categories:** Automation, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $10.00 / 1,000 tracking results

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

![APM Terminals Tracking Scraper – track containers, import availability, bookings & vessel schedules](https://i.postimg.cc/cCh0mJ1W/apm-terminals-banner.png)

## APM Terminals Tracking Scraper

### What does APM Terminals Tracking Scraper do?

**APM Terminals Tracking Scraper** is an [Apify actor](https://apify.com/actors) that extracts real-time container tracking data from [APM Terminals](https://www.apmterminals.com/en/track-and-trace) — the terminal-operating arm of A.P. Moller-Maersk, which runs 33 container terminals worldwide. Pick a **query type** and one or more **terminals**, enter your **container**, **bill-of-lading**, or **booking numbers**, and the scraper returns structured terminal data ready for analysis or integration:

- **Import Availability** — whether a container is ready for pickup, any holds, yard position, demurrage, discharge/gate times, vessel and ETA.
- **Container Event History** — the full event timeline (discharged, gated out, loaded…) with dates, positions and operator.
- **Export Booking** — booking and container readiness, cut-offs, VGM, voyage and departure details.
- **Vessel Schedule** — a terminal's inbound/outbound vessels with scheduled, estimated and actual arrival & departure plus cargo cut-offs.

No coding experience is needed. Choose your query type and terminals, paste your numbers, click **Start**, and download the results in JSON, CSV, Excel, or other formats — no APM Terminals login required.

### Ready-to-run examples

Prebuilt example tasks you can open and run in one click:

- **[APM Terminals vessel schedule — Algeciras (ESALG)](https://apify.com/muhammetakkurtt/apm-terminals-tracking-scraper/examples/apm-terminals-vessel-schedule-algeciras)** — live inbound and outbound vessel schedule for the Algeciras terminal, with scheduled, estimated and actual arrival/departure times and cargo cut-offs; no login.

### Why scrape APM Terminals data?

APM Terminals handles cargo for virtually every major shipping line, and each terminal publishes live operational data that your carrier's own tracking often doesn't show — yard position, holds, demurrage clocks and berth windows. Checking each terminal portal by hand is slow and doesn't scale. This actor automates it so you can:

- 📦 **See terminal-level status** — combine availability, holds, demurrage and discharge/gate times with your carrier tracking for true end-to-end visibility.
- ⏱️ **Avoid demurrage & detention** — watch `goodThroughDateTimeLocal` and `demurrageOwed` and pick up containers before charges start.
- 📅 **Plan around vessels** — pull live per-terminal vessel schedules and cargo cut-offs to time your bookings and pickups.
- 🔄 **Track in bulk** — query many containers, B/L or booking numbers across multiple terminals in a single run.
- 🔗 **Build logistics pipelines** — feed structured data to [Google Sheets](https://apify.com/integrations/google-sheets), Slack, or your own systems via the [Apify API](https://docs.apify.com/api/v2) and [integrations](https://apify.com/integrations).

### What data can you extract from APM Terminals?

Each query type returns a rich object. The most useful fields per mode:

| Query type | Key fields |
|---|---|
| **Import Availability** | `containerNumber`, `billOfLadingNumber`, `isReadyForDelivery`, `freightHold` / `customsHold` / `otherHolds`, `yardPosition`, `dischargeDateTimeLocal`, `gatedOutDateTimeLocal`, `goodThroughDateTimeLocal`, `demurrageOwed`, `vesselName`, `vesselOperator` (+ `vesselOperatorName`), `expectedTimeArrivalDateTimeLocal` / `actualTimeArrivalDateTimeLocal`, `grossWeight` / `netWeight`, `equipmentTypeIsoCode`, `customsStatus`, `hasAppointment` |
| **Container Event History** | `containerId`, `shippingLine` (+ `shippingLineName`), `containerEventDetails[]` → `eventType`, `performedDateTimeLocal`, `positionNotes`, `operator` |
| **Export Booking** | `bookingNumber`, `isReadyForLoad`, `hasVGM`, `shippingLineOperator` (+ `shippingLineOperatorName`), `vesselName`, `outboundVoyageNumber`, `cargoCutoffDateTimeLocal`, `estimatedDepartureDateTimeLocal`, `gateInDateTimeLocal`, `loadedOnVesselDateTimeLocal`, `equipmentTypesTotal` / `equipmentTypesReceived`, `emptyContainers` |
| **Vessel Schedule** | `vesselName`, `vesselStatus`, `inboundVoyageNumber` / `outboundVoyageNumber`, `shippingLines`, `scheduledArrivalDateTimeLocal` / `estimatedArrivalDateTimeLocal` / `actualArrivalDateTimeLocal` (and the matching departure fields), `cargoCutoffDateTimeLocal`, `reeferCutoffDateTimeLocal`, `berthName` |

Carrier codes (e.g. `MAE`, `MSC`, `HLC`) are resolved to full names in the matching `...Name` field, so you don't have to maintain your own lookup table.

### How to track APM Terminals shipments step by step

1. Go to the [APM Terminals Tracking Scraper](https://apify.com/muhammetakkurtt/apm-terminals-tracking-scraper) on Apify Store.
2. Click **Try for free** to open the actor in the Apify Console.
3. Choose a **Query type** — Import Availability, Container Event History, Export Booking or Vessel Schedule.
4. Pick one or more **Terminals** by their UN/LOCODE (see the list below), and — for the first three modes — paste your **Tracking numbers** (container / B/L / booking), one per line.
5. Click **Start**. When the run finishes, preview the results in the **Output** tab or download them as **JSON**, **CSV**, **Excel**, **XML**, **HTML**, or **RSS**.

#### Example input

Import availability for one container across two terminals:

```json
{
  "queryType": "import-availability",
  "terminals": ["ESALG", "USLAX"],
  "trackingNumbers": ["HLXU8026066", "MRKU1234567"]
}
```

Vessel schedule for a single terminal (no tracking numbers needed):

```json
{
  "queryType": "vessel-schedule",
  "terminals": ["INNSA"]
}
```

#### APM Terminals tracking input parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `queryType` | String | ✅ Yes | `import-availability` | One of `import-availability`, `container-events`, `export-booking`, `vessel-schedule`. |
| `terminals` | Array of strings | ✅ Yes | `["ESALG"]` | APM Terminals UN/LOCODE(s) to query — one or more. |
| `trackingNumbers` | Array of strings | For the 3 id modes | `["HLXU8026066"]` | Container / bill-of-lading / booking numbers, one per line. Not used for Vessel Schedule. |
| `scheduleRangeStartDays` / `scheduleRangeEndDays` | Integer | No | — | Optional day-range window for Vessel Schedule (advanced; omit for the default schedule). |

#### Terminals (33)

`terminal` uses the **UN/LOCODE**. Container Event History is available only at the terminals marked ✅. **NLMSV (Maasvlakte II)** keeps its data behind APM's own login, so every mode returns a not-charged item with `available: false` for it — it is listed here only for completeness.

| Code | Terminal | Country | Events |
|---|---|---|---|
| INNSA | Mumbai | India | |
| INPPV | Pipavav | India | |
| DKAAR | Aarhus | Denmark | |
| ESVLC | Valencia | Spain | |
| ESALG | Algeciras | Spain | ✅ |
| ESBCN | Barcelona | Spain | |
| ESGIJ | Gijon | Spain | |
| NLMSV | Maasvlakte II | Netherlands | ✅ |
| SEGOT | Gothenburg | Sweden | ✅ |
| ITVDL | Vado Ligure | Italy | ✅ |
| GEPTI | Poti | Georgia | ✅ |
| HRRJK | Rijeka | Croatia | ✅ |
| USNWK | Elizabeth | USA | ✅ |
| USLAX | Pier 400 Los Angeles | USA | ✅ |
| USMIA | Miami | USA | ✅ |
| USMOB | Mobile | USA | ✅ |
| GTPRQ | Puerto Quetzal | Guatemala | |
| CRMOB | Moin | Costa Rica | ✅ |
| BRPEC | Pecem | Brazil | ✅ |
| BRSUA | Suape | Brazil | |
| PECLL | Callao | Peru | |
| ARBUE | Buenos Aires | Argentina | |
| MXLZC | Lazaro Cardenas | Mexico | ✅ |
| MXPGO | Progresso | Mexico | ✅ |
| COBUN | Buenaventura | Colombia | ✅ |
| EGPSD | Suez Canal (SCCT) | Egypt | |
| BHKBS | Bahrain | Bahrain | |
| MATNG | MedPort Tangier | Morocco | |
| MAPTM | Tangier | Morocco | ✅ |
| NGONN | Onne | Nigeria | ✅ |
| NGAPP | Apapa | Nigeria | ✅ |
| JOAQJ | Aqaba (ACT) | Jordan | |
| LRMLW | Monrovia | Liberia | ✅ |

### APM Terminals Tracking Scraper output examples

Every lookup produces one structured item in the dataset — one per **tracking number × terminal**, or one per **terminal** for vessel schedules. `found` tells you whether data was returned, and carrier codes are resolved to names. The examples below are shortened for clarity.

**Import Availability**

```json
{
  "queryType": "import-availability",
  "terminal": "ESALG",
  "trackingNumber": "MRKU1234567",
  "found": true,
  "data": {
    "containerNumber": "MRKU1234567",
    "billOfLadingNumber": "123456789",
    "isReadyForDelivery": true,
    "freightHold": false,
    "customsHold": false,
    "otherHolds": false,
    "yardPosition": "B-12-3-2",
    "equipmentTypeIsoCode": "45G1",
    "grossWeight": "24500",
    "vesselName": "MAERSK HERRERA",
    "vesselOperator": "MAE",
    "vesselOperatorName": "MAERSKLINE",
    "actualTimeArrivalDateTimeLocal": "2026-10-02T06:30:00+02:00",
    "dischargeDateTimeLocal": "2026-10-02T11:15:00+02:00",
    "goodThroughDateTimeLocal": "2026-10-09T23:59:00+02:00",
    "demurrageOwed": "0",
    "customsStatus": "Released",
    "hasAppointment": false
  },
  "scrapedAt": "2026-10-07T10:00:00.000Z"
}
```

**Container Event History**

```json
{
  "queryType": "container-events",
  "terminal": "ESALG",
  "trackingNumber": "HLXU8026066",
  "found": true,
  "data": {
    "containerId": "HLXU8026066",
    "shippingLine": "HLC",
    "shippingLineName": "Hapag Lloyd Container Line",
    "containerEventDetails": [
      {
        "eventType": "Discharged",
        "performedDateTimeLocal": "2026-09-28T14:20:00+02:00",
        "positionNotes": "Yard block B",
        "operator": "APM Terminals Algeciras"
      },
      {
        "eventType": "Gate Out",
        "performedDateTimeLocal": "2026-09-30T09:05:00+02:00",
        "positionNotes": "Truck gate",
        "operator": "APM Terminals Algeciras"
      }
    ]
  },
  "scrapedAt": "2026-10-07T10:00:00.000Z"
}
```

**Export Booking**

```json
{
  "queryType": "export-booking",
  "terminal": "USMOB",
  "trackingNumber": "216123456",
  "found": true,
  "data": {
    "bookingNumber": "216123456",
    "isReadyForLoad": true,
    "hasVGM": true,
    "shippingLineOperator": "MSC",
    "shippingLineOperatorName": "Mediterranean Shipping Company SA",
    "vesselName": "MSC AMBITION",
    "outboundVoyageNumber": "441A",
    "cargoCutoffDateTimeLocal": "2026-10-10T17:00:00-05:00",
    "estimatedDepartureDateTimeLocal": "2026-10-12T22:00:00-05:00",
    "gateInDateTimeLocal": "2026-10-08T13:40:00-05:00",
    "equipmentTypesReceived": 2,
    "equipmentTypesTotal": 2
  },
  "scrapedAt": "2026-10-07T10:00:00.000Z"
}
```

**Vessel Schedule**

```json
{
  "queryType": "vessel-schedule",
  "terminal": "INNSA",
  "found": true,
  "terminalDateTimeLocalStamp": "2026-10-06T21:03:28+05:30",
  "vesselSchedule": [
    {
      "vesselName": "MOL EARNEST",
      "inboundVoyageNumber": "0117",
      "outboundVoyageNumber": "0117",
      "scheduledArrivalDateTimeLocal": "2026-10-02T07:00:00+05:30",
      "estimatedArrivalDateTimeLocal": "2026-10-03T03:00:00+05:30",
      "actualArrivalDateTimeLocal": "2026-10-03T06:00:00+05:30",
      "scheduledDepartureDateTimeLocal": "2026-10-03T07:00:00+05:30",
      "actualDepartureDateTimeLocal": "2026-10-03T21:48:00+05:30",
      "cargoCutoffDateTimeLocal": "2026-10-02T21:00:00+05:30",
      "reeferCutoffDateTimeLocal": "2026-10-02T21:00:00+05:30",
      "berthName": "B2",
      "shippingLines": ["ONE", "SMD"],
      "vesselStatus": "Closed"
    }
  ],
  "scrapedAt": "2026-10-07T10:00:00.000Z"
}
```

> When a container isn't at the queried terminal, the item comes back with `found: false` and `data: null` — pick the right terminal(s) to get populated results. You can download the complete dataset in **JSON**, **CSV**, **Excel**, and other formats from the **Output** tab.

### Integrations and APM Terminals tracking API

APM Terminals Tracking Scraper is built on the [Apify platform](https://apify.com/), which lets you automate and integrate your tracking workflow:

- **API access** — Run the actor programmatically via the [Apify API](https://docs.apify.com/api/v2) and pull results straight into your own apps.
- **Scheduled runs** — Set up [scheduled runs](https://docs.apify.com/platform/schedules) to refresh availability, events or schedules hourly, daily, or at any interval.
- **Webhooks** — Trigger downstream processes the moment a run finishes.
- **Integrations** — Connect results to [Google Sheets](https://apify.com/integrations/google-sheets), [Slack](https://apify.com/integrations/slack), [Zapier](https://apify.com/integrations/zapier), [Make](https://apify.com/integrations/make), and [many more](https://apify.com/integrations).
- **Data formats** — Download as JSON, CSV, Excel, XML, HTML, or RSS.

This makes the actor a drop-in source of APM Terminals tracking data for supply-chain systems, logistics dashboards, and demurrage/detention alerts.

### Frequently asked questions

#### Is it legal to scrape APM Terminals?

This actor only reads the same **public** Track & Trace information that any visitor can view on apmterminals.com without an account — it extracts no private user data. Used for ethical purposes, it is safe. Note that results can relate to commercial shipments, so if you're unsure about your use case, check with your legal team.

#### Can I track multiple shipments at once?

Yes. Add as many tracking numbers as you need (one per line) and one or more terminals — every tracking number × terminal is one lookup, and the scraper processes lookups in parallel batches for speed.

#### What types of tracking numbers are supported?

Container numbers, bill-of-lading numbers and booking numbers, depending on the mode:

- **Import Availability** — container or B/L numbers
- **Container Event History** — container numbers
- **Export Booking** — container or booking numbers

You don't need to pre-classify them — APM Terminals decides how each number resolves.

#### Why do some lookups return `found: false`?

APM Terminals' data is **per terminal** — a container only shows data at the terminal that actually handled it. If you query a terminal that didn't handle it, you get `found: false`. Pick the right terminal(s), or query several and keep the one that resolves.

#### How am I charged?

You are charged **per lookup** — one charge per tracking number per terminal (and once per terminal for vessel schedules) — whenever APM Terminals returns a result, **including when a container is simply not at the queried terminal** (`found: false`). You are **not** charged for a lookup that can't return data for reasons outside the data itself — for example a terminal that only serves logged-in users (returned with `available: false`). Because every lookup runs a full terminal query, choosing the right terminal(s) gives you populated results.

#### Why does a terminal sometimes say it requires a login?

A few APM Terminals terminals keep their data behind their own login (for example, Maasvlakte II). Lookups for those terminals come back with `available: false` and a short note, and they are **not charged**.

#### How do I get support or report issues?

If you run into any issues or have questions, you can:

- Open an issue on the [Issues tab](https://apify.com/muhammetakkurtt/apm-terminals-tracking-scraper/issues) of the actor page
- Reach out to the developer for a custom solution based on your specific tracking needs

All feedback and feature requests are welcome!

# Actor input Schema

## `queryType` (type: `string`):

Which APM Terminals data to pull. Import Availability, Container Event History and Export Booking take tracking numbers; Vessel Schedule takes only the terminal(s).

## `terminals` (type: `array`):

APM Terminals UN/LOCODE(s) to query — one per line. Examples: ESALG (Algeciras), ESVLC (Valencia), USLAX (Los Angeles Pier 400), USNWK (Elizabeth), INNSA (Mumbai), MAPTM (Tangier). Full list of 33 terminals in the README. Note: Container Event History is only available at 19 terminals (ESALG, NLMSV, SEGOT, ITVDL, GEPTI, HRRJK, USNWK, USLAX, USMIA, USMOB, CRMOB, BRPEC, MXLZC, MXPGO, COBUN, MAPTM, NGONN, NGAPP, LRMLW). NLMSV (Maasvlakte II) is behind the APM login and returns no public data on any mode.

## `trackingNumbers` (type: `array`):

Container numbers, bill-of-lading numbers or booking numbers — one per line. Required for Import Availability, Container Event History and Export Booking; ignored for Vessel Schedule.

## `scheduleRangeStartDays` (type: `integer`):

Vessel Schedule only (optional, advanced). Days before today to include.

## `scheduleRangeEndDays` (type: `integer`):

Vessel Schedule only (optional, advanced). Days ahead to include.

## Actor input object example

```json
{
  "queryType": "vessel-schedule",
  "terminals": [
    "ESALG"
  ],
  "trackingNumbers": [
    "HLXU8026066"
  ]
}
```

# Actor output Schema

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

One dataset item per lookup with the queried APM Terminals data.

# 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("muhammetakkurtt/apm-terminals-tracking-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("muhammetakkurtt/apm-terminals-tracking-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 '{}' |
apify call muhammetakkurtt/apm-terminals-tracking-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammetakkurtt/apm-terminals-tracking-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/fvkhlC2aTBP3mhglF/builds/RVrfgS9U6FhWpAm4Y/openapi.json
