post_flights_rates
Search real-time flight prices from multiple providers by specifying itinerary legs. Filter by cabin, stops, price, and more for one-way, round-trip, or multi-city trips.
Instructions
Overview
Search for available flights with real-time pricing from multiple providers. The itinerary must be sent as a non-empty legs array. Each leg follows the provider SearchLeg shape: required origin, destination, and date (YYYY-MM-DD); optional direction (OUTBOUND or INBOUND); optional per-leg filters that override global filters for that leg only.
Not supported: top-level origin, destination, departureDate, or returnDate — use legs only.
When to Use
Listings — live prices for search results UI
One-way, round-trip, or multi-city — one leg per segment, in order
Filtering — cabin class, stops, price, refundability, times (globally or per leg)
Streaming — incremental provider results over SSE
What You Get
Offers from multiple providers
Itineraries with segments, layovers, and durations
Price breakdown (fares, taxes, fees) and baggage hints
Key Features
Multi-provider aggregation in one request
SSE: send header
Accept: text/event-streamonPOST /flights/rates, orPOST /flights/rates/streamwith the same JSON bodyGlobal
filters,sort
Quick Start
Required: legs (at least one object with origin, destination, date), adults (≥ 1), currency
Round-trip: two legs (e.g. outbound then return with direction OUTBOUND / INBOUND). One-way: one leg.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | Ordered itinerary legs (provider SearchLeg). One-way: one entry. Round-trip: outbound then inbound. Multi-city / open-jaw: additional legs in travel order. | |
| sort | No | Sort options for results | |
| adults | Yes | Number of adults (12+) | |
| country | No | Optional ISO 3166-1 alpha-2 country code for point of sale | |
| filters | No | Optional filters to refine search results | |
| infants | No | Number of infants (<2) | |
| children | No | Number of children (2-11) | |
| currency | Yes | ISO 4217 currency code | |
| cabinClass | No | Cabin class (provider SearchFilters codes only). Same enum as filters.cabinClass. | |
| infantAges | No | Age of each infant (under 2, per IATA). Length must equal infants count. Optional — omit if ages are not relevant. | |
| childrenAges | No | Age of each child (2–11 inclusive, per IATA). Length must equal children count. Optional — omit if ages are not relevant. |