1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "snapshotId": "support-week-2026-10-02",
10 "asOf": "2026-10-02T12:00:00Z",
11 "responseObservation": {
12 "from": "2026-09-28T00:00:00Z",
13 "through": "2026-10-02T12:00:00Z",
14 "coverage": "complete",
15 },
16 "schedules": [{
17 "scheduleId": "weekday-9-18",
18 "coverageStart": "2026-09-28T00:00:00Z",
19 "coverageEnd": "2026-10-06T00:00:00Z",
20 "coverage": "complete",
21 }],
22 "tickets": [
23 {
24 "sourceId": "helpdesk-export",
25 "ticketId": "0001",
26 "createdAt": "2026-10-01T17:30:00Z",
27 "firstReplyAt": "2026-10-02T09:30:00Z",
28 "scheduleId": "weekday-9-18",
29 "targetMinutes": 60,
30 },
31 {
32 "sourceId": "helpdesk-export",
33 "ticketId": "0002",
34 "createdAt": "2026-10-02T09:00:00Z",
35 "firstReplyAt": "2026-10-02T10:15:00Z",
36 "scheduleId": "weekday-9-18",
37 "targetMinutes": 60,
38 },
39 {
40 "sourceId": "helpdesk-export",
41 "ticketId": "0003",
42 "createdAt": "2026-10-02T11:30:00Z",
43 "firstReplyAt": None,
44 "scheduleId": "weekday-9-18",
45 "targetMinutes": 60,
46 },
47 {
48 "sourceId": "helpdesk-export",
49 "ticketId": "0004",
50 "createdAt": "2026-10-02T11:00:00Z",
51 "firstReplyAt": None,
52 "scheduleId": "weekday-9-18",
53 "targetMinutes": 60,
54 },
55 {
56 "sourceId": "helpdesk-export",
57 "ticketId": "0005",
58 "createdAt": "2026-10-02T09:00:00Z",
59 "firstReplyAt": None,
60 "scheduleId": "weekday-9-18",
61 "targetMinutes": 60,
62 },
63 ],
64 "workIntervals": [
65 {
66 "scheduleId": "weekday-9-18",
67 "intervalId": "2026-09-28",
68 "start": "2026-09-28T09:00:00Z",
69 "end": "2026-09-28T18:00:00Z",
70 },
71 {
72 "scheduleId": "weekday-9-18",
73 "intervalId": "2026-09-29",
74 "start": "2026-09-29T09:00:00Z",
75 "end": "2026-09-29T18:00:00Z",
76 },
77 {
78 "scheduleId": "weekday-9-18",
79 "intervalId": "2026-09-30",
80 "start": "2026-09-30T09:00:00Z",
81 "end": "2026-09-30T18:00:00Z",
82 },
83 {
84 "scheduleId": "weekday-9-18",
85 "intervalId": "2026-10-01",
86 "start": "2026-10-01T09:00:00Z",
87 "end": "2026-10-01T18:00:00Z",
88 },
89 {
90 "scheduleId": "weekday-9-18",
91 "intervalId": "2026-10-02",
92 "start": "2026-10-02T09:00:00Z",
93 "end": "2026-10-02T18:00:00Z",
94 },
95 {
96 "scheduleId": "weekday-9-18",
97 "intervalId": "2026-10-05",
98 "start": "2026-10-05T09:00:00Z",
99 "end": "2026-10-05T18:00:00Z",
100 },
101 ],
102 "ticketsCsv": "",
103 "workIntervalsCsv": "",
104 "ticketColumns": {
105 "sourceId": "sourceId",
106 "ticketId": "ticketId",
107 "createdAt": "createdAt",
108 "firstReplyAt": "firstReplyAt",
109 "scheduleId": "scheduleId",
110 "targetMinutes": "targetMinutes",
111 },
112 "intervalColumns": {
113 "scheduleId": "scheduleId",
114 "intervalId": "intervalId",
115 "start": "start",
116 "end": "end",
117 },
118 "csvDelimiter": ",",
119}
120
121
122run = client.actor("h_murdock/support-business-hours-evidence").call(run_input=run_input)
123
124
125print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
126for item in client.dataset(run.default_dataset_id).iterate_items():
127 print(item)
128
129