How to Search for Flights
The search endpoint returns available flights based on your route, dates, passenger counts, and cabin class. It supports both one-way and return trips.
Endpoint
POST /flights/api/v2/search
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key. |
x-correlation-id | Yes | Correlation ID captured from the autocomplete response headers. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
flightinfo | array | Yes | Array of flight leg objects. One entry for one-way, two for return trips. |
flightinfo[].departuredate | string | Yes | Departure date in YYYY-MM-DD format. |
flightinfo[].origin | string | Yes | Origin airport IATA code (e.g., SFO). |
flightinfo[].destination | string | Yes | Destination airport IATA code (e.g., BLR). |
routetype | string | Yes | "Oneway" or "Return". |
cabin_type | string | Yes | "economy", "business", "premium", or "first". |
adults | integer | Yes | Number of adult passengers (12+ years). |
children | integer | No | Number of child passengers (2-11 years). Defaults to 0. |
infants | integer | No | Number of infant passengers (under 2 years). Defaults to 0. |
pagination | object | No | Pagination settings. See Filters, Sorting, and Pagination. |
sorting | object | No | Sorting settings. See Filters, Sorting, and Pagination. |
filters | object | No | Filter criteria. See Filters, Sorting, and Pagination. |
Example: One-Way Search
JSON
{
"flight_info": [
{
"departure_date": "2026-04-15",
"origin": "SFO",
"destination": "BLR"
}
],
"route_type": "Oneway",
"cabin_type": "economy",
"adults": 1,
"children": 0,
"infants": 0,
"pagination": {
"page": 1,
"limit": 10
},
"sorting": {
"sort_by": "price",
"sort_order": "asc"
}
}Example: Return Trip Search
For return trips, include two entries in flight_info — one for the outbound leg and one for the return leg.
JSON
{
"flight_info": [
{
"departure_date": "2026-04-15",
"origin": "SFO",
"destination": "BLR"
},
{
"departure_date": "2026-04-25",
"origin": "BLR",
"destination": "SFO"
}
],
"route_type": "Return",
"cabin_type": "business",
"adults": 2,
"children": 1,
"infants": 0
}Response Structure
The response contains a list of flights, each with segments and cabin options.
JSON
{
"status": "success",
"data": {
"flights": [
{
"segments": [
{
"flight_number": "UA123",
"airline": "United Airlines",
"origin": "SFO",
"destination": "FRA",
"departure_time": "2026-04-15T10:30:00",
"arrival_time": "2026-04-16T06:45:00",
"duration": "12h 15m"
},
{
"flight_number": "LH456",
"airline": "Lufthansa",
"origin": "FRA",
"destination": "BLR",
"departure_time": "2026-04-16T09:00:00",
"arrival_time": "2026-04-16T22:30:00",
"duration": "9h 0m"
}
],
"cabins": [
{
"id": "cab_001",
"cabin": "economy",
"cabinclasstext": "Economy",
"cabinsearchsessionid": "cssabc123def456",
"base_rate": 450,
"taxandfees": 85.5,
"total_rate": 535.5,
"currency_code": "USD",
"baggage_details": {
"cabin_baggage": "1 x 7kg",
"checked_baggage": "1 x 23kg"
},
"penalties_info": {
"cancellable": true,
"exchangeable": true
}
}
]
}
],
"pagination": {
"total": 45,
"page": 1,
"limit": 10,
"total_pages": 5,
"has_next": true,
"has_prev": false
},
"available_airlines": [
"United Airlines",
"Lufthansa",
"Air India",
"Emirates"
]
},
"message": "Flights retrieved successfully"
}Key Response Fields
| Field | Description |
|---|---|
flights | Array of flight options, each containing segments and cabins. |
flights[].segments | Individual flight legs with airline, times, and duration. |
flights[].cabins | Available cabin options with pricing. |
cabins[].cabinsearchsessionid | Token required for the availability check. Save this value. |
cabins[].totalrate | Total price including taxes and fees. |
cabins[].baggagedetails | Included baggage allowances. |
cabins[].penaltiesinfo | Summary of cancellation and exchange policies. |
pagination | Pagination metadata including total results and page info. |
available_airlines | List of all airlines in the full result set. Useful for building filter UIs. |
Passenger Types
| Type | Age Range | Notes |
|---|---|---|
| Adult | 12+ years | At least 1 adult is required. |
| Child | 2-11 years | Must be accompanied by an adult. |
| Infant | Under 2 years | Must be accompanied by an adult. Cannot exceed the number of adults. |
Next Steps
- How to Use Flight Search Filters, Sorting, and Pagination — Narrow down results with filters and sorting.
- How to Check Flight Availability and Pricing — Use the
cabinsearchsession_idto check availability.