1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableProSearch": True,
10 "searchTasks": [{
11 "category": "handyman",
12 "location": "Austin, TX",
13 "maxResults": 10,
14 }],
15 "maxResultsPerTask": 10,
16 "maxRelatedCategoriesPerTask": 4,
17 "enableLeadDetails": True,
18 "enableProDetails": False,
19 "proUrls": [],
20 "maxReviewsPerPro": 10,
21 "enableReviews": False,
22 "reviewUrls": [],
23 "enableScrapeByUrl": False,
24 "scrapeUrls": [],
25 "maxItems": 10,
26 "webhookUrl": "",
27 "webhookFormat": "json",
28 "proxyConfiguration": {
29 "useApifyProxy": True,
30 "apifyProxyGroups": ["RESIDENTIAL"],
31 "apifyProxyCountry": "US",
32 },
33}
34
35
36run = client.actor("b2b_leads/thumbtack-real-time-data-scraper").call(run_input=run_input)
37
38
39print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
40for item in client.dataset(run.default_dataset_id).iterate_items():
41 print(item)
42
43