# Ninja Van Tracking API & MCP

URL: https://docs.lastscanned.com/carriers/ninjavan

Query live **Ninja Van** (`ninjavan`) package status and scan history across its Southeast Asian networks in a single synchronous `GET` request or MCP tool call. `lastscanned` queries each country's backend for you, so one number works whichever country shipped it.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `ninjavan` |
| **Brand & service aliases** | Ninja Van, Ninja Xpress (Indonesia), NVSG / NLMY-style tracking IDs |
| **Category** | Regional parcel carrier (Southeast Asia) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` (add `?carrier=ninjavan` where noted below) |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=NVSGTEST12345678,...` |
| **MCP server (`https://mcp.lastscanned.com`)** | `track_package`, `track_packages`, `list_carriers` (`claude mcp add --transport http lastscanned https://mcp.lastscanned.com`) |
| **Authentication & pricing** | `Authorization: Bearer lsk_live_...` · **1 free keyless lookup/day per IP** · **Free tier** (5 unique numbers/day, $0) · **Pro** ($4.99/mo for 1,000 unique numbers, unlimited re-polls, $0.015/extra) · **HTTP 402 Stripe MPP** ($0.50 for 25-number `lsk_pack_` key or $0.02/number in USDC on Tempo) |

## Tracking Number Formats & Auto-Detection

| Pass | Rule / Regex | Check Digit | Examples |
|---|---|---|---|
| **Pass 1 (`matches`)** | *None* | — | — |
| **Pass 2 (`mayMatch`)** | `/^(NV\|NL)(SG\|MY\|ID\|PH\|VN\|TH\|MM)[A-Z0-9]{6,16}$/` | — | `NVSGTEST12345678`, `NLMY000012345678` |
| **Explicit (`?carrier=ninjavan`)** | Any other Ninja Van tracking ID | — | — |

Ninja Van IDs carry the shipping country right after the two-letter prefix, which `lastscanned` tries first; if that backend has no record it asks the other six countries before answering `not_found`. IDs that do not follow the prefix pattern work with `?carrier=ninjavan`.

## Synchronous `GET` Request & Normalized JSON Response

### `curl`

```bash
curl -s "https://api.lastscanned.com/v1/track/NVSGTEST12345678?carrier=ninjavan" \
  -H "Authorization: Bearer $LASTSCANNED_API_KEY"
```

### JavaScript / TypeScript (`fetch`)

```ts
const res = await fetch("https://api.lastscanned.com/v1/track/NVSGTEST12345678?carrier=ninjavan", {
  headers: { Authorization: `Bearer ${process.env.LASTSCANNED_API_KEY}` },
});
const pkg = await res.json();
console.log(pkg.status, pkg.events[0]);
```

### MCP `track_package` tool call

```json
{
  "tool": "track_package",
  "arguments": {
    "tracking_number": "NVSGTEST12345678",
    "carrier": "ninjavan"
  }
}
```

### Normalized `TrackingResult` JSON response

```json
{
  "carrier": "ninjavan",
  "trackingNumber": "NVSGTEST12345678",
  "status": "out_for_delivery",
  "statusDescription": "With courier for delivery",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": null,
  "signedBy": null,
  "destination": null,
  "message": null,
  "events": [
    {
      "timestamp": "2026-10-26T01:12:40Z",
      "localTime": "2026-10-26T01:12:40",
      "status": "out_for_delivery",
      "description": "With courier for delivery",
      "location": null,
      "code": "DRIVER_INBOUND_SCAN"
    },
    {
      "timestamp": "2026-10-25T22:05:03Z",
      "localTime": "2026-10-25T22:05:03",
      "status": "in_transit",
      "description": "Arrived at delivery facility",
      "location": "Jurong Hub",
      "code": "ARRIVED_AT_DESTINATION_HUB"
    },
    {
      "timestamp": "2026-10-24T09:31:15Z",
      "localTime": "2026-10-24T09:31:15",
      "status": "label_created",
      "description": "Order information received",
      "location": null,
      "code": "CREATE_ORDER"
    }
  ]
}
```

## Status Notes

- **Event wording**: Ninja Van's API returns event types (`HUB_INBOUND_SCAN`, `DELIVERY_FAILURE`, ...) rather than text; the descriptions are the wording the Ninja Van tracking page shows for each type, with the hub or pickup point as `location` and the failure reason appended to failed attempts.
- **Handoffs**: when Ninja Van passes a parcel to a partner carrier it reports the partner's tracking number in `message` (for example `Handed to a partner carrier as ...`).
- **Times**: timestamps are converted to UTC only when the API sends a time with an offset; otherwise only `localTime` is set.

## Related Resources

- **Live browser lookup tool**: [Track a Ninja Van package live on lastscanned.com/lookup/ninjavan](https://lastscanned.com/lookup/ninjavan)
- **Carrier hub**: [All supported carriers](/carriers)
- **Regex & check digits**: [Tracking number formats & auto-detection](/formats)
- **AI support workflows**: [WISMO AI agents & synchronous tracking](/wismo)
