# PIL Cargo Tracking Scraper (`muhammetakkurtt/pil-cargo-tracking-scraper`) Actor

Track Pacific International Lines (PIL) container shipments and extract real-time tracking data. Enter container, B/L, booking or PO numbers and get the shipment route, transhipment legs with vessels and ETAs, and the full container event timeline as structured JSON, CSV or Excel.

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

## Pricing

from $5.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![PIL Container Tracking & Shipment Data Scraper — Track by Container, B/L, Booking or PO Number](https://i.postimg.cc/d3B0CJ2M/pasific-international-lines-banner.png)

## PIL Cargo Tracking Scraper

### What does PIL Cargo Tracking Scraper do?

**PIL Cargo Tracking Scraper** is an [Apify actor](https://apify.com/actors) that extracts real-time shipment tracking data from [Pacific International Lines (PIL)](https://www.pilship.com/), one of the largest container shipping carriers in Asia. Simply enter your tracking numbers — **container numbers**, **B/L (Bill of Lading) numbers**, **booking references**, or **PO numbers** — and the scraper automatically detects the type, queries the PIL tracking system, and returns structured shipment data ready for analysis or integration.

No coding experience is needed. Paste your numbers, click **Start**, and download the results in JSON, CSV, Excel, or other formats.

### Why scrape PIL shipment data?

Manually checking the PIL website for container tracking updates is time-consuming, especially when managing multiple shipments across different trade lanes. This actor automates PIL cargo tracking so you can:

- 📦 **Monitor shipment status** — Get the full container event timeline, route and transhipment legs for every shipment
- 🔄 **Track in bulk** — Track hundreds of container, B/L, booking or PO numbers in a single run
- 📊 **Feed data into dashboards** — Export structured tracking data to Google Sheets, Slack, email, or your own systems via [Apify integrations](https://apify.com/integrations)
- ⏰ **Set up automated tracking** — Schedule periodic runs to monitor shipment progress without manual checks
- 🚨 **Catch exceptions early** — Track loading, discharge, transhipment and empty-return events as they happen
- 🔗 **Build logistics pipelines** — Use the [Apify API](https://docs.apify.com/api/v2) to integrate PIL tracking data into your supply chain tools

### What data can you extract from PIL?

The scraper extracts the following data points from PIL's tracking system:

| Data Field | Description |
|---|---|
| **Tracking Number** | The number you submitted |
| **Type** | Detected number type (Container / B/L / Booking / Purchase Order) |
| **Reference Number** | PIL booking / B/L reference for the shipment |
| **Route** | Place of receipt and place of delivery (with UN/LOCODE port codes) |
| **Container** | Container count and type/size (e.g. `1X40HC`) |
| **Transhipments** | Each leg: port, estimated arrival/departure, next port, vessel and voyage |
| **Event Timeline** | Every container event — name, date, port and vessel/voyage |

### Ready-to-Run Examples

Get started in seconds — open the example in the Apify Console and click **Run**:

-   **[Track PIL Containers by Container Number](https://apify.com/muhammetakkurtt/pil-cargo-tracking-scraper/examples/track-pil-containers-by-container-number)** — enter a container number and get its route, transhipment legs and full event timeline.

### How to track PIL shipments step by step

1. Go to the [PIL Cargo Tracking Scraper](https://apify.com/muhammetakkurtt/pil-cargo-tracking-scraper) on Apify Store
2. Click **Try for free** to open the actor in the Apify Console
3. Enter your tracking numbers in the **Tracking Numbers** field — one per line. Container numbers (e.g., `PCIU1666440`), B/L numbers, booking references and PO numbers are all accepted; the type is detected automatically
4. Click **Start** to run the scraper
5. When the run finishes, preview the results in the **Output** tab, or download them as **JSON**, **CSV**, **Excel**, **XML**, **HTML**, or **RSS**

#### Example input

```json
{
  "trackingNumbers": [
    "PCIU1666440"
  ]
}
````

#### PIL tracking input parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `trackingNumbers` | Array of strings | ✅ Yes | The numbers to track — one per line. Container, B/L, booking and PO numbers are all accepted; the type is detected automatically. |

### PIL Cargo Tracking Scraper output example

Each tracked number produces one structured item in the dataset. Here is a shortened example for a container number:

```json
{
  "tracking_number": "PCIU1666440",
  "type": "Container",
  "ref_number": "KHI600104600",
  "place_of_receipt": "KARACHI",
  "place_of_receipt_code": "PKKHI",
  "place_of_delivery": "ZHENJIANG",
  "place_of_delivery_code": "CNZHE",
  "containers_num": "1X20GP",
  "transhipments": [
    {
      "port_name": "KARACHI",
      "estimated_departure": "2026-06-25",
      "next_port_name": "SHANGHAI",
      "next_port_arrival": "2026-07-14",
      "vessel": "USSAMA BHUM",
      "voyage": "VUSB0013E"
    }
  ],
  "events": [
    {
      "event_name": "Vessel Loading",
      "event_date": "2026-06-24 18:40:00",
      "port_name": "KARACHI",
      "vessel": "USSAMA BHUM",
      "voyage": "VUSB0013E"
    }
  ]
}
```

> The actual output includes every transhipment leg and event. Numbers with no current tracking data are skipped and not charged.

### Integrations and PIL tracking API

PIL Cargo Tracking Scraper is built on the [Apify platform](https://apify.com/), which gives you powerful options to automate and integrate your cargo tracking workflow:

- **API access** — Call the actor programmatically via the [Apify API](https://docs.apify.com/api/v2) to track shipments from your own applications
- **Scheduled runs** — Set up [scheduled recurring runs](https://docs.apify.com/platform/schedules) to monitor shipment progress daily, hourly, or at any interval
- **Webhooks** — Receive notifications when a tracking run finishes so you can trigger downstream processes
- **Integrations** — Connect tracking 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 results in JSON, CSV, Excel, XML, HTML, or RSS

This makes PIL Cargo Tracking Scraper a drop-in solution for supply chain management systems, logistics dashboards, and automated shipping notifications.

### Frequently asked questions

#### Is it legal to scrape PIL?

Our scrapers are ethical and do not extract any private user data. They only extract publicly available shipment tracking information that any visitor can access on the PIL website with a tracking number. We therefore believe that our scrapers, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain data related to commercial shipments. If you're unsure about your use case, consult your legal team.

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

Yes. Enter as many tracking numbers as you need in the **Tracking Numbers** field — one per line. The scraper processes them in parallel batches for maximum speed and uses automatic IP rotation to handle rate limits.

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

The scraper accepts four types of numbers and **detects the type automatically** — no manual selection needed:

- **Container numbers** — ISO 6346 format (4 letters + 7 digits, e.g., `PCIU1666440`, `PILU8000105`, `PIDU2000424`)
- **B/L (Bill of Lading) numbers** — PIL B/L reference numbers
- **Booking references** — PIL booking reference numbers
- **PO numbers** — Purchase order numbers

#### What if a tracking number is not found?

If a number returns no tracking data from PIL's system, the scraper logs a warning and skips it. You are not charged for numbers that return no results.

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

If you encounter any issues or have questions about the PIL Cargo Tracking Scraper, you can:

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

We welcome all feedback and feature requests!

# Actor input Schema

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

The numbers to track — one per line. Container numbers, bill-of-lading numbers, booking references and PO numbers are all accepted; the type is detected automatically.

## Actor input object example

```json
{
  "trackingNumbers": [
    "PCIU1666440"
  ]
}
```

# Actor output Schema

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

Collected PIL shipment tracking data, one item per tracking number

# 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/pil-cargo-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/pil-cargo-tracking-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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/pil-cargo-tracking-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammetakkurtt/pil-cargo-tracking-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "PIL Cargo Tracking Scraper",
        "description": "Track Pacific International Lines (PIL) container shipments and extract real-time tracking data. Enter container, B/L, booking or PO numbers and get the shipment route, transhipment legs with vessels and ETAs, and the full container event timeline as structured JSON, CSV or Excel.",
        "version": "0.0",
        "x-build-id": "wobZxBdE0JEBO1Kk6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/muhammetakkurtt~pil-cargo-tracking-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-muhammetakkurtt-pil-cargo-tracking-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/muhammetakkurtt~pil-cargo-tracking-scraper/runs": {
            "post": {
                "operationId": "runs-sync-muhammetakkurtt-pil-cargo-tracking-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/muhammetakkurtt~pil-cargo-tracking-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-muhammetakkurtt-pil-cargo-tracking-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "trackingNumbers"
                ],
                "properties": {
                    "trackingNumbers": {
                        "title": "Tracking Numbers",
                        "minItems": 1,
                        "type": "array",
                        "description": "The numbers to track — one per line. Container numbers, bill-of-lading numbers, booking references and PO numbers are all accepted; the type is detected automatically.",
                        "default": [
                            "PCIU1666440"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
