1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "businesses": [
10 {
11 "title": "Example Consulting",
12 "website": "https://example.com/",
13 "categoryName": "Consultant",
14 "phone": "+1 555 0100",
15 "address": "1 Example Way, Springfield",
16 "totalScore": 4.6,
17 "reviewsCount": 41,
18 "placeId": "sample-1",
19 },
20 {
21 "title": "Joe's Plumbing",
22 "categoryName": "Plumber",
23 "phone": "+27 21 555 0101",
24 "address": "12 Long St, Cape Town",
25 "totalScore": 4.9,
26 "reviewsCount": 6,
27 "placeId": "sample-2",
28 },
29 {
30 "title": "Nails by Thandi",
31 "website": "https://www.facebook.com/nailsbythandi",
32 "categoryName": "Nail salon",
33 "totalScore": 3.8,
34 "reviewsCount": 22,
35 "placeId": "sample-3",
36 },
37 {
38 "title": "Expired Cert Bakery",
39 "website": "https://expired.badssl.com/",
40 "categoryName": "Bakery",
41 "totalScore": 4.4,
42 "reviewsCount": 88,
43 "placeId": "sample-4",
44 },
45 {
46 "title": "Ghost Domain Garage",
47 "website": "https://lead-qualifier-test-does-not-exist.co.za/",
48 "categoryName": "Auto repair shop",
49 "placeId": "sample-5",
50 },
51 {
52 "title": "HTTP Only Hardware",
53 "website": "http://httpforever.com/",
54 "categoryName": "Hardware store",
55 "totalScore": 4.1,
56 "reviewsCount": 15,
57 "placeId": "sample-6",
58 },
59 {
60 "title": "Old Town Physics Tutors",
61 "website": "http://info.cern.ch/",
62 "categoryName": "Tutoring service",
63 "totalScore": 4.7,
64 "reviewsCount": 12,
65 "placeId": "sample-7",
66 },
67 ],
68 "urls": [
69 "https://httpbin.org/status/403",
70 "https://www.google.com/lead-qualifier-missing-page",
71 "wordpress.org",
72 "https://www.python.org",
73 "https://www.example.com/contact",
74 ],
75}
76
77
78run = client.actor("crawlem/lead-qualifier").call(run_input=run_input)
79
80
81print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
82for item in client.dataset(run.default_dataset_id).iterate_items():
83 print(item)
84
85