Crawl: the most reliable web crawler APISee what’s new
Zenrows
Talk to sales Start free

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.

Updated

Sample output: flight prices for one route
{
  "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.

JobData you collectTypical 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 it looks like

Works a day or two, then access denied on every request

How Zenrows handles it

Zenrows' stealth and retries get through Akamai and similar

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.
# 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())

What success looks like

MeasureWhat good looks likeHow 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

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

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

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

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

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

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

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

Turn the live web into usable data.