Flight Search API & MCP for AI Agents | FetchLayer

142,185 served today 37 platforms

Unofficial Third-party API
1 endpoints live

Flight data.
Without a partner agreement.

42 priced itineraries in one call Layovers with airport & duration One-way or round trip Any cabin, any currency MCP ready

Priced itineraries for any route and date — the carrier, the stops, the layovers, the times and the cabin — one-way or round trip, as clean JSON via REST or MCP.

Start building free
Free tier included No credit card No scraper maintenance

Trusted by developers shipping real products.

POST /flights/search
200 OK

Request

$ curl -X POST \
  https://api.fetchlayer.dev/flights/search \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"origin":"JFK","destination":"LHR",
      "departureDate":"2026-12-10"}'

Response

{
  "itineraryCount": 42,
  "scrapedAt": "2026-11-14T18:11:28Z",
  "currency": "USD",
  "itineraries": [{
    "outbound": {
      "segments": [{ "airline": "American",
        "departureTime": "6:25 PM",
        "arrivalTime": "6:20 AM" }],
      "stops": 0, "layovers": [],
      "durationMinutes": 415
    },
    "price": { "amount": 310, "currency": "USD" },
    "priceType": "one_way"
  }], "pagesFetched": 1
}

Used by developers at

Individual developers or teams — not official partnerships

Built for feedback workflows

Fetch the public signal. Use it wherever your team works.

Every fare on the route, in one call

Name two airports and a date and the whole day comes back priced — a measured New York to London search returned 42 itineraries, and every one of them had a price on it. There is no paging to walk and no second request to make: one call is the complete answer for that route and date.

Budget carriers ranked beside the flag carriers

One list, both ends of the market. A measured Dublin to Stansted search put Ryanair at $17 next to Turkish Airlines in the same response, sorted on price like any other option. A Los Angeles to Tokyo search returned ANA, JAL, United, Air Canada and ZIPAIR together. You are not looking at one alliance or one channel.

Where it stops, and how long you wait there

Connections come with the detail that decides whether one is tolerable: the airport code where it is known, the airport's full name, the city and the wait in minutes. A measured Los Angeles to Tokyo option came back as one stop with 187 minutes at Vancouver. The stop count is its own field, so a connection can never be mistaken for a nonstop.

Times and total duration, not just a price

Departure and arrival times, the dates on both ends — so an overnight arriving two days later is obvious — the operating airline for each leg, and the total door-to-door duration in minutes. Enough to rank a day of options by what the trip actually costs in time as well as money.

A timestamp on every price you receive

Fares move by the hour, and a number without a time attached is a number you cannot trust. Every response records exactly when the fares were read, so a figure you are holding can be aged, refreshed or discarded on evidence rather than on a guess about how long it has been sitting in your cache.

The cabin you actually fly, and everyone travelling

Price economy, premium economy, business or first and get results for that cabin — a measured business-class search on New York to London returned 48 priced options. Filter to nonstop when a connection is not on the table. And price the whole party in one request: up to 9 adults, with children and infants counted separately rather than rounded into "passengers".

Round trips priced whole, one-ways priced clean

Add a return date and the fare covers both directions, labelled as a round-trip total so it is never mistaken for a one-way. Leave it off and you get a straight one-way search with no invented return window. Either way the price is in the currency you asked for, as a number with its code beside it.

FetchLayer Research Chat

Ask what the route actually costs—then export it.

Prefer not to write code? Describe the trip in FetchLayer Research Chat and get a table back, with every fare stamped with the moment it was read rather than presented as a price that holds.

  • ✓Ask questions in plain English
  • ✓Analyze themes, sentiment, and pain points
  • ✓Download the structured results as CSV or JSON
Compare fares in Chat

No code or setup required · Uses your FetchLayer credits

Flight Search research

What does Dublin to London cost next Thursday, and which carriers fly it? Show me nonstops only, cheapest first.

Y

