# SunYou (SYPost) Tracking API & MCP

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

Query live **SunYou / SYPost** (`sunyou`, 顺友物流) cross-border package status, scan history, and **destination last-mile handoff numbers** in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects 13-character `SY…` waybills in Pass 1 and returns a normalized `TrackingResult` JSON payload—without requiring a SunYou merchant account or API key.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `sunyou` |
| **Brand & service aliases** | SunYou (顺友物流), SYPost, Sunyou Logistics (`sypost.net`), `SY…` |
| **Category** | Chinese cross-border e-commerce logistics carrier (Detection precedence **#28 of 31**) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=SYUS...,SYGB...` (up to 35 numbers per carrier in a 100-number call) |
| **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 SunYou / SYPost

- **Clean JSON instead of SYPost JSONP callbacks**: SunYou's public tracker (`sypost.net`) wraps responses in JSONP `searchCallback({...})` payloads with oldest-first scan arrays and mislabels destination-country scans (status `2xx` in the US, UK, or Australia) with China's `"+08:00"` timezone offset. `lastscanned` unwraps the payload, reverses the scan timeline to newest-first, filters out bogus `+08:00` offsets on non-UTC+8 destination scans, and maps SunYou's `displayStatus` and `eventCode` values into the 7 standard statuses.
- **Automatic last-mile carrier & exchange number extraction**: Once SunYou hands an AliExpress or marketplace parcel to a destination carrier ([USPS](/carriers/usps), Royal Mail, [SpeedX](/carriers/speedx), [UniUni](/carriers/uniuni), Australia Post), `lastscanned` extracts `carrierName` and the secondary `trackingNumber` into top-level `message` (e.g. `"Handed to USPS as 9261290312839104827163"`).

## Tracking Number Formats & Auto-Detection (`matches` vs `mayMatch`)

SunYou is evaluated **twenty-eighth (#28)** in `lastscanned`'s two-pass detector:

| Pass | Rule / Regex | Check Digit | Examples |
|---|---|---|---|
| **Pass 1 (`matches`)** | `/^SY[A-Z]{2}\d{9}$/i` (`SY` + 2 letters + 9 digits = 13 chars; the 2 letters typically indicate destination country or product code) | — | `SYGB012345678`, `SYUS016825135`, `SYRM120273923`, `SYAE009517613` |
| **Pass 2 (`mayMatch`)** | *None* | — | — |

### Disambiguating SunYou (`SY…`) vs UPU S10 numbers

- **Zero collision with UPU S10 international numbers**: Standard UPU S10 numbers end with a 2-letter ISO country code (`EA123456785US`, `EE123456785CA`, `UV123456785YP`), whereas SunYou's 13-character numbers put the 4 letters at the beginning (`SY` + 2 letters + 9 digits). All `SY[A-Z]{2}\d{9}` numbers auto-detect in Pass 1 without `?carrier=`.
- **When `?carrier=sunyou` is required**: If you are querying a non-`SY` partner tracking number (`LP…`, `SYB…` reference) directly against SunYou.

## Synchronous `GET` Request & Normalized JSON Response

### `curl`

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

### JavaScript / TypeScript (`fetch`)

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

### MCP `track_package` tool call

```json
{
  "tool": "track_package",
  "arguments": {
    "tracking_number": "SYUS016825135"
  }
}
```

### Normalized `TrackingResult` JSON response

```json
{
  "carrier": "sunyou",
  "trackingNumber": "SYUS016825135",
  "status": "delivered",
  "statusDescription": "Delivered, In/At Mailbox",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": "2026-10-25T13:18:00",
  "signedBy": null,
  "destination": {
    "city": null,
    "state": null,
    "country": "US"
  },
  "message": "Handed to USPS as 9200190312839104827163",
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-10-25T13:18:00",
      "status": "delivered",
      "description": "Delivered, In/At Mailbox",
      "location": "AUSTIN, TX, United States",
      "code": "Delivered_Mailbox"
    },
    {
      "timestamp": null,
      "localTime": "2026-10-25T07:10:00",
      "status": "out_for_delivery",
      "description": "Out for Delivery",
      "location": "AUSTIN, TX, United States",
      "code": "OutForDelivery"
    },
    {
      "timestamp": "2026-10-19T15:30:00Z",
      "localTime": "2026-10-19T23:30:00",
      "status": "in_transit",
      "description": "Departed Sunyou Facility, Carrier Tracking Number: 9200190312839104827163",
      "location": "Shenzhen, China",
      "code": "Dispatch"
    },
    {
      "timestamp": "2026-10-18T02:14:00Z",
      "localTime": "2026-10-18T10:14:00",
      "status": "label_created",
      "description": "Pre-Shipment Info Sent to Destination",
      "location": "China",
      "code": "PreAlert"
    }
  ]
}
```

> **Raw status & event codes**: `events[].code` preserves SunYou's milestone identifier (`"PreAlert"`, `"InboundScan"`, `"Dispatch"`, `"PortArrival"`, `"ClearanceSuccessed_Export"`, `"PortDeparture"`, `"DestinationAirPortArrival"`, `"ClearanceSuccessed"`, `"HandoverLastMile"`, `"OutForDelivery"`, `"DeliveryFail_<reason>"`, `"Delivered"`, `"Delivered_Mailbox"`, `"Returned"`).

## Related Resources

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