1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "product_name": "wireless mouse",
11 "max_results_per_site": 3,
12 "sites": [
13 "amazon",
14 "walmart",
15 "bestbuy",
16 ],
17 "proxy": { "useApifyProxy": True },
18 "timeout": 30,
19 "use_fast_mode": False,
20 "include_shipping": True,
21 "enable_alerts": False,
22 "alert_threshold_percentage": 5,
23 "alert_on_all_time_low": True,
24 "send_test_notification": False,
25}
26
27
28run = client.actor("credible_sandal/price-comparison-scraper").call(run_input=run_input)
29
30
31print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
32for item in client.dataset(run["defaultDatasetId"]).iterate_items():
33 print(item)
34
35