1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableSearch": True,
10 "searchTasks": [
11 {
12 "query": "coffee shops",
13 "location": "Seattle, WA",
14 },
15 {
16 "query": "plumbers",
17 "location": "Austin, TX",
18 },
19 ],
20 "placesPerQuery": 20,
21 "excludeClosed": True,
22 "fetchPlaceDetails": True,
23 "fetchEmails": False,
24 "language": "en",
25 "country": "us",
26 "maxItems": 10000,
27 "proxyConfiguration": {
28 "useApifyProxy": True,
29 "apifyProxyGroups": ["RESIDENTIAL"],
30 "apifyProxyCountry": "US",
31 },
32}
33
34
35run = client.actor("b2b_leads/bing-maps-real-time-data").call(run_input=run_input)
36
37
38print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
39for item in client.dataset(run.default_dataset_id).iterate_items():
40 print(item)
41
42