1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableSearchLawyers": True,
10 "searchTasks": [
11 {
12 "practiceArea": "personal injury",
13 "state": "Florida",
14 "city": "Miami",
15 "maxResults": 10,
16 },
17 {
18 "practiceArea": "criminal defense",
19 "state": "New York",
20 "maxResults": 10,
21 },
22 ],
23 "searchMaxResultsPerTask": 10,
24 "searchDepth": 20,
25 "firmSearchTasks": [{
26 "practiceArea": "personal injury",
27 "state": "Texas",
28 "city": "Houston",
29 "maxResults": 10,
30 }],
31 "firmSearchMaxResultsPerTask": 10,
32 "firmSearchDepth": 10,
33 "enableLeadDetails": True,
34 "maxItems": 10000,
35 "proxyConfiguration": {
36 "useApifyProxy": True,
37 "apifyProxyGroups": ["RESIDENTIAL"],
38 "apifyProxyCountry": "US",
39 },
40}
41
42
43run = client.actor("b2b_leads/findlaw-real-time-data-scraper").call(run_input=run_input)
44
45
46print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
47for item in client.dataset(run.default_dataset_id).iterate_items():
48 print(item)
49
50