Flexible Flight Search
Search one to four ordered flight legs in one request. Use it for multi-city routes, open-jaw trips, or any itinerary where adjacent legs use different airports. For ordinary one-way and round-trip searches, the dedicated endpoints remain the simplest choice.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| legs | array | Yes | One to four ordered leg objects. Dates must be chronological. |
| adults | integer | No | Number of adult passengers. Default: 1. Max total passengers: 9. |
| children | integer | No | Number of child passengers. Default: 0. |
| infants_in_seat | integer | No | Number of infants with their own seat. Default: 0. |
| infants_on_lap | integer | No | Number of lap infants. Cannot exceed number of adults. Default: 0. |
| cabin_class | string | No | One of "economy", "premium_economy", "business", or "first". Default: "economy". Returned itineraries stay in this requested cabin bucket. |
| min_carry_on_bags | integer | No | Minimum carry-on bags included. |
| min_checked_bags | integer | No | Minimum checked bags included. |
| max_price | integer | No | Strict maximum price in the market's currency. |
| airlines_include | string[] | No | Only include flights from these 2-character airline codes. A code cannot also appear in airlines_exclude. |
| airlines_exclude | string[] | No | Exclude flights from these 2-character airline codes. A code cannot also appear in airlines_include. |
| allow_self_transfer | boolean | No | Allow itineraries that require separate tickets (self-transfer). Default: true. |
| market | string | No | 2-letter country code for pricing locale (e.g. "US", "GB"). Default: "US". |
Leg object
| Parameter | Type | Required | Description |
|---|---|---|---|
| origin | string | Yes | 3-letter IATA departure airport code for this leg. |
| destination | string | Yes | 3-letter IATA arrival airport code for this leg. |
| departure_date | string | Yes | Departure date in YYYY-MM-DD format. |
| max_stops | integer | No | Maximum stops for this leg: 0, 1, or 2. |
| departure_time_range | object | No | Local departure and arrival hour bounds for this leg, using the same fields as one-way search. |
Three-leg open-jaw example
curl -X POST "https://ignav.com/api/fares/search" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"legs":[{"origin":"SFO","destination":"DEN","departure_date":"2026-08-20"},{"origin":"COS","destination":"ORD","departure_date":"2026-08-24","max_stops":0},{"origin":"MDW","destination":"SFO","departure_date":"2026-08-28"}],"adults":2}'{
"legs": [
{
"origin": "SFO",
"destination": "DEN",
"departure_date": "2026-08-20"
},
{
"origin": "COS",
"destination": "ORD",
"departure_date": "2026-08-24"
},
{
"origin": "MDW",
"destination": "SFO",
"departure_date": "2026-08-28"
}
],
"itineraries": [
{
"price": {
"amount": 742,
"currency": "USD",
"status": "verified"
},
"legs": [
{
"carrier": "American Airlines",
"duration_minutes": 150,
"segments": [
{
"marketing_carrier_code": "AA",
"flight_number": "1412",
"operating_carrier_name": "American Airlines",
"departure_airport": "SFO",
"departure_time_local": "2026-08-20T09:00:00",
"departure_timezone": "America/Los_Angeles",
"departure_time_utc": "2026-08-20T16:00:00Z",
"arrival_airport": "DEN",
"arrival_time_local": "2026-08-20T12:30:00",
"arrival_timezone": "America/Denver",
"arrival_time_utc": "2026-08-20T18:30:00Z",
"duration_minutes": 150,
"aircraft": "Boeing 737"
}
]
},
{
"carrier": "American Airlines",
"duration_minutes": 150,
"segments": [
{
"marketing_carrier_code": "AA",
"flight_number": "2285",
"operating_carrier_name": "American Airlines",
"departure_airport": "COS",
"departure_time_local": "2026-08-24T09:00:00",
"departure_timezone": "America/Denver",
"departure_time_utc": "2026-08-24T15:00:00Z",
"arrival_airport": "ORD",
"arrival_time_local": "2026-08-24T12:30:00",
"arrival_timezone": "America/Chicago",
"arrival_time_utc": "2026-08-24T17:30:00Z",
"duration_minutes": 150,
"aircraft": "Boeing 737"
}
]
},
{
"carrier": "American Airlines",
"duration_minutes": 270,
"segments": [
{
"marketing_carrier_code": "AA",
"flight_number": "1867",
"operating_carrier_name": "American Airlines",
"departure_airport": "MDW",
"departure_time_local": "2026-08-28T09:00:00",
"departure_timezone": "America/Chicago",
"departure_time_utc": "2026-08-28T14:00:00Z",
"arrival_airport": "SFO",
"arrival_time_local": "2026-08-28T11:30:00",
"arrival_timezone": "America/Los_Angeles",
"arrival_time_utc": "2026-08-28T18:30:00Z",
"duration_minutes": 270,
"aircraft": "Boeing 737"
}
]
}
],
"cabin_class": "economy",
"requires_self_transfer": false,
"ignav_id": "b2c3d4e5f6789012345678abcdef0123"
}
]
}Ranked complete journeys
Each result is already a complete, compatible journey: its legs array matches the request order and its price describes that complete itinerary. You do not need to select one flight and recursively search every remaining combination.
Results are a ranked set of complete journeys, not an exhaustive Cartesian product of every flight choice an interactive booking UI might reveal. That keeps latency and request volume bounded while preserving coherent trip-level prices. If you need alternatives around one part of a trip, submit a narrower follow-up search.
Response fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| legs | array | Yes | Normalized route and date for each requested leg. |
| itineraries | array | Yes | Ranked complete itineraries. Each itinerary has price, legs, cabin_class, optional bags, requires_self_transfer, and ignav_id. |
Each itinerary leg uses the same leg and segment fields as one-way results. Pass its ignav_id to the booking-links endpoint. Flexible-search booking options use zero-based leg_indexes to show which requested legs a link books; one option may cover every leg, or separate options may cover individual legs.
For open-jaw and multi-city itineraries, airline-direct coverage may be returned as one separately purchased one-way option per leg. Ignav uses that path only when every requested leg is covered.
The ID is an opaque, account-scoped handoff token. Use the same account for the booking lookup, and do not assume a later search for the same flights will return the same ID.
{
"itinerary": {
"price": {
"amount": 742,
"currency": "USD",
"status": "verified"
},
"legs": [
{
"carrier": "American Airlines",
"duration_minutes": 150,
"segments": [
{
"marketing_carrier_code": "AA",
"flight_number": "1412",
"operating_carrier_name": "American Airlines",
"departure_airport": "SFO",
"departure_time_local": "2026-08-20T09:00:00",
"departure_timezone": "America/Los_Angeles",
"departure_time_utc": "2026-08-20T16:00:00Z",
"arrival_airport": "DEN",
"arrival_time_local": "2026-08-20T12:30:00",
"arrival_timezone": "America/Denver",
"arrival_time_utc": "2026-08-20T18:30:00Z",
"duration_minutes": 150,
"aircraft": "Boeing 737"
}
]
},
{
"carrier": "American Airlines",
"duration_minutes": 150,
"segments": [
{
"marketing_carrier_code": "AA",
"flight_number": "2285",
"operating_carrier_name": "American Airlines",
"departure_airport": "COS",
"departure_time_local": "2026-08-24T09:00:00",
"departure_timezone": "America/Denver",
"departure_time_utc": "2026-08-24T15:00:00Z",
"arrival_airport": "ORD",
"arrival_time_local": "2026-08-24T12:30:00",
"arrival_timezone": "America/Chicago",
"arrival_time_utc": "2026-08-24T17:30:00Z",
"duration_minutes": 150,
"aircraft": "Boeing 737"
}
]
},
{
"carrier": "American Airlines",
"duration_minutes": 270,
"segments": [
{
"marketing_carrier_code": "AA",
"flight_number": "1867",
"operating_carrier_name": "American Airlines",
"departure_airport": "MDW",
"departure_time_local": "2026-08-28T09:00:00",
"departure_timezone": "America/Chicago",
"departure_time_utc": "2026-08-28T14:00:00Z",
"arrival_airport": "SFO",
"arrival_time_local": "2026-08-28T11:30:00",
"arrival_timezone": "America/Los_Angeles",
"arrival_time_utc": "2026-08-28T18:30:00Z",
"duration_minutes": 270,
"aircraft": "Boeing 737"
}
]
}
],
"cabin_class": "economy",
"requires_self_transfer": false
},
"booking_options": [
{
"leg_indexes": [
0,
1,
2
],
"links": [
{
"provider_name": "American Airlines",
"provider_type": "airline",
"price": {
"amount": 742,
"currency": "USD",
"status": "verified"
},
"url": "aa.com/booking/..."
}
]
}
]
}Related docs
Ready to get started?
Create a free account to get your API key, or try the playground — no signup required.