# CTT (Correios de Portugal) Tracking API & MCP

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

Query live **CTT** (`ctt`) object status and scan history in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects UPU S10 numbers ending `PT` and returns a normalized `TrackingResult` JSON payload, without a CTT account.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `ctt` |
| **Brand & service aliases** | CTT, CTT Expresso, Correios de Portugal, CTT Portugal |
| **Category** | Portuguese national post |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=RR510293863PT,...` |
| **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) |

## Why developers use `lastscanned` for CTT

- **No CTT account**: the public "Seguir objeto" page signs in an anonymous session and calls CTT's screen service. `lastscanned` does the same from a single `fetch()`-style request.
- **UTC times from CTT**: CTT's scan times are UTC (`...Z`), so every `timestamp` is exact. `localTime` shows the same clock reading.
- **Delivery signer and destination**: when CTT names the person who took delivery, it is returned in `signedBy`; the recipient town and country fill `destination`.
- **Scan codes kept**: `events[].code` holds CTT's event code (`EMO` information received, `EMA` accepted, `EMZ` out for delivery, `EMH` not delivered, `EMI` delivered).

## Tracking Number Formats & Auto-Detection (`matches` vs `?carrier=ctt`)

| Pass | Rule / Regex | Check Digit | Examples |
|---|---|---|---|
| **Pass 1 (`matches`)** | `/^[A-Z]{2}\d{9}PT$/` with a valid UPU S10 check digit | S10 mod 11 | `RR510293863PT` |
| **Pass 2 (`mayMatch`)** | *None* | — | — |
| **Explicit (`?carrier=ctt`)** | Other CTT object codes | — | — |

### When is `?carrier=ctt` optional vs required?

- **Optional (auto-detected)**: S10 numbers ending `PT` with a valid check digit.
- **Required**: any other CTT object code.

## Synchronous `GET` Request & Normalized JSON Response

### `curl`

```bash
curl -s "https://api.lastscanned.com/v1/track/RR510293863PT" \
  -H "Authorization: Bearer $LASTSCANNED_API_KEY"
```

### JavaScript / TypeScript (`fetch`)

```ts
const res = await fetch("https://api.lastscanned.com/v1/track/RR510293863PT", {
  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": "RR510293863PT"
  }
}
```

### Normalized `TrackingResult` JSON response

```json
{
  "carrier": "ctt",
  "trackingNumber": "RR510293863PT",
  "status": "delivered",
  "statusDescription": "O envio foi entregue. O processo de envio terminou.",
  "service": null,
  "deliveredAt": "2026-10-22T10:35:07Z",
  "deliveredAtLocal": "2026-10-22T10:35:07",
  "signedBy": null,
  "destination": {
    "city": "Vila Nova De Gaia",
    "state": null,
    "country": "PT"
  },
  "events": [
    {
      "timestamp": "2026-10-22T10:35:07Z",
      "localTime": "2026-10-22T10:35:07",
      "status": "delivered",
      "description": "O envio foi entregue. O processo de envio terminou.",
      "location": "Centro operacional 4400 Vila Nova de Gaia",
      "code": "EMI"
    },
    {
      "timestamp": "2026-10-22T08:55:44Z",
      "localTime": "2026-10-22T08:55:44",
      "status": "out_for_delivery",
      "description": "O envio saiu para entrega. Será entregue durante o dia.",
      "location": "Centro operacional 4400 Vila Nova de Gaia",
      "code": "EMZ"
    },
    {
      "timestamp": "2026-10-21T17:31:11Z",
      "localTime": "2026-10-21T17:31:11",
      "status": "in_transit",
      "description": "O envio foi aceite. O processo de envio foi iniciado.",
      "location": "Loja CTT Lisboa",
      "code": "EMA"
    },
    {
      "timestamp": "2026-10-21T17:31:08Z",
      "localTime": "2026-10-21T17:31:08",
      "status": "label_created",
      "description": "A informação sobre o envio foi recebida.",
      "location": null,
      "code": "EMO"
    }
  ]
}
```

> **Language**: CTT's scan texts come back in Portuguese. **No record**: a number CTT has no record of returns `not_found`.

## Related Resources

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