---
title: "Flight price scraping"
description: "Scraping flight prices and award seats from airline sites and OTAs like Kayak and Google Flights: fares by route, date and cabin, through Akamai."
canonical: https://www.zenrows.com/use-cases/scraping-flight-prices
updated: 2026-10-18
---

# Flight price scraping

Scraping flight prices means running fare searches on airline websites and online travel agencies and recording each fare by route, date, cabin and fare class. Zenrows fills the search form, gets through Akamai and other airline protection, and returns results as JSON or captured API responses for fare tracking and alerts.

## Sample output: flight prices for one route

```json
{
  "search": {
    "origin": "JFK",
    "destination": "LHR",
    "depart": "2026-12-18",
    "return": "2027-01-04",
    "passengers": 1,
    "cabin": "economy",
    "point_of_sale": "us"
  },
  "source": "airline.example.com",
  "searched_at": "2026-10-17T07:40:00Z",
  "currency": "USD",
  "itineraries": [
    { "flights": ["XX101", "XX118"], "stops": 0, "fare_brand": "Basic", "fare_class": "N", "price": 684.0, "seats_left": 4, "bag_included": false },
    { "flights": ["XX101", "XX118"], "stops": 0, "fare_brand": "Main", "fare_class": "L", "price": 789.0, "seats_left": null, "bag_included": true },
    { "flights": ["XX205", "XX230"], "stops": 1, "fare_brand": "Main", "fare_class": "Q", "price": 712.0, "seats_left": 7, "bag_included": true }
  ],
  "award": { "program": "Example Miles", "cabin": "business", "miles": 57500, "taxes": 5.6, "available": true },
  "lowest_price": 684.0
}
```

Illustrative: cash fares beside an award seat. Store `searched_at` and `point_of_sale` per fare: prices change by day and country.

## What flight price teams collect

Fare data is a grid of route, dates, cabin and passengers, run against each seller. Jobs differ in which part matters and how fast it refreshes.

| Job | Data you collect | Typical sources |
|---|---|---|
| Fare tracking and price alerts | Lowest fare per route and date, several times a day | Google Flights, Kayak, Skyscanner, airline sites |
| Award seat alerts | Miles, taxes and availability by cabin | Loyalty programs: LATAM Pass, Smiles, AAdvantage |
| Airline revenue benchmarking | Rival fares by fare brand and class on shared routes | United, Lufthansa, Turkish Airlines, British Airways, Air India |
| OTA versus direct price checks | One itinerary priced on the airline and on OTAs | Airline sites, Expedia, MakeMyTrip, Goibibo |
| Holiday package pricing | Flight plus hotel price by departure airport and date | TUI, Virgin Atlantic Holidays |
| Fare history datasets | Daily snapshots per route for forecasting | Any of the above, stored for months |

## Why airline websites block flight scrapers

Every search costs the airline money, so it is guarded hard: bot management like Akamai, sometimes a challenge page before results.

| What breaks | What it looks like | How Zenrows handles it |
|---|---|---|
| Akamai bot management | Works a day or two, then access denied on every request | Zenrows' stealth and retries get through [Akamai](/bypass/akamai) and similar |
| Search form before any fare | No fares until you type airports, pick dates and search | Page actions submit the form in Fetch; [Browser](/products/browser) drives longer flows with Playwright |
| Fares in background API calls | Results drawn from JSON, not parseable HTML | Fetch captures the XHR calls; read the fare JSON directly |
| Challenge pages | A CAPTCHA or Turnstile page instead of results | Adaptive Stealth Mode escalates to rendering and stealth and gets the search through |
| Point-of-sale fares | One seat, different prices by country and currency | Geotargeting searches from the country you track |
| Award searches behind a login | Miles availability for signed-in members only | A Browser session keeps cookies from login to search |

## How to scrape flight prices with Zenrows

1. **Pick routes and dates**: airport pairs, dates, cabin, passengers; build URLs where the search lives in the URL.
2. **Run the search**: URLs to Fetch with Adaptive Stealth Mode; forms with page actions that fill airports and dates and click search.
3. **Read the fares** from the captured fare response, or with CSS selectors on the results.
4. **Use Browser for long flows**: logins, award calendars, multi-page booking, with Playwright or Puppeteer.
5. **Repeat on a schedule**: the URL grid in Batch, each fare stored with time and market.

