---
title: "How to scrape flight prices"
canonical: "https://usestring.ai/use-cases/flight-price-scraping"
description: "The String Web Access API is the best way to scrape flight prices: any airline or travel page, or just its fares as JSON with airline, times, stops and price, even on Kayak, Skyscanner and aa.com. 5,000 free requests."
updated: 2026-10-14
---

> Markdown version of https://usestring.ai/use-cases/flight-price-scraping, for AI agents. Reading this yourself? The full page is at https://usestring.ai/use-cases/flight-price-scraping.
>
> Updated October 14, 2026.

# How to scrape flight prices

The String Web Access API is the best way to scrape flight prices. It returns any airline or travel page, or just its fares as JSON with airline, times and price. In our [September 2026 benchmark](https://usestring.ai/benchmark) it returned 97% of requests across 100 bot-protected sites, the most of 16 providers, and was the only one to fetch all 9 travel sites on every attempt, including Expedia, Kayak and Skyscanner.

The first 5,000 requests are free. Set it up in one step with the [quickstart](#quickstart).

**On this page**

1. [Why scrape flight prices?](#why-scrape-flight-prices)
2. [Why does flight price scraping break?](#why-does-flight-price-scraping-break)
3. [How do I scrape flight prices?](#how-do-i-scrape-flight-prices)
4. [Quickstart](#quickstart)
5. [Get a free sample of fare data](#get-a-free-sample-of-fare-data)
6. [Frequently asked questions](#frequently-asked-questions)

---

## Why scrape flight prices?

Airfares change many times a day, and the free official flight APIs have mostly closed. A flight price scraper checks the same routes and dates on a schedule and records what each one costs. It answers the questions most teams care about:

- **What does this route cost today?** Travel apps, fare alert products and corporate travel teams need the current price, not last week's.
- **Is the fare going up or down?** A daily series per route and date shows when prices drop and how far ahead people should book.
- **Who sells it cheapest?** The same flight is often sold by the airline and by several travel agencies at different prices.

### What you can collect

| What | Examples |
|---|---|
| Fares | The price for every passenger, one way or round trip, in the currency of the market you search from |
| Schedules | Airline, flight numbers, departure and arrival times, duration, stops and layover airports |
| Sellers | Each airline or travel agency that sells an itinerary, with its fare family and price |
| Fare calendars | The lowest price for every departure date in a range, for spotting the cheapest days to fly |

---

## Why does flight price scraping break?

- **Airline and travel sites block scrapers.** In our [September 2026 benchmark](https://usestring.ai/benchmark), 12 of the 15 other scraping APIs couldn't fetch skyscanner.net on every attempt, including Apify (0 of 5), Oxylabs (0 of 5) and Zyte (3 of 5). On aa.com, 11 of 15 fell short, including Firecrawl (0 of 5) and Bright Data (4 of 5). Browserbase got 0 of 5 on 8 of the 9 travel sites. String got all 5 on all 9.
- **The price depends on where you search from.** Fares and currency change with the country of the search. skyscanner.net quoted New York to Los Angeles in pounds for the UK market, even through a US connection.
- **Many prices on the page are old.** Kayak's New York to Los Angeles route page leads with $190, which it says is the cheapest fare a Kayak user found in the last 72 hours. Store it as a live fare and your data is days out of date.

Travel sites in the benchmark (attempts that returned the real page, out of 5; run of September 16, 2026):

| Site | String | Browserbase | Bright Data | Firecrawl | Apify | Oxylabs | Zyte |
|---|---|---|---|---|---|---|---|
| skyscanner.net | 5 | 0 | 5 | 5 | 0 | 0 | 3 |
| aa.com | 5 | 0 | 4 | 0 | 5 | 5 | 0 |
| kayak.com | 5 | 0 | 5 | 5 | 5 | 0 | 5 |
| expedia.com | 5 | 0 | 1 | 5 | 5 | 5 | 5 |
| delta.com | 5 | 0 | 5 | 5 | 5 | 5 | 4 |
| All 9 travel sites | 45 of 45 | 5 of 45 | 39 of 45 | 40 of 45 | 34 of 45 | 28 of 45 | 32 of 45 |

---

## Why do teams choose String?

- **It works where others fail.** String returned 97% of requests across 100 bot-protected sites in our [September 2026 benchmark](https://usestring.ai/benchmark), the most of 16 providers, and all 45 attempts on the 9 travel sites in it.
- **You choose the country.** Set `countryCode` to send each request from one country, so every run in a series sees the same market.
- **Google Flights comes back as rows.** The [Google Flights integration](https://portal.usestring.ai/docs/sites/googleflights) returns live searches, round trips, date calendars and every seller's price as typed JSON.
- **You pay only for pages that come back.** Blocks and errors are free.

---

## How do I scrape flight prices?

### 1. Pick your sources

Metasearch sites like Google Flights, Kayak and Skyscanner show many airlines on one page, so they cost the fewest requests per route. Airline sites like aa.com show the airline's own fares. Online travel agencies like Expedia show what resellers charge.

**With String:** Fetch any of them by URL. For Google Flights, the site integration returns each search as typed rows.

### 2. Fix the country and currency

Pick one country and one currency for each price series and never change them. Google Flights takes them in the URL as `gl` and `curr`. Each Skyscanner and Kayak domain serves its own market, so skyscanner.net quotes UK prices in pounds.

**With String:** Set `countryCode` on every request. The Google Flights integration also takes `country`, which sets the point of sale, and `currency`.

### 3. Tell live fares from cached ones

A dated search shows the price for that day. Route and deal pages often show prices other people found earlier: Kayak's route page labels its headline fare as found in the last 72 hours. Use cached prices for trends, and dated searches for the price of a flight.

### 4. Read round-trip prices as the whole trip

On a round-trip search, each outbound flight shows the price of the whole trip. The same Delta nonstop from JFK to LAX on November 12 showed $204 one way and $418 round trip. Save the trip type, dates and number of passengers with every price, or you will compare one-way and round-trip fares as if they were the same.

**With String:** The Google Flights integration's `return-flights` action lists the return flights for a chosen outbound flight, each priced for the round trip.

### 5. Treat a blank page as a failure

Count the fares on every page. A Kayak dated search came back as a 200 with no fares, because Kayak loads them with JavaScript. A Google Flights search from the UK came back as a 200 with no fares at all. Flag the page and keep the last good run, so a route doesn't look sold out because one page failed.

**With String:** Mark the fare list as required with at least one item. A page without fares comes back as `"extracted": false`. Set `executeJS` for sites that load fares with JavaScript.

### 6. Match the same flight across sellers

Match on flight number and date, not on airline name. One flight can be sold by its airline and by travel agencies, and under partner airlines' flight numbers too.

**With String:** The Google Flights integration returns each leg's flight number and codeshares. Its `booking-options` action lists every seller of an itinerary with its fare family and price.

### 7. Track prices on a schedule

Check each route and date once a day to build a fare history. Store the time you checked in your own code. Check more often only for routes where you must react to a change within hours.

**With String:** The Google Flights `calendar` action prices every departure date in a range of up to 180 days in one call.

---

## Quickstart

### From your agent

Add the hosted MCP server to Claude, Cursor, ChatGPT or any MCP client. Then give your agent a flight search URL. It calls the `web_access_fetch` tool and reads the fares.

```text
https://mcp.usestring.ai/v1/mcp
```

[MCP setup](https://portal.usestring.ai/docs/mcp/remote) · [n8n](https://portal.usestring.ai/docs/integrations/n8n) · [Zapier](https://portal.usestring.ai/docs/integrations/zapier)

### From the API

One call returns the flights on a Google Flights search page as JSON. If extraction can't fill the required fields, you get `"extracted": false` back instead of a guess.

```bash
curl https://request.usestring.ai/v1/fetch \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.google.com/travel/flights?q=Flights%20to%20LAX%20from%20JFK%20on%202026-11-12%20oneway&hl=en&gl=us&curr=USD",
    "countryCode": "US",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "flights": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "properties": {
              "airline": { "type": "string" },
              "depart": { "type": "string" },
              "arrive": { "type": "string" },
              "stops": { "type": "integer" },
              "price": { "type": "number" }
            },
            "required": ["airline", "depart", "arrive", "price"]
          }
        }
      },
      "required": ["flights"]
    }
  }'
```

Response (first 3 of 34 flights):

```json
{
  "flights": [
    {
      "airline": "Delta",
      "depart": "2026-11-12T14:00",
      "arrive": "2026-11-12T17:16",
      "stops": 0,
      "price": 204
    },
    {
      "airline": "Delta",
      "depart": "2026-11-12T15:20",
      "arrive": "2026-11-12T18:33",
      "stops": 0,
      "price": 204
    },
    {
      "airline": "JetBlue",
      "depart": "2026-11-12T15:29",
      "arrive": "2026-11-12T18:46",
      "stops": 0,
      "price": 204
    }
  ]
}
```

[Get a free API key](https://portal.usestring.ai/sign-up) · [Google Flights integration](https://portal.usestring.ai/docs/sites/googleflights) · [Structured extraction docs](https://portal.usestring.ai/docs/fetch/structured-extraction)

The Google Flights integration takes the same search as typed input (`origin`, `destination`, `departureDate`, optional `returnDate`, passengers, `cabin`, `maxStops`, `country`, `currency`) at `POST https://request.usestring.ai/v1/integrations/googleflights/search`. Its actions are `search`, `return-flights`, `calendar` and `booking-options`. Each call is billed as the Web Access requests it makes, with no charge for the action itself.

---

## Get a free sample of fare data

Tell us which routes, dates and sites you track. We'll run String on them and email you a sample of the fare data, free.

Email [support@usestring.ai](mailto:support@usestring.ai) with your work email, what you want to collect and the routes or URLs, or use the [form on the page](https://usestring.ai/use-cases/flight-price-scraping#sample-data).

What a sample looks like (rows from String fetches on Oct 14, 2026, countryCode US). Google Flights rows are one-way economy fares for 1 adult on November 12, 2026, except the round-trip row (November 12 to 19). The Kayak row is the cheapest fare a Kayak user found in the 72 hours before the fetch, for October 20. The Skyscanner row is a deal fare from skyscanner.net's UK market, in pounds, for November 17:

| Site | Route | Flight | Fare |
|---|---|---|---|
| Google Flights | JFK → LAX | Delta, nonstop | $204 |
| Google Flights | JFK → LAX | JetBlue, 1 stop | $184 |
| Google Flights | JFK → LAX | American, nonstop | $319 |
| Google Flights | JFK ⇄ LAX | Delta, round trip | $418 |
| Kayak | LGA → LAX | Frontier, 1 stop | $190 |
| Skyscanner | EWR → LAX | Frontier, 1 stop | £78 |

---

## Frequently asked questions

### What's the best way to scrape flight prices?

Fetch dated search pages for a fixed list of routes and dates, from one country and in one currency, once a day. Metasearch sites like Google Flights cover the most airlines per request. The hard part is getting the pages at all, because airline and travel sites block most scrapers. The String Web Access API was the only one of 16 providers to fetch all 9 travel sites on every attempt in our [September 2026 benchmark](https://usestring.ai/benchmark), and returned 97% of requests across 100 bot-protected sites, the most of 16.

### How do I scrape Google Flights?

Google closed its QPX Express flight API in 2018, so you read the search pages. Fetch a search URL with the route and date in the `q` parameter and fix `gl` and `curr`. The fares are in the first HTML, so no browser is needed. Or call String's Google Flights integration, which returns one-way and round-trip searches, return flights, a date calendar and booking options as typed JSON. Our [Python guide to scraping flight prices](https://usestring.ai/blog/scrape-flight-prices-python) walks through a full script.

### How much does it cost to track flight prices every day?

Checking 20 routes on 30 dates every day is 18,000 requests a month. At the standard rate on the Starter plan ($20 a month, $0.30 per 1,000) that's $5.40 in usage. Every Google Flights, Kayak, Skyscanner and aa.com page we fetched for this guide was billed at the standard rate. Pages that need a real browser bill at browser rates, $1.50 per 1,000 on standard proxies and $6.00 on premium. Structured extraction adds a fee per request. See [pricing](https://usestring.ai/pricing). Failed requests aren't billed.

### Is it legal to scrape flight prices?

Prices are facts, and facts aren't protected by copyright. Airlines have still sued. Ryanair won a jury verdict against Booking.com in 2024 over scraping ryanair.com, and the court overturned it in 2025 because Ryanair hadn't proved its losses. Read public search pages while logged out, read each site's terms, keep your request rate reasonable, and check with your counsel. We go through the case law in [Is web scraping legal?](https://usestring.ai/answers/is-web-scraping-legal)

### How do I avoid getting blocked on airline and travel sites?

Send each request to String instead of the site. Proxy rotation, browser fingerprints, captcha solving and retries happen behind the endpoint, and JavaScript rendering is switched on per request for pages that need it. Requests that still fail aren't billed.

### Why does the same flight show different prices?

Fares change with the country and currency of the search, the trip type, the number of passengers and the seller. A round-trip search shows the whole trip's price on each outbound flight. A route page may show a price someone found days ago. Fix the country, currency, trip type and passengers for each series, and store the seller with the price.

### Can I scrape Kayak or Skyscanner?

Yes, String can scrape Kayak and Skyscanner. In our benchmark String got all 5 attempts on kayak.com and skyscanner.net. Browserbase got 0 of 5 on both. Both sites' route pages came back with plain requests. Kayak's dated search pages load their fares with JavaScript, so set `executeJS` on those. skyscanner.net serves the UK market in pounds.

### Can I get prices from every site that sells a flight?

Yes, on Google Flights. Pass a flight's `selectionToken` from a search to the Google Flights integration's `booking-options` action. It lists each airline or travel agency that sells the itinerary, with its fare family, price and booking site.

### Does String work on the travel sites I need?

Send us the routes and URLs and we'll run them and show you what comes back before you commit. Ask for a [free sample of fare data](#get-a-free-sample-of-fare-data), or test them yourself with your first 5,000 free requests.

---

## Send us the sites you can't get

We'll show you what comes back. [Get started](https://portal.usestring.ai/sign-up) · [Book a demo](https://usestring.ai/book-demo)

All use cases: https://usestring.ai/use-cases

---

[llms.txt](https://usestring.ai/llms.txt): machine-readable index of this site for AI agents.
