Skip to content
Last updated

Air express search

Prioritizing non-stop flights on high-volume routes.

Feature overview

Air express search allows you to prioritize and display only non-stop flights on busy routes. This optimizes the air search and displays the results faster compared to a full search.

When the express search is enabled:

  • Only non-stop flights are displayed by default.
  • An option for travelers to also view flights with one or more stops is displayed.
  • If there aren't enough non-stop flights for a specific route, then the extended search is triggered and will display all available flights.

Key benefits

Integrating air express search reduces API latency by intelligently prioritizing non-stop flights on high-volume routes.

Yes

No

Yes

No

API Request

searchMode: EXPRESS

Non-stop flights >= threshold?

Return non-stop flights only

EXPRESS_EXTENDED

Return all flights

User satisfied?

End

User clicks 'Show all flights'

searchMode: EXPRESS_EXTENDED

Integration procedure

The following sections explain how to use air express search:

1. Prerequisites

The settings below must be configured in the backend before starting API integration.

  • Feature flag: Contact your Spotnana representative to enable the express search feature for your company profile.
  • Threshold configuration: The threshold setting indicates whether a specific route qualifies for an express search based on non-stop flight availability. The default value configured by Spotnana will be >=15 non-stop flights (i.e., the API will only use express search if a specific route contains 15 or more non-stop flight schedules). Contact your Spotnana representative if you wish to adjust the threshold to another value before integrating.

2. API implementation

Use searchMode: EXPRESS in the get air itineraries API request to initiate the air express search. The searchMode supports the following values:

Search mode Description
NORMALStandard search that returns all available flight itineraries. This is used as a default value when searchMode is not set in the API request.
EXPRESSFilters the results to display only non-stop flights on the specific route (assuming the threshold has been met).
EXPRESS_EXTENDEDA fallback search mechanism when express search doesn't find enough non-stop flights (i.e., less than the threshold value). This mode is also used when the user is not satisfied with the express search results and wants to view all flight options instead.

Here's a sample request for the get air itineraries API where searchMode is set to EXPRESS on busy routes.

POST /v2/air/search-flights
// ... payload truncated for focus
{
  "legs": [
    {
      "origin": {
        "airport": "JFK"
      },
      "destination": {
        "airport": "LAX"
      },
      "date": {
        "iso8601": "2026-12-15"
      }
    }
  ],
  "searchMode": "EXPRESS"
}

3. Threshold and fallback mechanism

The get air itineraries API call employs a fallback mechanism based on the threshold value configured in the backend (see prerequisites for more information). Consider the following scenarios:

Scenario A: The number of non-stop flights is greater than or equal to the threshold value

  • API behavior: The API uses the searchMode: EXPRESS.
  • Result: Only non-stop flights are returned and the response time is reduced.

Scenario B: The number of non-stop flights is less than the threshold value

  • API behavior: The API call uses searchMode: EXPRESS_EXTENDED.
  • Result: All the available flights (both non-stop and those with connections) are returned.

4. Pagination

To control the volume of flight itineraries displayed and to optimize the frontend rendering, use the legSearchParams > pageSize field in the get air itineraries API to paginate the results displayed. Pagination works for all search modes (i.e., NORMAL, EXPRESS, or EXPRESS_EXTENDED). The pageSize field assumes a default value of 50 if no value is provided in the request.

POST /v2/air/search-flights
{
  // ... payload truncated for focus
  "searchMode": "EXPRESS",
  "legSearchParams": {
    "pageSize": 25
  }
}

5. Frontend UI recommendations

When implementing the frontend for air express search, use the following workflow:

  1. Primary view: Display the non-stop itineraries returned by the EXPRESS search.
  2. User override: Provide a clear UI element (e.g., a Show all flights or Enable extended results action button).
  3. Action: Link this UI element to a get air itineraries API call with searchMode set to EXPRESS_EXTENDED. This ensures the users can still access the full inventory if the express results do not meet their needs.
Tax inclusion sample image

Fig: UI elements on Spotnana OBT to override air express search results.