Is there a tracking API for AliExpress and dropshipping orders?

Yes. Send up to 100 AliExpress and dropshipping numbers in one GET /v1/track call, at most 35 for any one carrier. Yanwen, YunExpress, Cainiao, 4PX and JS Express are detected from the number. A recorded last-mile handoff comes back in message. Pro is $4.99 a month for 1,000 unique numbers, then $0.015 each, and re-checks are free.

Try it

curl: five cross-border numbers in one call
curl "https://api.lastscanned.com/v1/track?numbers=UL494089685YP,YT2621200705470145,AP00830954074290,4PX3001521662170CN,JSEJA1143458320YQ" \
  -H "Authorization: Bearer lsk_live_YOUR_KEY"
JavaScript fetch
const numbers = ["UL494089685YP","YT2621200705470145","AP00830954074290","4PX3001521662170CN","JSEJA1143458320YQ"];
const url = new URL("https://api.lastscanned.com/v1/track");
url.searchParams.set("numbers", numbers.join(","));
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.LASTSCANNED_KEY}` } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
for (const row of (await res.json()).results) {
  const hit = row.result;
  console.log(row.trackingNumber, hit?.carrier, hit?.status, hit?.message, row.error?.code);
}
Python requests
import os
import requests

numbers = ["UL494089685YP","YT2621200705470145","AP00830954074290","4PX3001521662170CN","JSEJA1143458320YQ"]
r = requests.get(
    "https://api.lastscanned.com/v1/track",
    params={"numbers": ",".join(numbers)},
    headers={"Authorization": f"Bearer {os.environ['LASTSCANNED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
for row in r.json()["results"]:
    hit = row.get("result") or {}
    print(row["trackingNumber"], hit.get("carrier"), hit.get("status"), hit.get("message"), (row.get("error") or {}).get("code"))
Response shape (one results entry; events are newest first)
{
  "results": [
    {
      "trackingNumber": "UL494089685YP",
      "result": {
        "carrier": "yanwen",
        "trackingNumber": "UL494089685YP",
        "status": "in_transit",
        "statusDescription": "",
        "service": null,
        "deliveredAt": null,
        "deliveredAtLocal": null,
        "signedBy": null,
        "destination": { "city": null, "state": null, "country": "US" },
        "message": "Handed to USPS as <last-mile number>",
        "events": [
          {
            "timestamp": null,
            "localTime": null,
            "status": "in_transit",
            "description": "<carrier wording>",
            "location": null,
            "code": null
          }
        ]
      }
    }
  ]
}

Ways to track a mixed dropshipping list

OptionHow it worksPriceNotes
Each carrier's tracking pageLook up Yanwen, YunExpress, Cainiao, 4PX and JS Express on five sites.FreeMade for reading one parcel. No shared JSON.
lastscannedGET /v1/track?numbers= with up to 100 numbers (35 per carrier). The carrier is detected from each number.Free: 5 numbers a day. Pro: $4.99/mo for 1,000 unique numbers, then $0.015 each.Yanwen and 550 other carriers in one response shape.

Details

Which numbers detect on their own

Yanwen: two letters, nine digits and YP (S10 check digit) or YW, three letters and twelve digits, such as UL494089685YP and YWSTL010022557186. YunExpress: YT and sixteen digits (YT2621200705470145). Cainiao: LP and 14 to 17 digits, or AP and 14 digits (AP00830954074290). 4PX: 4PX, 13 digits and CN (4PX3001521662170CN). JS Express: JSE, two letters, ten digits and YQ (JSEJA1143458320YQ). A postal or last-mile barcode that belongs to another carrier needs its own request with ?carrier=cainiao if you want Cainiao's copy of it. One request has a single carrier parameter, so a mixed list leaves carrier off and lets each number detect.

Last-mile handoff, only when the carrier records one

Yanwen sets message from the last-mile number and the carrier name on its page: "Handed to USPS as …" when that name is USPS, or "Yanwen last-mile number …" when the name is Yanwen itself. YunExpress sets message from the last-mile name in its notes (it reads a "Last Mile:" line, which can name USPS) and that carrier's number. 4PX sets message from the provider named in the channel contact and serverCode; a Latin-letter name such as USPS is kept, and any other name becomes "Handed to the destination carrier as …". Cainiao sets "Handed to the destination carrier as …" once scans exist and the latest number differs. It does not put the destination carrier's name in message. Before the first scan the same field is "Latest tracking number: …". JS Express sets "Handed to {supplier} as {trackNo}" from the supplier name (Straightship is the one name it rewrites). It has no USPS-specific branch.

Bulk limits and what a list costs

A request takes 1 to 100 numbers and at most 35 for any one carrier. Over that, the API answers 400 bad_request and tracks nothing in the batch. Each number comes back in order with result or error, so one unknown number does not fail the rest. On Pro the first 1,000 unique numbers in a billing period are included in $4.99. Each further unique number is $0.015, so 1,200 different numbers is $4.99 + 200 × $0.015 = $7.99. Re-checking a number already counted is free. A free key is 5 numbers a day, repeats included, resetting at 00:00 UTC. With no key, one single-number lookup a day per IP, then HTTP 402 MPP: $0.50 by card for a 25-number pack, or $0.02 a number in USDC on Tempo or Solana.

FAQ

Can I track Yanwen, YunExpress, Cainiao, 4PX and JS Express in one request?
Yes. Leave carrier off. Each of those formats detects on its own, and one GET /v1/track?numbers= call holds up to 100 numbers with at most 35 for any one carrier.
Does the response include the USPS last-mile number?
Only when that carrier records a handoff. Yanwen, YunExpress and 4PX can name USPS in message. Cainiao records the new number as a handoff to the destination carrier and does not name USPS. JS Express records the supplier name and its number.
What does a dropshipping tracking list cost?
Pro is $4.99 a month for 1,000 unique numbers, then $0.015 each. Re-checks are free. A free key tracks 5 numbers a day. One keyless lookup a day, then MPP.
What do I get back for each number?
One results entry, in the order sent, with either result or error. result uses "carrier", "trackingNumber", "status", "statusDescription", "service", "deliveredAt", "deliveredAtLocal", "signedBy", "destination", "events", plus message when a handoff was recorded. status is label_created, in_transit, out_for_delivery, delivered, exception, returned or unknown.