1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9    "limit": 1000,
10    "checkersInput": {
11        "RESOURCE_STATS_CHECKER": {},
12        "DEDUPLICATION_CHECKER": { "uniqueKey": "email" },
13        "SCHEMA_VALIDATOR_CHECKER": { "options": [{
14                    "resourceList": [
15                        "id",
16                        "id",
17                    ],
18                    "resourceRegex": "",
19                    "minItemCount": 100,
20                    "maxItemCount": 5000,
21                    "validationSchema": "{ address: String, open: Boolean }",
22                }] },
23    },
24    "reportersInput": {
25        "EMAIL_REPORTER": { "sendMailInput": {
26                "to": "info@apify.com",
27                "subject": "My monitoring task report",
28            } },
29        "SLACK_REPORTER": { "slackInput": {
30                "token": "Your token",
31                "message": "Hey, look what I have done!",
32                "channel": "#monitoring",
33            } },
34        "DASHBOARD_REPORTER": { "notifyOnUpdate": True },
35    },
36}
37
38
39run = client.actor("apify/monitoring-runner").call(run_input=run_input)
40
41
42print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
43for item in client.dataset(run["defaultDatasetId"]).iterate_items():
44    print(item)
45
46