  [Home](https://scrapfly.io/)/[Scrapers](https://scrapfly.io/scrapers)/**Kayak**

Fares · airlines · stops · booking sites

# // Kayak Scraper API

Get Kayak flight search results as clean JSON: fares, airlines, flight numbers, stops, times and the booking sites behind each price, for any route and date. Scrapfly loads the search from the country you choose, so you send a route and read the fares.

- **Clone it and run it.** An open-source Kayak scraper for one-way and round-trip flight searches, tested against live Kayak every night.
- **Kayak's own fare data.** One search URL returns the flight results Kayak loads into the page, each with its price, flight numbers, stops, departure time, duration and booking options.
 
 [Get free API key](https://scrapfly.io/register) [View GitHub scraper](https://github.com/scrapfly/scrapfly-scrapers/tree/main/kayak-scraper) [Read the API docs](https://scrapfly.io/docs/scrape-api/getting-started) 

**$3.00 per 1,000 pages** on the Pro plan: 30 credits a page at $0.10 per 1,000 credits.

1,000 free credits. No credit card required.

 [  ](https://scrapeway.com/web-scraping-api/scrapfly) [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 

 Kayak pages · illustration

  

 

 Fare JSON**Output**

```
{
  <span class="c-str">"route"</span>: <span class="c-str">"JFK-LAX"</span>,
  <span class="c-str">"date"</span>: <span class="c-str">"2027-01-20"</span>,
  <span class="c-str">"cheapest"</span>: {
    <span class="c-str">"price"</span>: <span class="c-num">171</span>,
    <span class="c-str">"currency"</span>: <span class="c-str">"USD"</span>,
    <span class="c-str">"flights"</span>: [
      <span class="c-str">"B6 418"</span>,
      <span class="c-str">"B6 487"</span>
    ],
    <span class="c-str">"stops"</span>: <span class="c-num">1</span>,
    <span class="c-str">"leaves"</span>: <span class="c-str">"2027-01-20T12:29:00"</span>,
    <span class="c-str">"minutes"</span>: <span class="c-num">555</span>,
    <span class="c-str">"booking_sites"</span>: <span class="c-num">16</span>
  },
  <span class="c-str">"cheapest_nonstop"</span>: {
    <span class="c-str">"price"</span>: <span class="c-num">174</span>,
    <span class="c-str">"currency"</span>: <span class="c-str">"USD"</span>,
    <span class="c-str">"flights"</span>: [
      <span class="c-str">"B6 123"</span>
    ],
    <span class="c-str">"stops"</span>: <span class="c-num">0</span>,
    <span class="c-str">"leaves"</span>: <span class="c-str">"2027-01-20T06:00:00"</span>,
    <span class="c-str">"minutes"</span>: <span class="c-num">382</span>,
    <span class="c-str">"booking_sites"</span>: <span class="c-num">26</span>
  }
}
```

Printed by the Python request below[See the request ↓](#implementation)

   

  

What you can scrape from Kayak

Four kinds of Kayak flight data you can scrape with Scrapfly, no Kayak account required.

 

## // Scrape Kayak flight search results

Each result has its price and currency, the airline and flight number of every segment, the number of stops, departure and arrival times and the total duration, for one-way and round-trip searches. Round-trip results carry both legs and the round-trip total. Sort by price with `sort=price_a` or keep Kayak's own *Best* order.

- price
- currency
- flight\_number
- stops
- departure
- duration

  

## // Compare fares across booking sites

Kayak is a metasearch site, so each flight comes with the airlines and online travel agencies that sell it, each with its own price, and a count of how many sites offer it. Kayak also marks its best, cheapest and cheapest nonstop result.

- booking\_options
- provider
- price
- booking\_sites
- is\_cheapest

  

## // Scrape flight and fare details

Each segment lists the aircraft, cabin and layover time, with Wi-Fi, entertainment and power where the airline offers them. Most fares also state whether a carry-on bag is included, the checked-bag fee and whether changes are allowed.

- aircraft
- cabin
- layover
- carry\_on
- checked\_bag
- change

  

## // Scrape fares by market and currency

Use the Kayak site for the market you want and set `country` to match. A London to New York search on `kayak.co.uk` from a UK IP returns fares in British pounds with 24-hour times, so store the currency with every price.

- country
- kayak.co.uk
- currency
- price

  

 

  

Reliability

## // Read Kayak fares from the data Kayak loads

Kayak's flight page arrives as an empty shell. The browser then asks Kayak's own search API for fares, in rounds, until the search completes. Scrapfly renders the page with a browser and records those calls, so you read the fares as structured JSON instead of scraping the layout. Prices move between searches, so store each fare with its search time, route, market and currency.

 `/flights/poll`

Kayak's results arrive through this call, which the page repeats while the search runs. Early or late answers can be empty, so read the last one that carries results.

 

 `wait_for_selector`

Wait for the first result card before the request returns. Without a browser, Kayak sends the page without any fares in it.

 

 `unblocker=true`

Kayak can answer automated traffic with a security check page instead of results. Send searches with the Unblocker and residential proxies in the market you want.

 

 

 

  

Choose your tools

## // Scrapfly products for Kayak scraping

Start with the Web Scraping API. Add prompt-based extraction, screenshots or a browser session as your workflow needs them, or start from the open-source scraper. One API key covers all four products.

 

### Web Scraping API for Kayak searches

Send a Kayak flight search URL with the Unblocker, a browser and residential proxies in the country you choose. The response holds the rendered page and the calls Kayak made for fares.

Parse the flights from the recorded search calls, for one-way or round-trip searches.

```
GET /scrape?url=https://www.kayak.com/flights/JFK-LAX/2027-01-20/2027-01-27?sort=price_a&unblocker=true&proxy_pool=public_residential_pool&country=US&render_js=true&wait_for_selector=%5Baria-label%5E%3D%27Result%20item%27%5D
```

 [Explore Web Scraping API →](https://scrapfly.io/products/web-scraping-api)  

### Data Extraction API for Kayak results

Add an `extraction_prompt` that names the fields you want and get the flights on the page back as JSON, with no parser to write.

Ask for the price, stops, departure and arrival times and duration of each flight.

```
GET /scrape?url=https://www.kayak.com/flights/JFK-LAX/2027-01-20?sort=price_a&unblocker=true&proxy_pool=public_residential_pool&country=US&render_js=true&wait_for_selector=%5Baria-label%5E%3D%27Result%20item%27%5D&extraction_prompt=...
```

 [Explore Data Extraction API →](https://scrapfly.io/products/extraction-api)  

### Screenshot API for Kayak results

Capture the Kayak results page for a route and date once the first result cards have loaded.

Keep a dated visual record of fares next to your JSON.

```
GET /screenshot?url=https://www.kayak.com/flights/JFK-LAX/2027-01-20?sort=price_a&country=us&wait_for_selector=%5Baria-label%5E%3D%27Result%20item%27%5D&format=png
```

 [Explore Screenshot API →](https://scrapfly.io/products/screenshot-api)  

### Cloud Browser API for Kayak sessions

Connect Playwright or Puppeteer to a hosted Chromium with a residential IP in the country you choose.

Open a search URL, listen for the `/flights/poll` responses and click through filters, dates or sort tabs.

```
chromium.connect_over_cdp("wss://browser.scrapfly.io?key=KEY&proxy_pool=residential&country=us")
```

 [Explore Cloud Browser API →](https://scrapfly.io/products/cloud-browser-api)  

### Open-source Kayak scraper on GitHub

Clone the maintained Python scraper for one-way and round-trip flight searches, with more result pages fetched through Kayak's search API in the same session.

It runs on the Web Scraping API with the Unblocker and residential proxies, and is tested against live Kayak every night.

- scrape\_flights

 [View the scraper on GitHub →](https://github.com/scrapfly/scrapfly-scrapers/tree/main/kayak-scraper)  

 

  

One request

## // Find the lowest fares on a route

The JSON at the top is sample output from November 25, 2026, for a one-way New York JFK to Los Angeles LAX search on January 20, 2027, priced in US dollars on kayak.com: one request through a US residential IP, the flights read from Kayak's recorded search calls, then the cheapest flight and the cheapest nonstop picked out. Fares change between runs, so yours will differ.

In the output, `flights` lists each segment as airline code and flight number (B6 is JetBlue), `minutes` is the total travel time and `booking_sites` counts the sites selling that itinerary. The example reads the first page of results Kayak loads, which is enough for the cheapest fares when sorted by price.

Install `scrapfly-sdk`, then replace the key below. Change the airports and date in the search URL, and the `route` and `date` labels, to price your own route.

**Prefer the full scraper?** The open-source [Kayak scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/kayak-scraper) collects one-way and round-trip results and fetches more result pages through Kayak's search API, in Python 3.12. It runs against live Kayak every night. Clone it, set `SCRAPFLY_KEY`, and point it at your own route.

 

 Python · scrapfly-sdkscrape + parse

```
<span class="c-key">import</span> json
<span class="c-key">from</span> scrapfly <span class="c-key">import</span> ScrapeConfig, ScrapflyClient

client = ScrapflyClient(key=<span class="c-str">"YOUR_SCRAPFLY_KEY"</span>)
result = client.scrape(ScrapeConfig(
    <span class="c-str">"https://www.kayak.com/flights"</span>
    <span class="c-str">"/JFK-LAX/2027-01-20?sort=price_a"</span>,
    unblocker=<span class="c-key">True</span>, render_js=<span class="c-key">True</span>,
    proxy_pool=<span class="c-str">"public_residential_pool"</span>, country=<span class="c-str">"US"</span>,
    <span class="c-com"># wait for the first result card, not the empty page shell</span>
    wait_for_selector=<span class="c-str">"[aria-label^='Result item']"</span>,
))

<span class="c-com"># Kayak fills the page from its own poll API;</span>
<span class="c-com"># the rendered request keeps every XHR call</span>
calls = result.scrape_result[<span class="c-str">"browser_data"</span>][<span class="c-str">"xhr_call"</span>]
polls = [json.loads(c[<span class="c-str">"response"</span>][<span class="c-str">"body"</span>]) <span class="c-key">for</span> c <span class="c-key">in</span> calls
         <span class="c-key">if</span> <span class="c-str">"/flights/poll"</span> <span class="c-key">in</span> c[<span class="c-str">"url"</span>]
         <span class="c-key">and</span> c[<span class="c-str">"response"</span>][<span class="c-str">"body"</span>]]
<span class="c-com"># later polls can be empty: use the last one with fares</span>
data = next((p <span class="c-key">for</span> p <span class="c-key">in</span> polls[::-<span class="c-num">1</span>] <span class="c-key">if</span> p.get(<span class="c-str">"results"</span>)), <span class="c-key">None</span>)
<span class="c-key">if</span> <span class="c-key">not</span> data:
    <span class="c-key">raise</span> RuntimeError(<span class="c-str">"No fares in the poll calls"</span>)

flights = []
<span class="c-key">for</span> item <span class="c-key">in</span> data[<span class="c-str">"results"</span>]:
    <span class="c-key">if</span> item.get(<span class="c-str">"type"</span>) != <span class="c-str">"core"</span>:
        <span class="c-key">continue</span>  <span class="c-com"># skip ads and price-alert rows</span>
    option = item[<span class="c-str">"bookingOptions"</span>][<span class="c-num">0</span>]
    leg_id = option[<span class="c-str">"legFarings"</span>][<span class="c-num">0</span>][<span class="c-str">"legId"</span>]
    leg = data[<span class="c-str">"legs"</span>][leg_id]
    segments = [data[<span class="c-str">"segments"</span>][s[<span class="c-str">"id"</span>]]
                <span class="c-key">for</span> s <span class="c-key">in</span> leg[<span class="c-str">"segments"</span>]]
    flights.append({
        <span class="c-str">"price"</span>: option[<span class="c-str">"displayPrice"</span>][<span class="c-str">"price"</span>],
        <span class="c-str">"currency"</span>: option[<span class="c-str">"displayPrice"</span>][<span class="c-str">"currency"</span>],
        <span class="c-str">"flights"</span>: [s[<span class="c-str">"airline"</span>] + <span class="c-str">" "</span> + s[<span class="c-str">"flightNumber"</span>]
                    <span class="c-key">for</span> s <span class="c-key">in</span> segments],
        <span class="c-str">"stops"</span>: len(segments) - <span class="c-num">1</span>,
        <span class="c-str">"leaves"</span>: leg[<span class="c-str">"departure"</span>],
        <span class="c-str">"minutes"</span>: leg[<span class="c-str">"duration"</span>],
        <span class="c-str">"booking_sites"</span>: item.get(<span class="c-str">"totalBookingOptions"</span>, <span class="c-num">1</span>),
    })

<span class="c-key">def</span> cheapest(rows):
    <span class="c-key">return</span> min(rows, key=<span class="c-key">lambda</span> f: f[<span class="c-str">"price"</span>], default=<span class="c-key">None</span>)

output = {
    <span class="c-str">"route"</span>: <span class="c-str">"JFK-LAX"</span>,
    <span class="c-str">"date"</span>: <span class="c-str">"2027-01-20"</span>,
    <span class="c-str">"cheapest"</span>: cheapest(flights),
    <span class="c-str">"cheapest_nonstop"</span>: cheapest(
        [f <span class="c-key">for</span> f <span class="c-key">in</span> flights <span class="c-key">if</span> f[<span class="c-str">"stops"</span>] == <span class="c-num">0</span>]),
}
print(json.dumps(output, indent=<span class="c-num">2</span>))
```

 

 

 

  

What the data is used for

## // Common Kayak scraping use cases

### Fare tracking

Record the price of the routes and dates you watch, search after search.

 

### Airline and agency price comparison

See which airline or travel agency sells the same flight for less.

 

### Fare alerts

Spot when a route drops below the price you care about.

 

### Route and schedule research

See which airlines fly a route nonstop, at what times and on which aircraft.

 

### Baggage and fee research

Compare carry-on, checked-bag and change rules across the fares on a route.

 

### Fares for AI travel agents

Give an agent current fares and schedules for the trip it is planning.

 

 

 

  

Common questions

## // Kayak scraping FAQ

 Is scraping Kayak legal?

There is no universal answer. Legality depends on your jurisdiction, the data, the access method and how you use the result. Keep the workflow to public search results, stay signed out, review Kayak's terms of service, and get legal advice for commercial use.

 Does Kayak have an API?

Kayak offers flight search and travel data APIs to partners through the KAYAK Affiliate Network: you apply through a contact form and can ask for sandbox access. These requests read the public Kayak search pages instead, so you need a Scrapfly API key, not a partnership.

 How do I build a Kayak flight search URL?

Put the airports and dates in the path: `/flights/JFK-LAX/2027-01-20` for a one-way search, or `/flights/JFK-LAX/2027-01-20/2027-01-27` for a round trip. Add `sort=price_a` for the cheapest fares first, or `sort=bestflight_a` for Kayak's *Best* order.

 Why are there no fares in the HTML?

Kayak loads its results after the page opens, through repeated calls to its own search API. Render the page with a browser, wait for the first result card, then read the fares from the recorded calls in `browser_data`, as the example does.

 Will I get the same fares every time?

No. Fares move between searches and differ by market and currency, so the same request can print a different price an hour later. Store each fare with the search time, route, dates, country and currency.

 How do I get more than the first page of results?

Kayak pages its results through the same search API. The open-source scraper keeps the search in one session and asks that API for the next pages until it has the results it needs.

 How much does scraping Kayak cost?

A Kayak search costs 30 credits on residential proxies with a browser. Prompt-based extraction adds 5 credits per started 500 KB of page, 20 on a Kayak results page. The free plan includes 1,000 credits a month.

 What are the rate limits when scraping Kayak?

Scrapfly sets no Kayak-specific limit. Your maximum parallelism is the concurrency quota on your plan, or a lower cap configured for the project. Each in-flight request uses one slot until it finishes.

 

 

  

Start with one request

## Send the route. Read the fares.

Web Scraping API with the Unblocker, one call per Kayak search URL.

Proxies across 75+ countries

[Kayak scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/kayak-scraper)[How to scrape Kayak](https://scrapfly.io/blog/posts/how-to-scrape-kayak)[Skyscanner Scraper API](https://scrapfly.io/scrapers/skyscanner)[All scraper pages](https://scrapfly.io/scrapers)

 

[Get free API key](https://scrapfly.io/register)[Read the docs](https://scrapfly.io/docs/scrape-api/getting-started)