flexport.com APIflexport.com ↗
Access Flexport air freight rates, route search, and popular shipping routes via API. Get price-per-kg, transit times, and location slugs for any origin-destination pair.
curl -X GET 'https://api.parse.bot/scraper/ce53604a-d2b3-462d-908b-b8eb23138ff4/get_deferred_air_rates?origin=lax&destination=ord' \ -H 'X-API-Key: $PARSE_API_KEY'
Fetch unique 'Deferred' air freight rates for a given origin-destination pair. Returns pricing based on a default 1000kg/6cbm shipment. Origin and destination can be airport codes (lowercase slug) or city names that will be resolved via autocomplete.
| Param | Type | Description |
|---|---|---|
| originrequired | string | Origin airport code slug or city name (e.g., 'pvg' for Shanghai Pudong, or 'Shanghai' which resolves via autocomplete). |
| destinationrequired | string | Destination airport code slug or city name (e.g., 'jfk' for JFK Airport, or 'New York' which resolves via autocomplete). |
{
"type": "object",
"fields": {
"rates": "array of deferred air rate objects with transit_time, valid_until, price_per_kg, cbm, total_weight, total_price, discounted_price",
"origin": "string, origin slug used in the query",
"destination": "string, destination slug used in the query"
},
"sample": {
"data": {
"rates": [
{
"cbm": 6,
"total_price": 8715,
"valid_until": 1779321600000,
"price_per_kg": 8.71,
"total_weight": 1000,
"transit_time": "8-8",
"discounted_price": 8289.5
}
],
"origin": "pvg",
"destination": "jfk"
},
"status": "success"
}
}About the flexport.com API
This API exposes 3 endpoints covering Flexport's freight rate data, including deferred air pricing, location search, and popular route discovery. The get_deferred_air_rates endpoint returns rate objects with price_per_kg, transit_time, total_price, and discounted_price fields for any airport or city pair — defaulting to a 1000 kg / 6 cbm benchmark shipment. Use it to compare lane pricing, build freight cost calculators, or monitor rate trends on key trade corridors.
Air Freight Rate Data
The get_deferred_air_rates endpoint accepts an origin and destination — either lowercase airport code slugs (e.g., pvg, jfk) or city names that resolve via autocomplete. It returns an array of rate objects, each containing transit_time, valid_until, price_per_kg, cbm, total_weight, total_price, and discounted_price. All rates are benchmarked against a standard 1000 kg / 6 cbm shipment, which makes lane-to-lane comparison straightforward without normalizing weights yourself.
Location Search
The search_routes endpoint resolves airport, seaport, and city names from a free-text query string. Each result node includes displayName, slug, iataCode, locCode, shortName, lat, lng, fid, and a types array indicating whether the location is an airport, seaport, or city. This is the intended way to resolve human-readable place names into the slugs required by the rate endpoint.
Popular Routes
The get_popular_routes endpoint requires no inputs and returns the routes Flexport treats as high-volume lanes. Each route object includes origin, destination, originName, destinationName, and an offerings array that may contain air, ocean FCL, and ocean LCL pricing. This is useful for seeding a UI with common trade lanes or identifying which corridors have multi-modal rate coverage.
- Build a freight cost estimator that pulls live
price_per_kgandtotal_pricefor user-specified origin-destination pairs - Monitor deferred air rate trends on key corridors like PVG–JFK by polling
get_deferred_air_ratesover time - Populate a lane selector UI using
search_routesto resolve city names to valid slugs before fetching rates - Compare air, ocean FCL, and ocean LCL availability on popular trade lanes using
get_popular_routesofferings data - Identify
valid_untilwindows across multiple lanes to flag expiring rate quotes before they roll over - Cross-reference
transit_timeagainstdiscounted_priceto surface the best time-value tradeoff on a given route - Seed a logistics dashboard with high-volume corridors from
get_popular_routeswithout maintaining a static route list
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Flexport have an official developer API?+
What does `get_deferred_air_rates` return and how is pricing structured?+
transit_time, valid_until, price_per_kg, cbm, total_weight, total_price, and discounted_price. All rates assume a benchmark shipment of 1000 kg and 6 cbm, so the pricing reflects that weight class rather than an arbitrary shipment size you specify.Does the API return ocean freight rates for arbitrary origin-destination pairs?+
offerings array on get_popular_routes, which covers Flexport's curated high-volume lanes rather than user-specified pairs. You can fork this API on Parse and revise it to add an endpoint targeting additional ocean rate lanes.Can I look up real-time shipment tracking or booking status through this API?+
get_deferred_air_rates, search_routes, and get_popular_routes. Shipment tracking and booking data are not exposed. You can fork this API on Parse and revise it to add endpoints targeting those data surfaces.How fresh are the rate quotes returned by `get_deferred_air_rates`?+
valid_until field that indicates the expiry date for that specific quote. Rates are current as of the time of the API call, but valid_until varies by lane and carrier offering, so always check that field before using a quote in downstream pricing logic.