# PIL Container Tracking - Pacific International Lines (`pshivam/pil-tracking-scraper`) Actor

Track PIL (Pacific International Lines) containers in bulk: latest status, vessel and voyage, route with ports and dates, ETA and the full event history with pending steps. Only changed shipments on request. No proxy, no login. Export to Excel, CSV, JSON or API.

- **URL**: https://apify.com/pshivam/pil-tracking-scraper.md
- **Developed by:** [Shivam Prajapati](https://apify.com/pshivam) (community)
- **Categories:** Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.60 / 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

## PIL Container Tracking - Pacific International Lines

**Track PIL (Pacific International Lines) containers in bulk.** Paste a list of container numbers and get each container's **latest status, vessel and voyage, route with ports and dates, ETA and the full event history**, including the steps still to come, as clean data. The Actor reads PIL's own Track & Trace service, so the data is what PIL shows its customers. Get only the containers that moved since your last run. No proxy, no login. Export to Excel, CSV, JSON or the API.

**Actively maintained.** Last update: 2026-11-12. Every release passes 80+ automated tests, and Apify test-runs it every day.

### What can you use it for?

- **Track your containers every day.** Schedule the Actor on your list and turn on **Only changed shipments** to get a row only when a container moved.
- **Plan arrivals and pick-ups.** Read the ETA, the vessel and voyage, and the next expected step (gate out, empty return).
- **Check empty return dates.** The event history shows when the container was released, loaded, discharged, picked up and returned.
- **Feed a TMS, ERP or spreadsheet.** Send the result to Google Sheets, Make, Zapier, n8n or your own app.
- **Forwarders and 3PLs.** Track the containers of many customers in one run and filter by status.

### What data do you get?

One row per container.

| Field | What it is |
|---|---|
| `trackingNumber`, `numberType`, `containerNumber` | The container number, and its type (always `container`) |
| `status`, `statusAt`, `statusLocation` | The latest event that has happened, when (local time of the place) and where |
| `vessel`, `voyage` | The vessel and voyage code of the latest voyage leg |
| `nextEvent`, `nextEventLocation` | The next step PIL expects, for example `I/B Empty Container Returned` |
| `portOfLoading`, `portOfLoadingCode` | The load port and its UN/LOCODE |
| `etaPort`, `eta` | The port the route ends at (UN/LOCODE) and the expected arrival date |
| `eventCount`, `events` | Every event in PIL's order: `at`, `event`, `location`, `vessel`, `voyage`, `pending` |
| `route` | Every port of the route: `locationType`, `location`, `locationCode`, `arrivalDate`, `deliveryDate`, `vessel`, `voyage`, `nextLocationCode`, `nextArrivalDate` |
| `trackingUrl` | PIL's own Track & Trace page |
| `checkedAt` | When the container was checked (UTC) |

#### Example result

```json
{
  "trackingNumber": "PCIU8562508",
  "numberType": "container",
  "containerNumber": "PCIU8562508",
  "status": "Truck Gate Out from I/B Terminal",
  "statusAt": "2026-11-07T07:10:00",
  "statusLocation": "MELBOURNE",
  "vessel": "YM ENLIGHTENMENT",
  "voyage": "VYEL0096S",
  "nextEvent": "I/B Empty Container Returned",
  "nextEventLocation": "MELBOURNE",
  "portOfLoading": "JIUJIANG, FOSHAN",
  "portOfLoadingCode": "CNJIJ",
  "etaPort": "AUMEL",
  "eta": "2026-11-04",
  "eventCount": 8,
  "events": [
    {"at": "2026-10-04T12:46:00", "event": "O/B Empty Container Released", "location": "JIUJIANG, FOSHAN", "vessel": null, "voyage": null, "pending": false},
    {"at": "2026-10-10T07:00:00", "event": "Vessel Loading", "location": "JIUJIANG, FOSHAN", "vessel": "FENG NIAN 598", "voyage": "XFGI6110S", "pending": false},
    {"at": null, "event": "I/B Empty Container Returned", "location": "MELBOURNE", "vessel": null, "voyage": null, "pending": true}
  ]
}
```

### How to use it

1. Paste your container numbers (four letters and seven digits, for example `PCIU9497114`) into **Container numbers**.
2. Set **Maximum results** and press Start.

Numbers that cannot be container numbers, such as a wrong check digit, are found before anything is sent. They cost nothing and appear in the `NOT_FOUND` record with the reason `invalid_check_digit` or `invalid_format`.

#### Input options

| Input | What it does |
|---|---|
| `trackingNumbers` | PIL container numbers. Repeats are checked once |
| `includeEvents` | Add the event history to every result. On by default |
| `onlyNew` | Skip containers whose latest event is the same as in an earlier run of this list |
| `maxItems` | Stop after this many results |
| `maxConcurrency` | Containers asked about at the same time. 1 by default |
| `secondsBetweenRequests` | Pause between requests to PIL. 2 seconds by default |

### How much does it cost?

You pay per container result, nothing else. Numbers PIL does not know, wrong numbers and numbers not checked cost nothing. The first Apify plan includes free monthly credit to try it.

| Plan | Price per 1,000 results |
|---|---|
| Free | $8.00 |
| Bronze | $7.20 |
| Silver | $6.40 |
| Gold | $5.60 |

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/pil-tracking-scraper").call(run_input={
    "trackingNumbers": ["PCIU9497114", "PCIU8562508", "PCIU1944767"],
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["trackingNumber"], row["status"], row["statusLocation"], row["eta"])
```

**Daily tracking.** Schedule the Actor in the Apify Console (Schedules), keep your container list in the input and turn on **Only changed shipments**. Each run returns only the containers whose latest event is new.

#### Use it in Clay, n8n, Make or Zapier

Use the Actor ID `pshivam/pil-tracking-scraper` and this input:

```json
{"trackingNumbers": ["PCIU9497114", "PCIU8562508"], "onlyNew": true}
```

### This scraper vs. the alternatives

| | This Actor | PIL's website | Multi-carrier tracking services |
|---|---|---|---|
| Output | Rows for Excel, CSV, JSON, API | One container per search | JSON |
| Containers per run | About 1,800 an hour | 1 per search | Depends on the plan |
| Event history with pending steps | Yes | Yes | Depends |
| Only changed shipments | Yes | No | Depends |
| Price | $8.00 per 1,000 results | Free to read | Monthly plans |

### Good to know

- **Container numbers only.** PIL's service is asked by container number. Bill of lading and booking numbers are not supported.
- **Pending steps.** Steps PIL has not dated yet have `pending: true` and no `at`. `status` is the newest dated event.
- **Times are local.** `statusAt` and the event times are the local time of the place, without a time zone, as PIL gives them.
- **PIL blocks addresses that send too many requests.** The Actor spaces requests 2 seconds apart. When PIL rejects the requests the run keeps what it has, lists the other numbers as `not_checked` and says so. Run the rest later.
- **Independent tool.** Not affiliated with or endorsed by Pacific International Lines. It reads the public Track & Trace service of PIL's website.

### FAQ

#### How do I track a PIL container?

Paste the container number (four letters and seven digits, for example `PCIU9497114`) into Container numbers and press Start. The Actor returns the latest status, the vessel and voyage, the route, the ETA and the event history.

#### Which container numbers does it accept?

Any container number with a right check digit. PIL containers start with `PCIU` and similar owner codes.

#### How do I get a daily update only for containers that moved?

Schedule the Actor with the same list and turn on `onlyNew`. A new latest event makes a new result, and only new results are returned and charged.

#### Do I pay for numbers that are not found?

No. Numbers PIL does not know and wrong numbers are listed in the `NOT_FOUND` record and are free.

#### Do I need a proxy or an account?

No. The Actor reads PIL's public Track & Trace service and needs no proxy, no login and no account.

#### Is it legal to use this data?

The Actor reads the public Track & Trace service of PIL's website. You are responsible for how you use the results, and PIL's terms apply to your use of its service.

# Actor input Schema

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

PIL container numbers (PCIU9497114). Add them one by one or use bulk edit to paste a list: one per line, or separated by commas, spaces or semicolons. Repeats are checked once.

## `includeEvents` (type: `boolean`):

Adds every event PIL lists for the container (empty released, gate in, vessel loading, discharge, gate out, empty returned), including the steps still to come.

## `onlyNew` (type: `boolean`):

Skip containers whose latest event is the same as in an earlier run of this same list, so you pay only when something moved. The first run works as usual and remembers what it returned, in your key-value store 'pil-tracking-scraper-only-new'.

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

Stop after this many results. You are charged per result. Numbers PIL does not know are free.

## `maxConcurrency` (type: `integer`):

Containers asked about at the same time. 1 is the safe default.

## `secondsBetweenRequests` (type: `integer`):

Pause between requests to PIL. After a 'too many requests' answer the Actor doubles the pause for the rest of the run.

## Actor input object example

```json
{
  "trackingNumbers": [
    "PCIU9497114",
    "PCIU8562508",
    "PCIU1944767"
  ],
  "includeEvents": true,
  "onlyNew": false,
  "maxItems": 20,
  "maxConcurrency": 1,
  "secondsBetweenRequests": 2
}
```

# Actor output Schema

## `status` (type: `string`):

One row per container: latest event, place, vessel and ETA.

## `nextStep` (type: `string`):

The next expected step, the load port and the ETA for each container.

## `notFound` (type: `string`):

Numbers PIL does not know, wrong numbers and numbers not checked (NOT_FOUND record). Not charged.

## `runStats` (type: `string`):

Requests made, time spent and number of results for this run (RUN_STATS record).

# 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 = {
    "trackingNumbers": [
        "PCIU9497114",
        "PCIU8562508",
        "PCIU1944767"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/pil-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 = {
    "trackingNumbers": [
        "PCIU9497114",
        "PCIU8562508",
        "PCIU1944767",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("pshivam/pil-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 '{
  "trackingNumbers": [
    "PCIU9497114",
    "PCIU8562508",
    "PCIU1944767"
  ],
  "maxItems": 20
}' |
apify call pshivam/pil-tracking-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pshivam/pil-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/6ymItBXtBLzTXt6Fz/builds/Zn3HpFakuPmTIde7X/openapi.json
