Google Flights Scraper
Extract flight prices, routes, airline data, and fare comparisons from Google Flights. Built on spider-browser .
- target
- google.com/travel
- success rate
- 99.9%
- latency
- ~4ms
Extract data in minutes.
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(); Fields you can pull.
Dynamic rate capture
Session-aware scraping captures pricing on google.com/travel that changes per visitor.
Complex SPA handling
Full browser rendering for React/Next.js booking interfaces and search results.
Destination coverage
Scrape listings across thousands of destinations and date ranges concurrently.
More Travel scrapers.
Expedia Scraper
Extract travel deals, hotel listings, flight prices, and booking data from Expedia.
Airbnb Scraper
Extract Airbnb listings, pricing, host info, reviews, and availability from search results.
TripAdvisor Scraper
Extract hotel reviews, restaurant ratings, attraction data, and traveler photos from TripAdvisor.
Start scraping google.com/travel.
Grab an API key and call the endpoint above. The first request resolves the config; every request after hits cache.