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.
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:
The price for every passenger, one way or round trip, in the currency of the market you search from.
Airline, flight numbers, departure and arrival times, duration, stops and layover airports.
Each airline or travel agency that sells an itinerary, with its fare family and price.
The lowest price for every departure date in a range, for spotting the cheapest days to fly.
The problem
Airline and travel sites
The solution
countryCode to send each request from one country, so every run in a series sees the same market.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.
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.
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.
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.
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.
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.
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.
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
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 API keyGoogle Flights integrationStructured extraction docs
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.
| 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 |
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.
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.
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.
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?
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.
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.
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.
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.
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.