1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "queries": ["laptop"],
11 "searchUrls": [
12 "https://www.walmart.com/search?q=laptop",
13 "https://www.walmart.com/search?q=laptop&page=2",
14 "https://www.walmart.com/search?q=laptop&sort=price_low&facet=brand%3AApple",
15 "https://www.walmart.com/search?q=laptop&min_price=300&max_price=600",
16 "https://www.walmart.com/browse/electronics/3944",
17 "https://www.walmart.com/browse/electronics/3944?page=2",
18 "https://www.walmart.com/cp/electronics/3944",
19 "https://www.walmart.com/shop/deals",
20 "https://www.walmart.com/c/kp/laptops",
21 "https://www.walmart.com/seller/101216456",
22 "https://www.walmart.com/global/seller/101216456",
23 ],
24 "productInputs": [
25 "https://www.walmart.com/ip/Apple-MacBook-Air/19699754154",
26 "https://www.walmart.com/ip/19699754154",
27 "https://www.walmart.com/reviews/product/19699754154",
28 ],
29 "proxy": {
30 "useApifyProxy": True,
31 "apifyProxyGroups": ["RESIDENTIAL"],
32 "apifyProxyCountry": "US",
33 },
34 "incrementalMode": False,
35 "emitUnchanged": False,
36 "emitExpired": False,
37 "ignoreFieldsForChanges": [],
38}
39
40
41run = client.actor("abotapi/walmart-scraper").call(run_input=run_input)
42
43
44print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
45for item in client.dataset(run.default_dataset_id).iterate_items():
46 print(item)
47
48