1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableSearch": True,
10 "searchTasks": [
11 {
12 "activity": "plombier",
13 "location": "Paris 75015",
14 "maxResults": 10,
15 },
16 {
17 "activity": "restaurant",
18 "location": "Lyon 69002",
19 "maxResults": 10,
20 },
21 ],
22 "maxResultsPerTask": 10,
23 "enableLeadDetails": True,
24 "maxReviewsPerBusiness": 10,
25 "maxItems": 10000,
26 "concurrency": 3,
27 "delayBetweenRequestsMs": 250,
28 "proxyConfiguration": {
29 "useApifyProxy": True,
30 "apifyProxyGroups": ["RESIDENTIAL"],
31 "apifyProxyCountry": "FR",
32 },
33}
34
35
36run = client.actor("b2b_leads/pagesjaunes-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