A freight rate API is a connection that lets your software request ocean or air freight prices for a lane and receive rates, surcharges and transit times on demand.
The term covers two very different products. Some freight rate APIs deliver market data: average prices on a trade lane, used for budgeting and benchmarking. Others deliver bookable rates: a priced option for a specific shipment that you can turn into a booking. Knowing which one you are buying decides whether your landed-cost model, your customer quotes and your procurement dashboards will agree with the invoices that follow. The ExFreight freight API sits on the bookable side, with quoting for domestic and international air, ocean and trucking. This guide focuses on ocean and air, where rate structures are the least intuitive; the multimodal freight API guide covers how one shipment record feeds every mode.
Key takeaways
- Benchmark rate data tells you what a lane costs on average. A bookable rate tells you what this shipment costs, on this date, with this scope.
- Ocean LCL prices on weight or measure, air prices on chargeable weight, FCL prices per container. Your request must carry the data each basis needs.
- Always check the scope of a returned rate: which surcharges, which origin and destination charges, and which government fees sit outside it.
Ocean and air rate response fields
A useful rate response is structured so your system can compare options and explain the total. Ask for these fields when you evaluate any provider, whether it serves market data or bookable rates.
| Response field | Example | Why it matters |
|---|---|---|
| Rate basis | Per container, per W/M, per chargeable kg | Tells you how the price scales if the cargo changes. |
| Base freight | Port-to-port or airport-to-airport charge | The core transport price, before surcharges. |
| Surcharge lines | Fuel, peak season, security, terminal handling | Itemized lines make carrier invoices auditable. |
| Origin and destination charges | Pickup, export handling, delivery | Separates a port-to-port price from a door-to-door one. |
| Service scope | Door-to-door, door-to-port, port-to-door | Two rates for the same lane are only comparable at the same scope. |
| Transit time | Estimated days, often with a routing | Needed to compare a cheap slow option with a faster one. |
| Ports or airports of exit and entry | Savannah to Rotterdam | Routing affects both transit and destination charges. |
| Currency and validity | USD, valid until a stated date | Ocean and air prices move often. An expired rate is a market estimate. |
For a readable breakdown of how these components build an ocean price, the ocean freight rates guide walks through base rate, surcharges and local charges in detail. The API’s job is to return those same components in fields, not in a PDF.
Ocean (FCL/LCL) vs air rate inputs
Each mode prices on a different unit, so a single “weight” field is never enough. Here is how the basis changes the math, with two worked examples.

