1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "locations": ["London"],
11 "treatments": ["Haircuts and hairdressing"],
12 "urls": [
13 "https://www.treatwell.co.uk/places/treatment-haircuts-and-hairdressing/offer-type-local/in-london-uk/",
14 "https://www.treatwell.co.uk/places/treatment-haircuts-and-hairdressing/offer-type-local/in-manchester-uk/sort-price-asc/page-2/",
15 "https://www.treatwell.co.uk/places/brand-olaplex/in-london-uk/",
16 "https://www.treatwell.co.uk/places/chain-live-true-london/",
17 "https://www.treatwell.co.uk/place/lili-london/",
18 "https://www.treatwell.co.uk/hairdressers-and-hair-salons/",
19 ],
20 "fetchDetails": True,
21 "maxReviews": 20,
22 "maxItems": 20,
23 "proxy": { "useApifyProxy": True },
24 "incrementalMode": False,
25 "emitUnchanged": False,
26 "emitExpired": True,
27}
28
29
30run = client.actor("abotapi/treatwell-co-uk-scraper").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37