> For the complete documentation index, see [llms.txt](https://docs.guestlogix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guestlogix.io/traveler/mobile-sdks/stripe-payment-sdk/flight-search.md).

# Flight Search

{% tabs %}
{% tab title="iOS" %}

```swift
let query = FlightQuery(number: "AC01", date: Date())
Traveler.flightSearch(query: query) { (flights, error) in 
    // ...
}
```

Alternatively you can use the delegate pattern

```swift
Traveler.flightSearch(query: query, delegate: self)
```

```swift
extension MyViewController: FlightSearchDelegate {
    func flightSearchDidSucceedWith(_ result: [Flight]) {
    
    }
    
    func flightSearchDidFailWith(_ error: Error) {
    
    }
}
```

{% endtab %}

{% tab title="Android" %}

```java
FlightQuery query = new FlightQuery("AC01", new Date());
Traveler.flightSearch(query, new FlightSearchCallback() {
    @Override
    public void onFlightSearchSuccess(List<Flight> flights) {
    
    }
    
    @Override
    public void onFlightSearchError(Error error) {
    
    }
});
```

{% endtab %}
{% endtabs %}
