1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "queries": ["organic milk"],
11 "retailers": [
12 "costco",
13 "safeway",
14 ],
15 "urls": [
16 "https://www.instacart.com/store/costco/s?k=greek+yogurt",
17 "https://www.instacart.com/store/costco/products/19208138",
18 ],
19 "includeDepartments": False,
20 "postalCode": "10001",
21 "inStockOnly": False,
22 "onSaleOnly": False,
23 "fetchDetails": False,
24 "incrementalMode": False,
25 "emitUnchanged": False,
26 "emitExpired": False,
27 "proxy": {
28 "useApifyProxy": True,
29 "apifyProxyGroups": ["RESIDENTIAL"],
30 "apifyProxyCountry": "US",
31 },
32}
33
34
35run = client.actor("abotapi/instacart-grocery-price-scraper").call(run_input=run_input)
36
37
38print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
39for item in client.dataset(run.default_dataset_id).iterate_items():
40 print(item)
41
42