1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "triggers": {
9 "conditions": [
10 {
11 "type": "rating_below",
12 "threshold": 3.5,
13 "severity": "high",
14 },
15 {
16 "type": "negative_review_ratio",
17 "threshold": 0.4,
18 "severity": "high",
19 },
20 {
21 "type": "bbb_complaints_above",
22 "threshold": 5,
23 "severity": "medium",
24 },
25 {
26 "type": "social_presence_missing",
27 "threshold": 2,
28 "severity": "low",
29 },
30 {
31 "type": "negative_news",
32 "threshold": 1,
33 "severity": "critical",
34 "keywords": [
35 "lawsuit",
36 "shutdown",
37 "fraud",
38 "violation",
39 ],
40 },
41 {
42 "type": "personnel_change",
43 "threshold": 1,
44 "severity": "medium",
45 },
46 {
47 "type": "hiring_surge",
48 "threshold": 10,
49 "severity": "medium",
50 },
51 {
52 "type": "financial_decline",
53 "threshold": 2,
54 "severity": "high",
55 },
56 {
57 "type": "saas_outage",
58 "threshold": 1,
59 "severity": "high",
60 },
61 {
62 "type": "location_expansion",
63 "threshold": 5,
64 "severity": "low",
65 },
66 {
67 "type": "heavy_advertiser",
68 "threshold": 20,
69 "severity": "low",
70 },
71 {
72 "type": "no_advertising",
73 "severity": "medium",
74 },
75 {
76 "type": "patent_activity",
77 "threshold": 1,
78 "severity": "low",
79 },
80 ],
81 "actions": {
82 "email": {
83 "enabled": False,
84 "webhookUrl": "",
85 "to": "owner@business.com",
86 "subjectTemplate": "[Dossier Alert] {triggerCount} issue(s) found for {businessName}",
87 },
88 "crm": {
89 "enabled": False,
90 "type": "salesforce",
91 "webhookUrl": "",
92 "authHeader": "Bearer YOUR_TOKEN",
93 "objectType": "Task",
94 "customFields": {},
95 },
96 "slack": {
97 "enabled": False,
98 "webhookUrl": "",
99 },
100 "webhook": {
101 "enabled": False,
102 "url": "",
103 "method": "POST",
104 "headers": {},
105 "customData": {},
106 },
107 "includeFullReport": False,
108 },
109 } }
110
111
112run = client.actor("apricot_blackberry/small-business-osint").call(run_input=run_input)
113
114
115print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
116for item in client.dataset(run["defaultDatasetId"]).iterate_items():
117 print(item)
118
119