1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableSearch": True,
10 "searchTasks": [{
11 "keyword": "plumber",
12 "location": "New York",
13 "country": "United States",
14 "maxResults": 10,
15 }],
16 "enableListingDetails": False,
17 "enableLeadDetails": False,
18 "concurrency": 2,
19 "proxyConfiguration": {
20 "useApifyProxy": True,
21 "apifyProxyGroups": ["RESIDENTIAL"],
22 "apifyProxyCountry": "US",
23 },
24}
25
26
27run = client.actor("b2b_leads/brownbook-real-time-data-scraper").call(run_input=run_input)
28
29
30print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34