Ocean FCL: price per container
Full container load rates are quoted per container type (20-ft, 40-ft, 40-ft high cube). Weight matters only against the container’s payload limit and road weight rules at origin and destination. The request needs container type and count, commodity, cargo-ready date, and the service scope. On the ExFreight platform, FCL pricing comes with multiple routing options, which helps when space on the first-choice sailing is tight.
Ocean LCL: weight or measure
Less than container load is priced per revenue ton, commonly the greater of cubic meters or metric tons (W/M, using 1 cbm against 1,000 kg). Example: 6 pallets totaling 3.2 cbm and 1,100 kg. Measure is 3.2, weight is 1.1, so the shipment bills on 3.2 W/M. If the request sent only weight, the rate would be understated by roughly two-thirds. LCL requests therefore need dimensions per piece, piece count, gross weight and stackability.
Air: chargeable weight
Air freight prices on chargeable weight, the greater of actual weight and volumetric weight. The common IATA convention divides length x width x height in centimeters by 6,000. Example: 2 cartons, each 80 x 60 x 60 cm and 30 kg. Volumetric weight per carton is 288,000 / 6,000 = 48 kg, so the shipment bills on 96 kg, not 60 kg. The chargeable weight guide covers the inch and pound version of the same formula.
Operator tip: store dimensions in one unit system and convert at the API boundary. Mixed inches and centimeters in the same product master is one of the most common causes of air and LCL rate errors, and it rarely throws an error. It just returns the wrong price.
Benchmark data vs bookable rates
Market data APIs and quote APIs answer different questions. Most mature shippers use both: benchmarks to judge whether contract and spot prices are reasonable, and bookable rates to move freight.
| Benchmark or index rate API | Bookable rate (quote) API | |
|---|---|---|
| Question it answers | What does this lane cost on average? | What does this shipment cost now? |
| Inputs | Lane, container type or weight band | Full shipment details: pieces, dimensions, weight, commodity, scope, date |
| Output | Averages, ranges, trend lines | Priced service options with transit times |
| Scope | Usually port-to-port base freight | Can include pickup, delivery and origin and destination charges |
| Can you book it? | No | Yes, through the provider’s booking flow |
| Best use | Budgeting, tender analysis, contract reviews | Customer quotes, order costing, carrier selection |
The gap between the two is where landed-cost models break. A buyer who costs a product on an index rate and then ships door-to-door will see pickup, export handling, destination terminal and delivery charges that the index never carried. If your model must match invoices, feed it bookable rates at the scope you actually ship.
Ocean carriers are also standardizing the data around rates. The Digital Container Shipping Association publishes industry-wide standards for commercial schedules, booking, bill of lading and track and trace, developed with ten of the largest container shipping companies. Schedules and booking standards matter to rate integrations because a price is only bookable against a sailing that exists.
Surcharges included in the rate
Surcharges change faster than base rates, which is why a rate that looks cheap in a spreadsheet often is not. Know which of these your API returns as lines and which it folds into the total.
- Ocean: bunker or fuel adjustment (BAF), currency adjustment (CAF), peak season surcharges, general rate increases, origin and destination terminal handling, documentation fees.
- Air: fuel surcharge, security and screening fees, airline terminal handling, pickup and delivery.
- Customs and government: duties, taxes, the Merchandise Processing Fee (MPF), the Harbor Maintenance Fee (HMF) and customs bonds.
On ExFreight door-to-door air and LCL rates, pickup and destination charges are included other than taxes and duties. For U.S. imports, a basic customs entry is included in door-to-door rates; duties, taxes, bonds, MPF and HMF are billed separately (truck-only shipments from Canada are an exception, with the entry billed as an additional fee). To estimate the duty and tax side before you ship, see duty and tax estimates in a freight quote.
Rates returned by the ExFreight platform and API are informational and subject to change. If the actual weight, dimensions, commodity or services differ from the request, the shipment can be re-invoiced to match. Government fees and duties sit outside the freight rate.
For air specifically, the air freight quotes guide explains how spot and contract rates differ and how to compare quotes line by line. For ocean service options, see ExFreight ocean freight, where ExFreight acts as the licensed carrier.
Wiring rates into procurement and pricing
A rate API pays off when its output lands in the system that makes the decision. Three patterns work well:
- Order costing. Rate at order entry with real pieces and dimensions, store the option and the quote reference, and carry freight into the order margin.
- Customer quoting. Rate on demand when a buyer asks, apply your markup rules, and show the quote expiry so sales does not honor an expired price.
- Procurement review. Log returned rates by lane and week, then compare them with benchmark data and invoices. Persistent gaps show where surcharges or scope differ from what you assumed.
On the ExFreight platform, a single rate query shows multiple ports of exit and entry and multiple carrier options, along with on-time percentage and estimated carbon emissions (see how freight emissions are calculated). Through the API, the quoting service returns rates and transit times for air, ocean and trucking.
What ExFreight’s API covers today
The APIs are available upon request, with a test environment and assistance. Connectivity gives access to ExFreight’s online rating, booking and tracking system. See how the ExFreight freight API works
Freight API series
Frequently asked questions
How are ocean and air freight rates calculated?
Start with the pricing unit for the mode: per container for FCL, the greater of cubic meters or metric tons for LCL, and chargeable weight for air, the greater of actual and volumetric weight. Multiply by the base rate, then add surcharges such as fuel and peak season, plus origin and destination charges. Duties, taxes and government fees are separate.
Does a freight rate API return current market rates or bookable rates?
It depends on the provider. A benchmark or index rate API returns lane averages for budgeting and tender analysis, and those figures cannot be booked. A bookable rate API prices one shipment from its origin, destination, dimensions, weight and service scope, and the result can move into a booking. For current ocean market levels, see ExFreight's ocean freight rates guide.
What is an ocean freight rate API?
An ocean freight rate API is a connection that returns FCL or LCL prices for a port pair or door-to-door route, usually with surcharges, transit time and validity. Some provide market averages for benchmarking; others return bookable rates for a specific shipment. Check scope and included charges before comparing results from different providers.
What is an air freight rate API?
An air freight rate API returns prices for moving cargo by air between airports or door to door, calculated on chargeable weight, the greater of actual and volumetric weight. A complete response separates base freight, fuel and security surcharges, pickup and delivery charges, and gives an estimated transit time for each option.