16 nonstop itineraries, all Ryanair, read four minutes ago. The cheapest is $17 for the 6:40 PM departure, an 80-minute hop into Stansted, and the spread across the day is $17 to $31. Turkish Airlines also flies it, but only with a connection.

flights-dub-lon.csv

16 itineraries · 11 columns · ready to download

CSV

From raw feedback to action

One request is the start of the workflow.

Store the structured response, run it on a schedule, pass it to an LLM, or feed it into the system your team already uses. FetchLayer handles retrieval so you can focus on the outcome.

  1. 01

    Name the route and the date

    Two three-letter airport codes and a departure date is the whole required request. Add a return date for a round trip, or leave it off for a one-way — there is no implicit return window either way.

  2. 02

    Narrow it to what you would actually book

    Filter to nonstop, choose the cabin, set the currency, and count adults, children and infants separately. Every result comes back priced for exactly that, rather than for a default you then have to correct.

  3. 03

    Read the stops, not the legs

    Each itinerary carries its stop count as a field and its layovers as a list — airport, city and wait in minutes. A one-stop trip can be described as a single leg, so the count is the number to trust.

  4. 04

    Check how old the price is

    Every response is stamped with the moment the fares were read. Compare that against your own clock before acting on a number, and refresh on evidence rather than on a fixed timer.

One command. Your agent does the rest.

Use the Flight Search endpoint directly from your MCP-compatible agent. Ask it to retrieve public feedback, identify patterns, and turn the result into a useful brief without writing integration glue.

Claude Code Codex

1 Run one command, then sign in

$ npx fetchlayer

◇  Agents

│  Claude Code and Codex

◇  Signed in as you@company.com

◇  Connected

│  ✓ Claude Code  ✓ Codex

It opens a sign-in page in your browser. New here? Signing in creates your free account.

2 Ask

›Cheapest nonstop Dublin to London next Thursday?

fetchlayer.flights_search

Ryanair at $17, departing 6:40 PM and landing at Stansted 80 minutes later. 16 nonstops on the day, all Ryanair, spread $17 to $31. Turkish Airlines also flies it, with a connection. These fares were read four minutes ago; they move, so re-check before you book.

No key to copy and nothing to install. New accounts are free, with no credit card.

How it works
The same command connects
Cursor
VS Code
Antigravity
OpenCode
Hermes
ChatGPT, Perplexity, the Claude app and others

Use cases

What teams build on fares, routes and schedules.

Itineraries and prices as rows you can sum. Here is what that is for.

01

Fare benchmarking by route

One search returns every itinerary it found for a route and date, each with a price — 48 of them on a measured New York to London search, 18 on Dublin to London Stansted. A route’s real price distribution, not one headline number.

pricingdatasetsresearch
02

Itinerary comparison

Every option carries its carriers, stop count, departure and arrival times and cabin, so "cheapest" and "fastest" and "nonstop" are three columns you can sort rather than three searches.

productsresearchtravel
03

Round-trip total pricing

Give a return date and the price covers the whole trip rather than a leg you have to double. What the response does and does not carry is stated plainly, so nothing gets quietly assumed.

pricingaccuracytravel
04

Layover-aware routing

Stops come with the detail: which airport, which city, how long you sit there. A two-hour connection in Manila and a two-hour connection at your origin are not the same trip, and the data says which one you got.

datasetstravelproducts
05

Cabin and carrier mix

Search economy, premium economy, business or first, and see who actually flies it — a measured Dublin to Stansted search returned Ryanair, Ryanair UK and Turkish Airlines side by side. Full-service and low-cost carriers in the same result set.

researchbenchmarkingtravel
06

Price tracking and travel products

Fares move, and every response is timestamped so you always know how old the number in front of you is. Run a route on a schedule and you have a price history rather than a screenshot.

trendscronproducts

Compare approaches

Spend time on the insight, not the collection layer.

