Search flights
post_flights_ratesOverview
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)
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
Global
filters,sort
Quick Start
Required: legs (at least one object with origin, destination, date), adults (≥ 1), currency
Date limit: each leg date must not be more than 11 months from today.
Round-trip: two legs (e.g. outbound then return with direction OUTBOUND / INBOUND). One-way: one leg.
Booking
The response includes searchUrl, the same search on book.maqami.co. Flights are booked and paid only on MAQAMI's website: post_flights_verify re-prices the chosen offer and returns its checkoutUrl.
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. |