1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "legs": [
10 {
11 "origin": "JFK",
12 "destination": "LHR",
13 "date": "2027-03-10",
14 },
15 {
16 "origin": "LHR",
17 "destination": "CDG",
18 "date": "2027-03-14",
19 },
20 {
21 "origin": "CDG",
22 "destination": "JFK",
23 "date": "2027-03-18",
24 },
25 ],
26 "origins": ["JFK"],
27 "destinations": ["LHR"],
28 "departureDate": "",
29 "returnDate": "",
30 "proxyConfiguration": { "useApifyProxy": True },
31}
32
33
34run = client.actor("famed_bonobo/google-flights-scraper").call(run_input=run_input)
35
36
37print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
38for item in client.dataset(run.default_dataset_id).iterate_items():
39 print(item)
40
41