What you needFetchLayerOfficial APIBuild it yourself
Whole route priced in one call✓Partner onlyYou page through
Budget and full-service carriers together✓One airlineYou merge sources
Layover airport, city and duration✓VariesYou derive it
Prices returned as numbers✓VariesYou parse the string
A timestamp on every fare✓n/aYou guess the age
No airline account or contract✓Application requiredYour problem
Ready for AI and MCP workflows✓n/aYour integration

FetchLayer provides access to publicly available data. It is not affiliated with, endorsed by, or sponsored by the platform.

Start free. Scale when ready.

Try it free, buy credits as you go, or take a monthly plan when your volume is steady.

Free

30 requests
  • Every platform and endpoint
  • REST and MCP
  • No credit card

You pay

$0

30 req × $0
$0
credit card
none
Start free

Pay as you go

never expire
  • No monthly commitment
  • Same access as subscribers
  • ∞ req/min, ∞ API keys

You pay

$1.99per 1,000

1,000 req × $1.99/1k
$1.99
monthly fee
$0
expires
never
Get API key

Monthly plan

Starter

15,000

  • ∞ req/min, ∞ API keys

You pay

$25per month

15,000 req × $1.67/1k
$25/mo
on credits × $1.99/1k
$29.85
you save
$4.85/mo
Get started
  • One page fetched costs one credit.
  • A request that returns no usable data costs 0 credits.
Not sure? Book a 15-min call

Not sure which volume fits?

15 minutes with the founder. Tell us the workload, we tell you what it needs.

Book a call

Guaranteed throughput on the platform you run on

A dedicated platform from $400/mo, plus $500 for each ~21 req/s. Every other platform on the same key. 99.95% uptime, 24-hour support on Slack or Telegram.

Build your plan

API reference

Every parameter, documented.

All requests are POST with a JSON body and Bearer auth header.

/flights/search 8 params

Priced itineraries for a route and date: the operating carrier, the stop count, every layover with its airport, city and duration, departure and arrival times, total duration and the fare. One-way or round trip, in the cabin and currency you ask for.

origin* string
Departure airport, three-letter code, e.g. "JFK".
destination* string
Arrival airport, three-letter code, e.g. "LHR".
departureDate* string
YYYY-MM-DD. Must not be in the past.
returnDate string
YYYY-MM-DD. Omit for a one-way search.
adults / children / infants number
Travellers. Up to 9 adults; children and infants counted separately.
cabinClass string
economy, premium_economy, business, first. Defaults to economy.
nonstopOnly boolean
Exclude itineraries with stops.
currency string
Three-letter code to price results in, e.g. "USD".

All 1 endpoints, each with its own reference page

Fields marked * are required. Full API reference →

FAQ

Common questions.

What is the Flight Search API?

A REST endpoint and MCP tool that returns flight data as structured JSON. You send an origin, a destination and a date with a Bearer token; you get back priced itineraries for that route — the operating carrier, how many stops, where it stops and for how long, departure and arrival times, and the total. One-way or round trip, in the cabin and currency you ask for. No airline account, no partner agreement, no HTML to parse.

How many results come back?

As many as the route has. Measured on 14 November 2026 for a 10 December departure: JFK→LHR returned 42 priced itineraries in one call, DUB→STN returned 20, and a LAX→NRT round trip for two adults returned 16. Every one of them was priced. There is no paging to walk and no second call to make — one request is the whole answer for that route and date.

Which airlines are covered?

Both ends of the market, side by side in the same response. A measured Dublin to London Stansted search returned Ryanair alongside Turkish Airlines, a budget carrier and a flag carrier ranked together on price. A measured New York to London search returned seven carriers, from British Airways and Virgin Atlantic to JetBlue, and Los Angeles to Tokyo returned ANA, JAL, United, Air Canada and ZIPAIR. You are not getting one alliance or one booking channel.

Do I get layovers, or just a stop count?

