track-package▌
usps.com/track-package-854rdc · updated May 21, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Given a USPS tracking number, return the current status, expected delivery date, last-known location, and full chronological event timeline via the USPS REST API v3 (recommended) or the public tracking page behind Akamai (fallback).
| name | track-package |
| title | USPS Package Tracking |
| description | >- Given a USPS tracking number, return the current status, expected delivery date, last-known location, and full chronological event timeline via the USPS REST API v3 (recommended) or the public tracking page behind Akamai (fallback). |
| website | usps.com |
| category | logistics |
| tags | - logistics - tracking - usps - shipping - akamai - read-only |
| source | 'browserbase: agent-runtime 2026-05-16' |
| updated | '2026-05-16' |
| recommended_method | api |
| alternative_methods | - method: browser rationale: >- Fallback when no USPS Developer Portal credentials are available. The public tracking page at tools.usps.com/go/TrackConfirmAction?tLabels=<NUM> is Akamai-protected — a Verified + residential-proxy Browserbase session is mandatory. Pays a 50-100x cost premium per lookup vs the API path. - method: api rationale: >- Legacy XML Web Tools API at secure.shippingapis.com/ShippingAPI.dll?API=TrackV2 still serves but is being phased out under USPS's April 2026 'API Access Control' initiative. Use the v3 REST API for new integrations. |
| verified | false |
| proxies | false |
USPS Package Tracking
Purpose
Given a USPS tracking number, return the current package status, last-known location, expected delivery date, and the full chronological event timeline. Read-only — never schedules, redirects, or modifies the shipment. Two equivalent surfaces are documented: the modern OAuth2-gated REST API (recommended) and the public browser tracking page (fallback when no API credentials are available).
When to Use
- Carrier-status polling in a logistics / order-status agent ("where is order #X right now?").
- Bulk reconciliation across many tracking numbers (use the API path — the browser path doesn't scale past a handful before Akamai throttles).
- Customer-support flows answering "when will my package arrive?".
- One-off lookups for tracking numbers a user pastes in (browser fallback acceptable, ~1 per minute).
Workflow
USPS exposes a clean OAuth2-gated REST API at apis.usps.com/tracking/v3/tracking/{trackingNumber} that returns the same structured data the public tracking page renders. Lead with this. The public tools.usps.com/go/TrackConfirmAction?tLabels=... deep-link is fronted by Akamai Bot Manager (verified — see Gotchas), so the browser fallback requires a Verified + residential-proxy session and pays a 50-100× cost premium per lookup. Use the API path unless the caller has explicitly opted out of credentialed access.
Recommended path — USPS REST API v3
Prerequisites (one-time per deployment):
- Create a USPS Business Account via the Customer Onboarding Portal (
https://gateway.usps.com/). Free. - In the COP "My Apps" section, create an App and retrieve the Consumer Key and Consumer Secret from the Credentials tab. The default product includes the Tracking API at no additional approval cost.
- Optionally swap base URL to
apis-tem.usps.com(Testing Environment for Mailers) during integration — same auth, sandbox shipments.
Per-lookup flow:
-
Obtain an OAuth2 access token (client-credentials grant). Tokens are typically valid 8 hours; cache and re-use.
POST https://apis.usps.com/oauth2/v3/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_id=<CONSUMER_KEY> &client_secret=<CONSUMER_SECRET> &scope=trackingReturns
{ "access_token": "<JWT>", "token_type": "Bearer", "expires_in": 28799, "scope": "tracking" }. -
Call the tracking endpoint:
GET https://apis.usps.com/tracking/v3/tracking/{trackingNumber}?expand=DETAIL Authorization: Bearer <access_token> Accept: application/jsonThe
expand=DETAILquery param returns the full event timeline; without it the response is summary-only (status + expected delivery only). Pass the tracking number unformatted (digits only; strip spaces and dashes). -
Map the JSON to the output schema in "Expected Output" below. Key fields:
trackingNumber— echo back.status/statusCategory— verbatim USPS phrase ("Delivered, Front Door/Porch") and the high-level category bucket.expectedDeliveryDate(ISO date) — only present for in-transit shipments;nullafter delivery.originCity/originState/destinationCity/destinationState— origin and destination metadata.trackingEvents[]— reverse-chronological by default (most recent first). Each event haseventTimestamp(ISO 8601),eventType/eventCode,eventDescription, and a location block (eventCity,eventState,eventZIP,eventCountry). Reverse the array if your output schema requires chronological order.
-
Status-category mapping — USPS returns free-form
statustext but most consumers want a small enum. Bucket by the leading verb/phrase:Category Trigger phrases delivered"Delivered" (any sub-state — Front Door, Mailbox, Parcel Locker, etc.) out_for_delivery"Out for Delivery" in_transit"In Transit", "Arrived at", "Departed", "Accepted", "USPS in possession" pre_shipment"Shipping Label Created", "Pre-Shipment", "Awaiting Item" available_for_pickup"Available for Pickup", "Held at Post Office" alert"Delivery Exception", "No Access", "Return to Sender", "Forwarded" delivery_attempted"Delivery Attempted", "Notice Left" Treat unmapped strings as
in_transitand surface the raw text — USPS occasionally adds new event types.
Browser fallback (when no API credentials)
A Verified + residential-proxy Browserbase session can scrape the public tracking page. The page is fully JS-rendered behind an Akamai challenge — bare fetch always returns the obfuscated _abck JS interstitial, never the real content (verified 2026-05-16: browse cloud fetch --proxies https://tools.usps.com/go/TrackConfirmAction?tLabels=... returns 226 KB of Akamai-Grn-stamped challenge HTML, zero tracking data).
SID=$(browse cloud sessions create --keep-alive --verified --proxies | jq -r '.id')
browse cloud browse --connect "$SID" open "https://tools.usps.com/go/TrackConfirmAction?tLabels=<NUM>"
browse cloud browse --connect "$SID" wait load
browse cloud browse --connect "$SID" wait timeout 4000 # Akamai challenge solves over 2-4s after load
browse cloud browse --connect "$SID" snapshot
After the snapshot resolves, the visible tracking card is identified by:
- A heading containing the tracking number.
- A status banner — typical refs are
heading "Delivered, Front Door/Porch"orheading "In Transit to Next Facility". - A "Text & Email Updates" expander (collapsed by default — ignore).
- A "Tracking History" expander (collapsed by default — click to expand before extracting events).
- An "Expected Delivery" block with a date string ("Expected Delivery by Saturday, March 22, 2026 by 6:00 PM").
To get the full timeline, click the button "Tracking History" ref, wait timeout 1500, then snapshot again. Events render as dt/dd-style rows: date+time first, description on the next line, city/state on the third. Parse top-to-bottom; the list is already reverse-chronological. Cap at the first 30 events — long histories occasionally exceed snapshot's truncation limit, in which case fall back to browse cloud browse --connect "$SID" get text body and regex-parse.
Don't click "Add Tracking Plus", "Schedule Redelivery", "Hold for Pickup", or any USPS-account-linked CTA — they trigger sign-in walls and contaminate the session.
Release the session when done:
browse cloud sessions update "$SID" --status REQUEST_RELEASE
Site-Specific Gotchas
- Akamai Bot Manager is enforced sitewide. Verified 2026-05-16: every
tools.usps.com/go/TrackConfirmAction*andm.usps.com/m/TrackConfirmAction*URL returns a 200 OK with Akamai_abckchallenge JS (~220 KB obfuscated script body) when fetched without a real browser. Verified + residential-proxy session is mandatory for the browser fallback — a barebrowse cloud fetch(even with--proxies) never sees the actual tracking content. TheAkamai-GrnandX-Akamai-Transformedresponse headers confirm Akamai is in the path. TrackConfirmAjaxAction.actionis dead. The old "internal XHR" endpoint that scraping tutorials reference returns 404 withThere is no Action mapped for namespace [/] and action name [TrackConfirmAjaxAction]. Don't waste time on it.- The legacy Web Tools XML API is being deprecated.
https://secure.shippingapis.com/ShippingAPI.dll?API=TrackV2&XML=<TrackRequest USERID="..."...>still serves (verified 2026-05-16: returns80040B1A Authorization failurefor unregistered USERIDs), but USPS announced in April 2026 that API Access Control is rolling out across all surfaces. New integrations should use the v3 REST API. The legacy API USERID is not interchangeable with the v3 Consumer Key. - OAuth2 scope must be requested explicitly. The default app product includes Tracking, but you still need
scope=trackingin the token request body. Omitting it returns a token without tracking access and the tracking call 403s withinsufficient_scope. expand=DETAILis required for the event timeline. Without it, the response includes only the current status and (if applicable) expected delivery date — notrackingEventsarray. This is the single most common foot-gun on the v3 API.- Tracking number format must be digits-only. Strip spaces, dashes, and any leading carrier prefix the user might have pasted (
USPS:,tracking#:, etc.). USPS tracking numbers are 13, 20, 22, 26, or 30 characters depending on service class. - The
tLabelsquery param is plural-but-not-an-array.https://tools.usps.com/go/TrackConfirmAction?tLabels=<NUM>is the public deep-link. Some legacy docs/blogs referenceqtc_tLabels1=<NUM>(matches the input form's POST name) — both forms reach the same page, but the deep-link form is more stable. Don't try comma-separating multiple numbers; the UI only renders the first. - TEM (sandbox) data is synthetic.
apis-tem.usps.comreturns predictable canned responses for test tracking numbers; real production numbers will 404 against it. Useapis.usps.comfor real lookups. - Status text is free-form and changes. "Delivered, Front Door/Porch" became "Delivered, In/At Mailbox" became "Delivered, Parcel Locker" as USPS rolled out new event types — always carry the raw
statusfield through to the consumer in addition to your normalizedstatus_categoryenum. - Asterisks in delivery dates indicate estimates. A field like "Expected Delivery by 03/22/2026 by 6:00 PM*" with a trailing
*means the date is estimated, not guaranteed. Surface the asterisk or set anis_estimatedflag. - Sandbox-environment caveat for this skill's verification: the iteration that produced this SKILL.md ran in a Vercel sandbox that DNS-blocks
connect.browserbase.com/connect.usw2.browserbase.com, so the browser fallback was characterized viabrowse cloud fetchevidence + USPS Developer Portal docs (developers.usps.com/trackingv3r2,/Oauth,/getting-started) rather than an end-to-endbrowse cloud browserun. The API path is fully exercised at the endpoint-shape level (auth 401/403 + OAuth2 endpoint 404/403 boundary checks) but the JSON response schema in "Expected Output" mirrors USPS's published docs rather than a recorded live response. Treat the browser-fallback selectors as starting hints — they reflect the public page's documented structure but the next agent should verify them once Browserbase WSS connectivity is restored.
Expected Output
The skill emits one of three outcome shapes:
// Success — full timeline retrieved
{
"success": true,
"tracking_number": "9400111899223197428490",
"status": "Delivered, Front Door/Porch",
"status_category": "delivered",
"expected_delivery_date": null,
"last_known_location": "ATLANTA, GA 30304",
"origin": { "city": "SAN FRANCISCO", "state": "CA", "zip": "94103" },
"destination": { "city": "ATLANTA", "state": "GA", "zip": "30304" },
"events": [
{
"timestamp": "2026-03-12T13:42:00-04:00",
"event_code": "01",
"description": "Delivered, Front Door/Porch",
"location": { "city": "ATLANTA", "state": "GA", "zip": "30304" }
},
{
"timestamp": "2026-03-12T09:15:00-04:00",
"event_code": "OF",
"description": "Out for Delivery",
"location": { "city": "ATLANTA", "state": "GA", "zip": "30304" }
},
{
"timestamp": "2026-03-12T08:51:00-04:00",
"event_code": "AR",
"description": "Arrived at Post Office",
"location": { "city": "ATLANTA", "state": "GA", "zip": "30304" }
}
],
"is_estimated_delivery": false,
"source": "api",
"error_reasoning": null
}
// In-transit — expected delivery known, events partial
{
"success": true,
"tracking_number": "9405511899223197428490",
"status": "In Transit to Next Facility",
"status_category": "in_transit",
"expected_delivery_date": "2026-03-22",
"last_known_location": "MEMPHIS, TN 38101",
"origin": { "city": "SAN FRANCISCO", "state": "CA", "zip": "94103" },
"destination": { "city": "ATLANTA", "state": "GA", "zip": "30304" },
"events": [
{
"timestamp": "2026-03-20T02:14:00-05:00",
"event_code": "10",
"description": "Departed USPS Regional Facility",
"location": { "city": "MEMPHIS", "state": "TN", "zip": "38101" }
}
],
"is_estimated_delivery": true,
"source": "api",
"error_reasoning": null
}
// Not found — invalid or aged-out tracking number
{
"success": false,
"tracking_number": "9999999999999999999999",
"status_category": "not_found",
"error_reasoning": "A status update is not yet available on your package. It will be available when the shipper provides an update or the package is delivered to USPS. Check back soon."
}
// Blocked by anti-bot wall (browser fallback only — API path never produces this)
{
"success": false,
"tracking_number": "9400111899223197428490",
"status_category": "blocked",
"error_reasoning": "Akamai Bot Manager interstitial did not resolve within 8s; retry with a fresh Verified+proxy session or fall back to the API path."
}
How to use track-package on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add track-package
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches track-package from GitHub repository usps.com/track-package-854rdc and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate track-package. Access the skill through slash commands (e.g., /track-package) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★44 reviews- ★★★★★Mateo Lopez· Dec 28, 2024
track-package reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Amelia Park· Dec 28, 2024
I recommend track-package for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Shikha Mishra· Dec 24, 2024
We added track-package from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Advait Choi· Dec 4, 2024
track-package fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kabir Sethi· Nov 19, 2024
We added track-package from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Kaira Li· Nov 19, 2024
Useful defaults in track-package — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Yash Thakker· Nov 15, 2024
track-package reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Valentina Ghosh· Nov 11, 2024
track-package has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Valentina Gill· Oct 10, 2024
Keeps context tight: track-package is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Kaira Thomas· Oct 10, 2024
Registry listing for track-package matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 44