Call the Google Flights Scraper from Node.js with the official apify-client.
npm install apify-clientimport { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('logiover/google-flights-scraper').call({
origin: 'JFK',
destination: 'LHR',
departureDate: '2026-08-15',
tripType: 'one-way',
seatClass: 'economy',
currency: 'USD',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Fetched ${items.length} itineraries`);
for (const f of items) {
console.log(`${f.airlines} · ${f.price} ${f.currency} · ${f.stops} stop(s) · ` +
`${f.fromCode}→${f.toCode} ${f.departureTime}-${f.arrivalTime}`);
}import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('logiover/google-flights-scraper').call({
origin: 'JFK',
destination: 'LHR',
departureDate: '2026-08-01',
departureDateEnd: '2026-08-31',
currency: 'USD',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
// cheapest price per departure date
const byDay = {};
for (const f of items) {
const d = f.departureDate;
if (!byDay[d] || f.price < byDay[d]) byDay[d] = f.price;
}
console.table(byDay);import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('logiover/google-flights-scraper').call({
origin: 'IST',
destination: 'DXB',
departureDate: '2026-09-10',
returnDate: '2026-09-17',
tripType: 'round-trip',
seatClass: 'business',
currency: 'EUR',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const cheapest = items.reduce((a, b) => (a.price < b.price ? a : b));
console.log('Cheapest:', cheapest.price, cheapest.currency, 'on', cheapest.airlines);📄 Documentation only.