Skip to main content
NEW AI Studio is now available Try it now
Travel Verified

Google Flights Scraper

Extract flight prices, routes, airline data, and fare comparisons from Google Flights. Powered by spider-browser .

Get Started Documentation
google.com/travel target
99.9% success rate
~4ms latency
Quick Start

Extract data in minutes

google-flights-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
  stealth: 2,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://www.google.com/travel/flights/search?tfs=CBwQAhopEgoyMDI2LTA2LTAxagwIAhIIL20vMDJfMjhyDAgCEggvbS8wNGpwbBopEgoyMDI2LTA2LTA4agwIAhIIL20vMDRqcGxyDAgCEggvbS8wMl8yOA");
await page.content(15000);

const data = await page.evaluate(`(() => {
  const flights = [];
  document.querySelectorAll("li[data-ved], [role='listitem']").forEach(el => {
    const spans = [...(el.querySelectorAll("span") || [])];
    const airline = el.querySelector("[role='heading'], h3")?.textContent?.trim() || spans[0]?.textContent?.trim();
    const times = spans.find(s => /d{1,2}:d{2}/.test(s.textContent || ""))?.textContent?.trim();
    const duration = spans.find(s => /d+s*(h|hr|min)/i.test(s.textContent || ""))?.textContent?.trim();
    const price = spans.find(s => /$[d,]+/.test(s.textContent || ""))?.textContent?.trim();
    if (airline && airline.length > 1) flights.push({ airline, times, duration, price });
  });
  return JSON.stringify({ total: flights.length, flights: flights.slice(0, 10) });
})()`);

console.log(JSON.parse(data));
await spider.close();
✓ ready to run | spider-browser | TypeScript
Extraction

Data you can extract

AirlinePriceDepartureArrivalDurationStopsCarbon emissionsFare class
Pricing

Dynamic rate capture

Session-aware scraping captures pricing on google.com/travel that changes per visitor.

Rendering

Complex SPA handling

Full browser rendering for React/Next.js booking interfaces and search results.

Scale

Destination coverage

Scrape listings across thousands of destinations and date ranges concurrently.

Related

More Travel scrapers

Start scraping google.com/travel

Get your API key and start extracting data in minutes.