# Compare shipping rates

URL: https://docs.lastscanned.com/reference/rates/getRates

`GET https://api.lastscanned.com/v1/rates`

USPS, UPS and FedEx prices to ship one parcel between two US ZIP codes, cheapest first, with delivery days and an itemized breakdown. Each quote names its `source` and `rateType`; today's source is Stamps.com, so prices are its own (`reseller`). Quotes only: nothing is bought. A source or carrier that can't quote is listed in `errors`; when none could, the answer is `502 no_quotes` and nothing is spent.

Counts as one tracking number toward the account's day. Without a key, 5 free quotes a day per IP. `POST /v1/rates` takes the same fields as a JSON object.

Parameters:
- `from` (query, required): Origin postal code (5-digit ZIP in the US).
- `to` (query, required): Destination postal code.
- `weight` (query, required): Above 0; at most 150 lb.
- `weightUnit` (query)
- `fromCountry` (query)
- `toCountry` (query)
- `residential` (query)
- `length` (query): Give length
- `width` (query)
- `height` (query)
- `dimensionUnit` (query)
- `carriers` (query): Comma-separated carrier ids to ask; omit for all.

Responses:
- 200: Quotes, cheapest first.
- 400: The shipment is malformed.
- 502: `no_quotes`: no carrier could quote (nothing spent).
- 503: `rates_unavailable`: rate quotes aren't live yet.

Full spec: https://docs.lastscanned.com/openapi.yaml