How do I get UPS tracking data from an API?
UPS's own Tracking API is GET /api/track/v1/details/{inquiryNumber}: one number per call, with an OAuth 2.0 token from an app you create as a UPS developer, and tracking data that rolls off after a 120-day retention period. lastscanned returns UPS tracking as JSON from GET /v1/track/{number} with one Bearer key, takes up to 35 UPS numbers per request, and answers in the same shape for all 549 carriers. Pro is $4.99/mo for 1,000 unique numbers, then $0.015 each, with no daily limit. A free key tracks 5 numbers a day. With no key you get 1 lookup a day, then pay per request over MPP: $0.50 by card for a 25-number pack, or $0.02 a number in USDC on Tempo.
Try it
curl "https://api.lastscanned.com/v1/track/1Z000Y770414233027" \
-H "Authorization: Bearer lsk_live_YOUR_KEY"const res = await fetch("https://api.lastscanned.com/v1/track/1Z000Y770414233027", {
headers: { Authorization: `Bearer ${process.env.LASTSCANNED_KEY}` },
});
const t = await res.json();
console.log(t.status); // label_created, in_transit, out_for_delivery, delivered, exception, returned or unknown
console.log(t.statusDescription); // UPS's own wording
console.log(t.estimatedDelivery); // when UPS expects delivery, if it says
console.log(t.deliveredAt, t.signedBy);
console.log(t.events[0]); // newest scan: timestamp, localTime, description, locationWays to get UPS tracking by API
| Option | How it works | Price | Notes |
|---|---|---|---|
| UPS Tracking API | GET /api/track/v1/details/{inquiryNumber}, one number per call, with an OAuth 2.0 token from a UPS developer app. | Through your UPS developer account | UPS only. UPS staff confirm multiple packages mean one call each. |
| lastscanned, one number | GET /v1/track/{number} with a Bearer key; 1Z numbers detect as UPS. | Free: 5 numbers a day. Pro: $4.99/mo for 1,000 unique numbers, then $0.015 each, no daily limit. | Status, every scan, estimated delivery and signature when UPS gives one. |
| lastscanned, many numbers | GET /v1/track?numbers=a,b,c with up to 35 UPS numbers (100 in all). | Same plan; on Pro re-checks are free | Each entry comes back with a result or an error, in the order sent. |
Carrier limits from UPS Tracking API spec and UPS API docs: one call per package, read on November 3, 2026. They can change.
Details
OAuth app or one key
UPS's API needs a developer app, a client id and secret, and an OAuth token for calls. lastscanned takes one Bearer key that also covers FedEx, USPS and the other carriers.
One call per package or 35 per request
A list of 500 UPS numbers is 500 calls to UPS's API. Here it is 15 requests of up to 35.
The same shape for every carrier
status is always one of label_created, in_transit, out_for_delivery, delivered, exception, returned or unknown, so code written for UPS works unchanged for FedEx or USPS.
Changes without polling
POST /v1/watches re-checks UPS numbers for you and sends a signed webhook when the status, newest scan or estimate changes.
FAQ
- Is the UPS Tracking API free?
- UPS's API is used through a UPS developer account, under that account's terms. lastscanned has a free key for 5 numbers a day, and Pro is $4.99/mo for 1,000 numbers.
- Can the UPS Tracking API track several numbers in one call?
- No. It takes one inquiry number per call, and UPS's own answer for several packages is to call it once per package.
- Do I need a UPS account number to track UPS packages by API?
- Not with lastscanned. Any 1Z number can be tracked with a lastscanned key.
- How long can I track a UPS package?
- UPS's Tracking API notes a 120-day retention period, so read old shipments before then.