NewLaunching String Web Access APIRead the manifesto →

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 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.

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

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.

The problem

Why does flight price scraping break?

  • Airline and travel sites block scrapers. In our September 2026 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.

Airline and travel sites

StringOne API
FetchSearch SitemapsBrowser
Your fare database

The solution

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, 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 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.

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

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.

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)

{
  "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 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.

Request a free sample fare data
What a sample looks like
SiteRouteFlightFare
Google FlightsJFK → LAXDelta, nonstop$204
Google FlightsJFK → LAXJetBlue, 1 stop$184
Google FlightsJFK → LAXAmerican, nonstop$319
Google FlightsJFK ⇄ LAXDelta, round trip$418
KayakLGA → LAXFrontier, 1 stop$190
SkyscannerEWR → LAXFrontier, 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, 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 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. 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?

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, 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.

© 2026 StringEU and UK GDPR Article 27 representative — appointment verified by EuverifyBuilt in New York City 🗽 🍎