1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "categories",
10 "locations": ["78701"],
11 "categoryInputs": [
12 "https://www.gopuff.com/c/candy/txERmYDy",
13 "https://www.gopuff.com/deals/snack-deals/J9aZuA",
14 "https://www.gopuff.com/",
15 "https://www.gopuff.com/shop",
16 "https://www.gopuff.com/deals",
17 ],
18 "discoverCategories": True,
19 "inStockOnly": False,
20 "productInputs": ["https://www.gopuff.com/p/banana---1ct/p198176"],
21 "maxItems": 20,
22 "maxPages": 0,
23 "pageSize": 50,
24 "fetchDetails": False,
25 "proxyConfiguration": {
26 "useApifyProxy": True,
27 "apifyProxyGroups": ["RESIDENTIAL"],
28 "apifyProxyCountry": "US",
29 },
30 "incrementalMode": False,
31 "emitUnchanged": False,
32 "emitExpired": False,
33 "ignoreFieldsForChanges": [],
34 "maxNotifyListings": 50,
35}
36
37
38run = client.actor("abotapi/gopuff-prices-assortment-scraper").call(run_input=run_input)
39
40
41print(f"πΎ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
42for item in client.dataset(run.default_dataset_id).iterate_items():
43 print(item)
44
45