```python Python
# pip install requests
import json
import requests

AIRLINE_SEARCH_URL = "https://airline.example.com/search"  # placeholder

instructions = [
    {"wait_for": "#origin"},
    {"fill": ["#origin", "JFK"]},
    {"fill": ["#destination", "LHR"]},
    {"fill": ["#depart-date", "2026-12-18"]},
    {"click": "button[type='submit']"},
    {"wait_for": ".fare-results"},
]
params = {
    "apikey": "YOUR_ZENROWS_API_KEY",
    "url": AIRLINE_SEARCH_URL,
    "js_render": "true",
    "premium_proxy": "true",
    "proxy_country": "us",
    "js_instructions": json.dumps(instructions),
    "json_response": "true",  # returns the fare API calls the page made
}
response = requests.get("https://api.zenrows.com/v1/", params=params)
print(response.json())
```

```javascript Node.js
// npm install playwright
import { chromium } from "playwright";

const LOYALTY_LOGIN_URL = "https://airline.example.com/login";  // placeholder
const AWARD_SEARCH_URL = "https://airline.example.com/award-search?from=GRU&to=LIS&date=2026-12-18";

const browser = await chromium.connectOverCDP(
  "wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_country=br"
);
const page = await browser.newPage();

// Capture the award search response instead of parsing the page
page.on("response", async (res) => {
  if (res.url().includes("/award-search")) console.log(await res.json());
});

await page.goto(LOYALTY_LOGIN_URL);
await page.fill("#member-id", process.env.MEMBER_ID);
await page.fill("#password", process.env.MEMBER_PASSWORD);
await page.click("button[type='submit']");
await page.goto(AWARD_SEARCH_URL);  // route, date and cabin in the URL
await page.waitForSelector(".award-calendar");
await browser.close();
```

```bash CLI
npx -y @zenrows/cli init
# A URL-driven search, rendered from the US market
zenrows fetch "FLIGHT_SEARCH_URL" --proxy-country us --wait-for ".fare-results" --output markdown
# The full route and date grid as one job
zenrows batch create fare-grid.jsonl --wait
zenrows batch results JOB_ID --out fares.jsonl
```

```text Claude Code (MCP)
# Connect once
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp

# Then ask:
Use Zenrows to open Google Flights, search a one-way economy flight for one adult from JFK to LHR on 18 December 2026, and return the five cheapest options with airline, departure and arrival times, stops and price in USD.
```

## Which Zenrows product fits

| If you need to | Use | Why |
|---|---|---|
| Price a route via searchable URLs | [Fetch](/products/fetch) | One request, the results or the fare JSON |
| Fill an airline's search form in one request | [Fetch](/products/fetch) with page actions | Fills airports and dates, searches, waits for results |
| Search award seats behind logins or multi-step flows | [Browser](/products/browser) | A real browser driven by Playwright or Puppeteer |
| Refresh thousands of route-date searches daily | [Batch](/products/batch) | The full grid as one job, results by webhook |

## What success looks like

| Measure | What good looks like | How to check it |
|---|---|---|
| Search success per airline | Most searches return fares, per carrier, not averaged | Successes over attempts per airline, per day |
| Fare match | The stored fare is what a traveller sees in that market | Re-run a sample by hand; compare price and fare brand |
| Alert lead time | Drops reach users within one cycle | Time from `searched_at` to alert |
| Grid coverage | A fare or explicit no-availability in every cell | Empty cells per carrier, per run |
| Response time | Fast enough for on-demand checks | Response time per request |
| Grid run time | The grid finishes inside one refresh window | Start and end time of each Batch job |

## Flight price scraping FAQ

### How do I scrape flight prices?

Start from the airline's or OTA's search: a URL with route and dates goes to Fetch with Adaptive Stealth Mode; a form gets page actions that fill it and search. Read fares from captured background calls or with CSS selectors.

### Can I scrape Google Flights?

Yes. It renders with JavaScript: use Adaptive Stealth Mode, geotargeted to your market. A common pattern: find the cheapest seller there, then price that airline directly for fare class and baggage.

### Why are airline websites so hard to scrape?

Each search hits a costly reservation system, so airlines guard it, often with Akamai, which learns patterns over days, then blocks. Fares load from background calls, sometimes behind a challenge. Adaptive Stealth Mode escalates only when needed.

### Is there a flight price API I can use instead of scraping?

Airline distribution APIs and GDS access need commercial agreements and rarely include award seats, web-only fares or OTA prices. A tracker built on Zenrows returns what each site shows the public, for any route and market.

### Can I track award seats and miles prices?

Yes. Award searches often need a loyalty login: in a Browser session, sign in with your own credentials, search and capture the response. Store miles, taxes and cabin per date and alert when seats open.

### How do I monitor flight prices over time?

A fixed grid of routes, dates and markets in Batch: several times a day close in, daily months out. Store search time, point of sale and fare brand; alert on change from the last run, not a fixed price.

### Is scraping flight prices legal?

Public fares shown without login are widely collected for comparison and research. Read each airline's terms, sign in only to accounts you may use, keep volumes reasonable, and check with your legal team.

