1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "searchTerms": ["shampoo"],
11 "sortBy": "relevance",
12 "onlyOffers": False,
13 "urls": [
14 "https://www.boots.com/",
15 "https://www.boots.com/sitesearch?searchTerm=shampoo",
16 "https://www.boots.com/beauty/skincare",
17 "https://www.boots.com/olaplex-no4-strengthening-shampoo-250ml-10401541",
18 ],
19 "maxItems": 20,
20 "proxy": {
21 "useApifyProxy": True,
22 "apifyProxyGroups": ["RESIDENTIAL"],
23 "apifyProxyCountry": "GB",
24 },
25 "incrementalMode": False,
26 "compactUpdates": False,
27 "emitUnchanged": False,
28 "emitExpired": False,
29 "ignoreFieldsForChanges": [
30 "rating_average",
31 "rating_count",
32 ],
33 "notifyOnlyChanges": False,
34}
35
36
37run = client.actor("abotapi/boots-com-scraper").call(run_input=run_input)
38
39
40print(f"πΎ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
41for item in client.dataset(run.default_dataset_id).iterate_items():
42 print(item)
43
44