1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "emails": [
9 {
10 "id": "ooo-de",
11 "from": "Petra Muster <petra@example.de>",
12 "subject": "Abwesenheitsnotiz: Re: Ihre Anfrage",
13 "text": "Vielen Dank für Ihre Nachricht. Ich bin bis zum 12.10. nicht im Büro. In dringenden Fällen wenden Sie sich bitte an info@example.de.",
14 },
15 {
16 "id": "bounce",
17 "raw": """From: Mail Delivery System <MAILER-DAEMON@mx.example.net>
18Subject: Mail delivery failed: returning message to sender
19Content-Type: text/plain
20
21This message was created automatically by mail delivery software.
22
23A message that you sent could not be delivered to one or more of its
24recipients. This is a permanent error. The following address(es) failed:
25
26 info@nobody.example
27 host mx.nobody.example [203.0.113.5]
28 SMTP error from remote mail server after RCPT TO:<info@nobody.example>:
29 550 5.1.1 User unknown
30""",
31 },
32 {
33 "id": "human",
34 "from": "Hans Huber <hans@example.de>",
35 "subject": "Re: Ein Punkt auf example.de",
36 "text": """Guten Tag, danke für den Hinweis. Schicken Sie mir gern ein Angebot.
37
38Am 01.10.2026 um 10:12 schrieb Antonio:
39> Dies ist eine automatische Zusammenfassung ...""",
40 },
41 ] }
42
43
44run = client.actor("infinit_bubulus/email-reply-classifier").call(run_input=run_input)
45
46
47print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
48for item in client.dataset(run.default_dataset_id).iterate_items():
49 print(item)
50
51