## Related use cases

- [Travel data scraping](https://www.zenrows.com/use-cases/travel-data-scraping.md): Fares, room rates, car hire quotes, tour prices and reviews from airlines, OTAs and travel marketplaces.
- [Hotel data scraping](https://www.zenrows.com/use-cases/hotel-data-scraping.md): Nightly rates, room types and parity gaps from Booking.com, Expedia, Google Hotels and brand sites.
- [Dynamic pricing data](https://www.zenrows.com/use-cases/dynamic-pricing.md): Live competitor price, stock and demand inputs for a repricing engine, on demand or on a schedule.
- [Competitor price scraping](https://www.zenrows.com/use-cases/price-scraping.md): Competitor prices, promotions, shipping and stock per SKU from retailers and marketplaces, refreshed on your schedule.
- [Browser automation](https://www.zenrows.com/use-cases/browser-automation.md): Logins, portal lookups and report downloads run in a cloud browser your Playwright or Puppeteer code drives.
- [Web scraping for price comparison](https://www.zenrows.com/use-cases/web-scraping-for-price-comparison.md): Merchant offers, prices, shipping and identifiers for comparison sites and apps, from catalogs without a feed.

Start free: https://app.zenrows.com/register. Docs: https://docs.zenrows.com

## Structured data



<script type="application/ld+json">
{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.zenrows.com/use-cases/scraping-flight-prices#webpage","url":"https://www.zenrows.com/use-cases/scraping-flight-prices","name":"Flight price scraping","description":"Scraping flight prices and award seats from airline sites and OTAs like Kayak and Google Flights: fares by route, date and cabin, through Akamai.","isPartOf":{"@id":"https://www.zenrows.com/#website"},"inLanguage":"en","datePublished":"2026-10-18","dateModified":"2026-10-18","about":{"@type":"Thing","name":"scraping flight prices"},"keywords":"scraping flight prices, scrape flight prices, web scraping flight data, web scraping flight tickets, flight price scraper, flight price api, flight price tracker api, airfare data, flight price data scraping, flight price monitoring","publisher":{"@type":"Organization","name":"Zenrows","url":"https://www.zenrows.com/"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.zenrows.com/"},{"@type":"ListItem","position":2,"name":"Use cases","item":"https://www.zenrows.com/use-cases"},{"@type":"ListItem","position":3,"name":"Flight price scraping","item":"https://www.zenrows.com/use-cases/scraping-flight-prices"}]},{"@type":"FAQPage","@id":"https://www.zenrows.com/use-cases/scraping-flight-prices#faq","mainEntity":[{"@type":"Question","name":"How do I scrape flight prices?","acceptedAnswer":{"@type":"Answer","text":"Start from the airline's or OTA's search: a URL with route and dates goes to Fetch with Adaptive Stealth Mode; a form gets page actions that fill it and search. Read fares from captured background calls or with CSS selectors."}},{"@type":"Question","name":"Can I scrape Google Flights?","acceptedAnswer":{"@type":"Answer","text":"Yes. It renders with JavaScript: use Adaptive Stealth Mode, geotargeted to your market. A common pattern: find the cheapest seller there, then price that airline directly for fare class and baggage."}},{"@type":"Question","name":"Why are airline websites so hard to scrape?","acceptedAnswer":{"@type":"Answer","text":"Each search hits a costly reservation system, so airlines guard it, often with Akamai, which learns patterns over days, then blocks. Fares load from background calls, sometimes behind a challenge. Adaptive Stealth Mode escalates only when needed."}},{"@type":"Question","name":"Is there a flight price API I can use instead of scraping?","acceptedAnswer":{"@type":"Answer","text":"Airline distribution APIs and GDS access need commercial agreements and rarely include award seats, web-only fares or OTA prices. A tracker built on Zenrows returns what each site shows the public, for any route and market."}},{"@type":"Question","name":"Can I track award seats and miles prices?","acceptedAnswer":{"@type":"Answer","text":"Yes. Award searches often need a loyalty login: in a Browser session, sign in with your own credentials, search and capture the response. Store miles, taxes and cabin per date and alert when seats open."}},{"@type":"Question","name":"How do I monitor flight prices over time?","acceptedAnswer":{"@type":"Answer","text":"A fixed grid of routes, dates and markets in Batch: several times a day close in, daily months out. Store search time, point of sale and fare brand; alert on change from the last run, not a fixed price."}},{"@type":"Question","name":"Is scraping flight prices legal?","acceptedAnswer":{"@type":"Answer","text":"Public fares shown without login are widely collected for comparison and research. Read each airline's terms, sign in only to accounts you may use, keep volumes reasonable, and check with your legal team."}}]}]}
</script>
