> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://bcdtravel.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://bcdtravel.ferndocs.com/_mcp/server.

# Fare search

## Overview

The `fare_search` endpoint retrieves a list of flights and fares for the user's desired airline(s) on their selected travel dates. Currently the Flights API serves regular GDS content (Amadeus, Sabre) and also low-cost carriers and NDC content from Travelfusion.

## Use case

This endpoint can be used on a flight fares page to allow users to view fares for their desired airline(s) on their selected travel dates. The response contains a list of fare groups, each of which includes a total price and a list of origin/destination pairs with available flight options, such as airport, airline carrier, fare class, and flight time.

## What's next?

If the user selects a flight option, the `fare_group_key` and items from `flight_option_key` in the response must be used on the back-end to check availability, and to "price" the flight via the `pricing` endpoint.

## Key parameters

| Parameter          | Type    | Required | Description                                                 |
| ------------------ | ------- | -------- | ----------------------------------------------------------- |
| `api_key`          | string  | yes      | Your public API key                                         |
| `timestamp`        | string  | yes      | UNIX (UTC) timestamp in seconds                             |
| `nonce`            | string  | yes      | Unique cryptographic identifier, max 32 characters          |
| `configuration_id` | integer | yes      | Configuration ID from `get_configurations`                  |
| `origin`           | string  | yes      | Departure airport IATA code (e.g. `LAX`)                    |
| `destination`      | string  | yes      | Arrival airport IATA code (e.g. `JFK`)                      |
| `departure_date`   | string  | yes      | Departure date in `YYYY-MM-DD` format                       |
| `return_date`      | string  | no       | Return date for round-trip searches                         |
| `cabin_class`      | string  | no       | Preferred cabin class (e.g. `economy`, `business`, `first`) |
| `num_adults`       | integer | no       | Number of adult passengers. Default: 1                      |
| `airline_filter`   | string  | no       | Comma-separated airline codes to filter results             |

## Response structure

The response contains an array of `fare_groups`, each with:

* `fare_group_key` — unique identifier for this fare group (required for pricing/booking)
* `total_price` — total fare price in the localized currency
* `currency` — currency code for the price
* `origin_destinations` — array of origin/destination pairs, each containing:
  * `flight_options` — available flights with carrier, times, stops, fare class
  * `flight_option_key` — unique key for each flight option (required for pricing/booking)

## Integration flow

#### Search for fares

Call `fare_search` with origin, destination, dates, and passenger info to get available fare groups.

#### Display results to user

Present the fare groups to your user, showing price, airlines, times, and number of stops.

#### User selects a fare

Capture the `fare_group_key` and `flight_option_key` values from the user's selection.

#### Price the selected fare

Call the `pricing` endpoint with the selected keys to validate availability and get a detailed price breakdown.

> **Note**
>
> Due to the dynamic nature of airline inventory, fares returned by this endpoint may become unavailable by the time the user attempts to book. Always validate availability via the `pricing` endpoint before proceeding to checkout.