Discover/Flexport API
live

Flexport 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.

Endpoint health
verified 6h ago
search_routes
get_popular_routes
get_deferred_air_rates
3/3 passing latest checkself-healing
Endpoints
3
Updated
26d ago

What is the Flexport 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.

Try it
Origin airport code slug or city name (e.g., 'pvg' for Shanghai Pudong, or 'Shanghai' which resolves via autocomplete).
Destination airport code slug or city name (e.g., 'jfk' for JFK Airport, or 'New York' which resolves via autocomplete).
api.parse.bot/scraper/ce53604a-d2b3-462d-908b-b8eb23138ff4/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/ce53604a-d2b3-462d-908b-b8eb23138ff4/get_deferred_air_rates?origin=pvg&destination=jfk' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace flexport-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Flexport Freight API — search locations, browse popular routes, get air rates."""
from parse_apis.flexport_freight_api import Flexport, ServiceLevel, RouteNotFound

client = Flexport()

# Search locations to find airport/port slugs for rate queries.
for loc in client.locations.search(query="Shanghai", limit=3):
    print(loc.display_name, loc.slug, loc.types)

# Browse popular shipping routes and inspect their offerings.
route = client.routes.popular(limit=1).first()
if route:
    print(route.origin_name, "→", route.destination_name)
    for offering in route.offerings:
        print(offering.service_level, offering.pricing.price, offering.transit_time.min_days)

# Fetch deferred air freight rates for a specific origin-destination pair.
try:
    quote = client.ratequotes.get_deferred(origin="pvg", destination="jfk")
    for rate in quote.rates:
        print(rate.transit_time, rate.price_per_kg, rate.discounted_price)
except RouteNotFound as exc:
    print(f"Route not found: {exc.origin} → {exc.destination}")

print("exercised: locations.search / routes.popular / ratequotes.get_deferred")
All endpoints · 3 totalmissing one? ·

Fetch unique 'Deferred' air freight rates for a given origin-destination pair. Returns pricing based on a default 1000kg/6cbm shipment. Origin and destination are airport code slugs (e.g., 'pvg', 'jfk') or city slugs resolved from search_routes. If a city name is provided, it is resolved to a slug via autocomplete before querying rates. Returns an empty rates array when no deferred air service exists for the route.

Input
ParamTypeDescription
originrequiredstringOrigin airport code slug or city name (e.g., 'pvg' for Shanghai Pudong, or 'Shanghai' which resolves via autocomplete).
destinationrequiredstringDestination airport code slug or city name (e.g., 'jfk' for JFK Airport, or 'New York' which resolves via autocomplete).
Response
{
  "type": "object",
  "fields": {
    "rates": "array of DeferredRate 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": 9560,
          "valid_until": 1781222400000,
          "price_per_kg": 9.56,
          "total_weight": 1000,
          "transit_time": "8-8",
          "discounted_price": 9088.5
        }
      ],
      "origin": "pvg",
      "destination": "jfk"
    },
    "status": "success"
  }
}

About the Flexport API

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.

Reliability & maintenanceVerified

The Flexport API is a managed, monitored endpoint for flexport.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when flexport.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official flexport.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
6h ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a freight cost estimator that pulls live price_per_kg and total_price for user-specified origin-destination pairs
  • Monitor deferred air rate trends on key corridors like PVG–JFK by polling get_deferred_air_rates over time
  • Populate a lane selector UI using search_routes to resolve city names to valid slugs before fetching rates
  • Compare air, ocean FCL, and ocean LCL availability on popular trade lanes using get_popular_routes offerings data
  • Identify valid_until windows across multiple lanes to flag expiring rate quotes before they roll over
  • Cross-reference transit_time against discounted_price to surface the best time-value tradeoff on a given route
  • Seed a logistics dashboard with high-volume corridors from get_popular_routes without maintaining a static route list
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Flexport have an official developer API?+
Yes. Flexport publishes an official API at https://developers.flexport.com, covering shipment tracking, bookings, and document management for customers with an active Flexport account. The Parse API covers publicly visible freight rate and route data independently.
What does `get_deferred_air_rates` return and how is pricing structured?+
It returns an array of rate objects, each with 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?+
Not currently for arbitrary pairs. Ocean FCL and LCL pricing appears only within the 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?+
No. The API covers freight rate pricing and route discovery: 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`?+
Each rate object includes a 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.
Page content last updated . Spec covers 3 endpoints from flexport.com.
Related APIs in OtherSee all →
dat.com API
Track real-time market conditions, fuel prices, and freight rate trends to make data-driven logistics decisions. Access industry insights through blog posts and resource materials to stay informed on transportation market dynamics.
flightradar24.com API
Track live flights worldwide, view real-time airport schedules, and search for specific flights with detailed information about aircraft and routes. Monitor the most tracked flights and get comprehensive airport details including gates, terminals, and operational status.
chrobinson.com API
Search available freight loads, get real-time load board statistics, and explore C.H. Robinson's logistics services across carriers and industries. Use location autocomplete to quickly find shipping origins and destinations while discovering the full range of freight and carrier services available through the platform.
flightradar.com API
Track flights in real-time, search for specific flight details, and look up information about airports and airlines worldwide. Monitor nearby aircraft by location, identify which airlines operate specific routes, and get comprehensive aviation data all in one place.
skiplagged.com API
Search for flights across airlines including hidden-city ticketing options, and look up airport information by name or code to find the best travel deals. Access Skiplagged's flight inventory and routing data to discover cheaper itineraries and alternative airport combinations.
fedex.com API
Access data from fedex.com.
maersk.com API
Track your Maersk shipping containers in real-time, monitor vessel schedules and locations, and discover available routes between ports and countries. Access comprehensive port data, search for specific locations, and view detailed shipping route information to plan your logistics more effectively.
starken.cl API
Get Starken Chile shipping reference data including Tarifa Simple rate tables, available shipping localities, branch/PUDO locations with hours and capabilities, and a UUID to start a new quote session.