# Flight search API

Let your agent search flights.

Search live fares by route and date. One response lists airlines, flight numbers, stops, durations and prices.

A one-way economy search worked in our test. Round-trip returns and filters are also available and were not run.

Provider in the worked example: x402atlas.

Price shown for this route: 5¢ per search.



## What it can do

### Search fares by route and date

Itineraries with airlines, flight numbers, aircraft, times, stops, duration and fare. Our test returned 24 one-way itineraries.

Price: $0.05 / search.

### Narrow the search

Filter by stops, cabin, airlines, maximum price, duration and departure times. Each filtered search is a separate paid call.

Price: $0.05 / search.

### Choose a return flight

For a round trip, repeat the search with the chosen outbound itinerary’s departure token to get return options.

Price: $0.05 / search.


## A real example

Tested on 2026-10-30 through x402atlas.

We searched one-way fares from New York JFK to London Heathrow for 20 November 2026. The route returned 24 itineraries with fares, airlines and times.

Your agent asked: Find one-way flights from New York JFK to London Heathrow on 20 November 2026

Returned in this test:

- Itineraries returned: 24 one-way options
- Cheapest: $335, Virgin Atlantic VS 46, nonstop, 7 h 14 min
- Times: Leaves JFK 19:01, lands LHR 07:15 next day
- Price context: Typical range $180 to $310, price level high
- Per itinerary: Airline, flight number, aircraft, times, stops, duration, fare

Charged in this test: $0.05.

One one-way economy search for a single date.


## Try the API request

Use your TaskFuel API key as TASKFUEL_API_KEY in your terminal or server. Keep it out of browser code.

### 1. Check the price

This request checks the price without paying. This is the exact fare search from the test. Fares change, so a new search can return different prices.

```sh
curl --fail-with-body https://app.taskfuel.ai/v1/call \
  -H "Authorization: Bearer $TASKFUEL_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'TASKFUEL_REQUEST'
{
  "url": "https://flights.use.x402atlas.com/search/JFK/LHR?type=2&outbound_date=2026-11-20",
  "method": "GET",
  "dryRun": true
}
TASKFUEL_REQUEST
```

### 2. Run the request

Review amount_usd in the quote. To pay and run, change dryRun to false and add maxAmountUsd with that approved amount inside the same JSON object. Keep the inputs unchanged; this limit applies to one call.

### 3. Read the result

Read best_flights and other_flights: each itinerary has flights[], price, total_duration and layovers. price_insights holds the typical price range and price level for the route.



[Setup and API reference](https://taskfuel.ai/docs/) · [Job polling and timeout recovery](https://app.taskfuel.ai/using.md)


## Connect your agent

Read the [setup guide](https://taskfuel.ai/docs/setup/) and choose the connection your agent supports.

Use one TaskFuel account and prepaid balance. Inspect the provider and request quote before a paid call, then review the returned response and recorded charge.



## When to use it

### Compare fares for one route and date.

Ask your agent for the cheapest and fastest options between two airports. Results list airlines, flight numbers, stops and durations.

### Compare a fare with the typical range.

The response includes a typical price range and a price level for the route, next to the itineraries.

### Narrow by stops, cabin or airline.

The search accepts filters for stops, cabin, airlines, price, duration and departure times. Each filtered search is a separate paid call.




## Questions

### Do I need a flight data account?

No. Your agent pays from your TaskFuel balance, so there is nothing else to sign up for.

### What does a flight search cost?

Our JFK to London search cost $0.05 on 30 October 2026. Your agent shows the price for your own request before it pays.

### What does a search return?

Itineraries with airlines, flight numbers, aircraft, times, stops, duration and fare, plus a typical price range for the route. Our test returned 24.

### Does it cover round trips and filters?

Yes. A round trip uses a second search with the chosen outbound itinerary, and filters cover stops, cabin, airlines, price and times. We tested a one-way search without filters.

### Can it book a flight?

No. This guide searches fares and schedules. Booking and ticketing are separate and not included here.

### Is this the same as the airport departures guide?

No. This guide searches fares by route and date. The airport departures guide reads a live departure board.

## Related tool guides

- [Check a departure board](https://taskfuel.ai/tools/flight-data/)
- [Read an airline’s baggage or fare rules page](https://taskfuel.ai/tools/extract-webpage/)


## Reference

- [Read this guide on the website](https://taskfuel.ai/tools/flight-search-api/).
- [Browse providers and capabilities](https://taskfuel.ai/catalog/).
- [Pricing](https://taskfuel.ai/pricing/).
- [Agent instructions](https://taskfuel.ai/llms.txt).