Both, and you should read the count rather than infer it. Every itinerary carries stops as a number and layovers as a list, each entry naming the airport code where it is known, the airport's full name, the city and how long the wait is in minutes. A measured Los Angeles to Tokyo option came back with one stop and a 187-minute layover at Vancouver (YVR). Note that a one-stop itinerary can arrive described as a single leg, so counting legs would call it a nonstop — stops is the field that is always right.

Can I search round trips?

Yes — add a return date and the price covers the whole trip, flagged as round_trip_total so you never mistake it for a one-way fare. One thing to know: each outbound option is priced against its cheapest matching return, and that return flight is not itemised, so the response describes the outbound leg and not the inbound one. The total is real; the return leg's times are not in the response. Leave the return date off and you get a straightforward one-way search — there is no implicit return window.

Can I filter to nonstop, or to business class?

Both. Set nonstopOnly and connections are excluded outright. Set cabinClass to any of economy, premium_economy, business, first and results are priced for that cabin — a measured JFK→LHR business-class search returned 48 priced itineraries, against 42 in economy, and 36 when limited to nonstops. You can also price for a whole family in one call: up to 9 adults, plus children and infants counted separately.

What currency are the prices in?

Whichever you ask for. Pass a three-letter currency code and every price comes back in it, as {amount, currency, formatted} — a number you can sum, the code beside it, and a display string. Omit it and results come back in the service's own default, reported on the response so you always know which one you are looking at.

How do I know how fresh a price is?

Every response carries scrapedAt, an ISO timestamp for when the fares were read. Airfares move constantly and any figure you hold is a snapshot — so the response tells you when the snapshot was taken rather than leaving you to assume it matches the time you happened to look. Use that timestamp, not a cached one.

What happens when there are no flights?

You get a 200 with an empty list and a note saying so in plain words: "No itineraries were found for these dates and filters." A route with nothing available is a real answer, not a failure — so there is nothing to retry and nothing to mistake for an outage. A measured nonstop search from Barra in the Outer Hebrides to Tokyo returned exactly that.

What happens if I send a bad request?

You get a 400 that names the problem. A malformed airport code returns {"error":"origin: must be a 3-letter airport code"}; a departure date in the past returns {"error":"departureDate \"2025-01-01\" is in the past"}; a field the route does not know returns {"error":"Unrecognized key: \"sortBy\""} rather than being silently ignored. Wrong requests fail loudly and immediately instead of costing you a call and returning something odd.

How fast is it?

Measured on 14 November 2026: JFK→LHR answered in 1.2 to 4.4 seconds over four runs with 42 itineraries, DUB→STN in 1.1 to 1.5 seconds, a LAX→NRT round trip for two adults in 1.5 seconds, and a nonstop business-class search in 1.5 seconds. One request, one answer, no paging.

How is it billed?

One credit per search, reported on every response as pagesFetched. A search costs the same whether it returns 48 itineraries or none (one credit, $1.99 per 1,000 searches pay-as-you-go, with 30 free to start), and there is no pagination to multiply it — the whole result set for a route and date is a single request.

Is there a free flight search API?

You can start free: every account gets 30 requests with no card, and each search is one request, so that is 30 full route searches. After that a search costs one credit, $1.99 per 1,000 pay-as-you-go or less on a monthly plan. Searches that return nothing cost the same single credit, and a request refused for bad input names the problem so you can fix it before trying again.

Can I track a fare over time?

Yes, by running the same search on a schedule and keeping what comes back. Store each itinerary's price with the response's scrapedAt timestamp, keyed on carrier and departure time, and you have a price history for that route and date. A daily search on one route is about 30 requests a month.

Can my AI agent use it?

Yes. The route is an MCP tool on the same FetchLayer MCP server: flights_search. Tool calls use the same key and are billed exactly like REST, and the agent sees the priceType and the scrapedAt timestamp alongside every fare — so it can tell you that a figure is a round-trip total read four minutes ago, rather than presenting it as a one-way fare that is true now.

Start pulling Fares, routes, layovers & cabins today.

Get a free API key, make your first request, and put public feedback to work in your own product or research workflow.