1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "origins": ["JFK"],
11 "destinations": ["LHR"],
12 "cabin": "economy",
13 "passengers": 1,
14 "sortBy": "points",
15 "links": [
16 { "url": "https://www.pointhound.com/flights?q=CiIKA0pGSxIbSm9obiBGIEtlbm5lZHkgSW50bCBBaXJwb3J0Eh4KA0xIUhIXTG9uZG9uIEhlYXRocm93IEFpcnBvcnQaCjIwMjYtMTItMTUoATAB" },
17 { "url": "https://www.pointhound.com/explore/search/ChgKA05ZQxIRTmV3IFlvcmssIE5ZIEFyZWESFgoDTE9OEg9Mb25kb24sIFVLIEFyZWEaGAoKMjAyNi0xMi0wMRIKMjAyNi0xMi0xNSABKAEwATgDYgBoAXgCgAEB" },
18 { "url": "https://www.pointhound.com/flight/off_dlnqlVV1Z2" },
19 ],
20 "maxItems": 20,
21 "maxPages": 0,
22 "proxyConfiguration": { "useApifyProxy": True },
23 "incrementalMode": False,
24 "maxNotifyListings": 50,
25}
26
27
28run = client.actor("abotapi/pointhound-award-flight-scraper").call(run_input=run_input)
29
30
31print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35