1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "locations": ["Berlin"],
11 "radiusKm": 5,
12 "withStockOnly": False,
13 "weCareOnly": False,
14 "favoritesOnly": False,
15 "itemInputs": [
16 "https://www.toogoodtogo.com/en-us/item/76768600385172800",
17 "46934",
18 ],
19 "allowAutoSignup": True,
20 "fetchDetails": False,
21 "fetchReviews": False,
22 "maxReviews": 20,
23 "reviewsOnly": False,
24 "maxItems": 20,
25 "maxPages": 0,
26 "proxyConfiguration": { "useApifyProxy": True },
27 "incrementalMode": False,
28 "emitUnchanged": False,
29 "emitExpired": False,
30 "maxNotifyListings": 50,
31}
32
33
34run = client.actor("abotapi/toogoodtogo-surprise-bag-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