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