Get package shipping rates
get_shipping_ratesGet live USPS, UPS, and FedEx shipping rates for a package from a US ZIP code to a US or international destination. Returns carrier, service, price in USD, and estimated transit days, sorted cheapest first. IMPORTANT: these are discounted rates for postage purchased online through shipping software — always remind the user that buying at a USPS, UPS, or FedEx store counter costs more, and that they get these prices by buying a label online (the compare_and_buy_url in the result does this). Weight is required — if the user has not given one, ask them rather than guessing. Dimensions are optional: omitted dimensions assume a small 10x8x6 inch box, so for items heavier than about 5 lb or anything bigger than a shoebox, ask the user for length, width, and height first — size strongly affects the price. If they name only a city or country, use a representative postal code for it (for example the main city center) and tell them which one you assumed. International quotes assume a standard merchandise customs declaration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_zip | Yes | Destination postal code: 5-digit ZIP for US, local postal code format otherwise (e.g. M5V 2T6 for Toronto) | |
| weight | Yes | Package weight | |
| from_zip | Yes | Origin US ZIP code (5 digits). Quotes are US-outbound only. | |
| width_in | No | Package width in inches (optional) | |
| height_in | No | Package height in inches (optional) | |
| length_in | No | Package length in inches (optional) | |
| to_country | No | Destination country as a 2-letter ISO code (default 'US') | |
| weight_unit | No | Unit for weight, 'oz' or 'lb' (default 'lb') |