1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "departDateWindowDays": 0,
10 "routes": [],
11 "startUrls": [],
12 "multiCityLegs": [],
13 "adults": 1,
14 "children": 0,
15 "infantsInSeat": 0,
16 "infantsOnLap": 0,
17 "cabinClass": "economy",
18 "maxStops": "any",
19 "airlines": [],
20 "excludeAirlines": [],
21 "alliances": [],
22 "connectOnlyVia": [],
23 "lessEmissionsOnly": False,
24 "currency": "USD",
25 "market": "US",
26 "language": "en",
27 "sortBy": "top",
28 "calendarDays": 0,
29 "calendarOnly": False,
30 "resolveReturnFlights": False,
31 "maxReturnResolutions": 5,
32 "maxReturnOptions": 10,
33 "resolveBookingOptions": False,
34 "maxBookingResolutions": 5,
35 "exploreAnywhere": False,
36 "exploreRegion": "anywhere",
37 "maxDestinations": 60,
38 "includePriceInsights": True,
39 "includeUnavailablePrices": False,
40 "onlyChanges": False,
41 "onlyNewItems": False,
42 "maxItems": 20,
43 "proxyConfiguration": { "useApifyProxy": True },
44}
45
46
47run = client.actor("kizukidata/google-flights-scraper").call(run_input=run_input)
48
49
50print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
51for item in client.dataset(run.default_dataset_id).iterate_items():
52 print(item)
53
54