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": ["https://www.gopuff.com/c/candy/txERmYDy"],
12 "discoverCategories": True,
13 "inStockOnly": False,
14 "productInputs": ["https://www.gopuff.com/p/banana---1ct/p198176"],
15 "maxItems": 20,
16 "maxPages": 0,
17 "pageSize": 50,
18 "fetchDetails": False,
19 "incrementalMode": False,
20 "emitUnchanged": False,
21 "emitExpired": False,
22 "maxNotifyListings": 50,
23 "proxyConfiguration": {
24 "useApifyProxy": True,
25 "apifyProxyGroups": ["RESIDENTIAL"],
26 "apifyProxyCountry": "US",
27 },
28}
29
30
31run = client.actor("abotapi/gopuff-prices-assortment-scraper").call(run_input=run_input)
32
33
34print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
35for item in client.dataset(run.default_dataset_id).iterate_items():
36 print(item)
37
38