1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "origin": "New York",
10 "destination": "London",
11 "departureDate": "",
12 "returnDate": "",
13 "adults": 1,
14 "children": 0,
15 "infantsInSeat": 0,
16 "infantsOnLap": 0,
17 "cabinClass": "economy",
18 "currency": "USD",
19 "maxItems": 20,
20 "maxItemsWithBookingDetails": 3,
21 "calendarDays": 7,
22 "proxyConfiguration": {
23 "useApifyProxy": True,
24 "apifyProxyGroups": ["RESIDENTIAL"],
25 },
26}
27
28
29run = client.actor("mrdoe/google-flights-scraper").call(run_input=run_input)
30
31
32print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
33for item in client.dataset(run.default_dataset_id).iterate_items():
34 print(item)
35
36