1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "html_content": "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>Sample Document</title></head><body><h1>Sample Document</h1><p>Apify Store QA sample used as input prefill.</p><h2>Chapter 1</h2><p>Short paragraph for PDF and EPUB conversion.</p><h2>Chapter 2</h2><p>Second chapter so EPUB splits on h2.</p></body></html>",
10 "title": "Sample Document",
11 "author": "Apify QA",
12}
13
14
15run = client.actor("interesting_investigator/html-to-pdf-epub-converter").call(run_input=run_input)
16
17
18print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
19for item in client.dataset(run.default_dataset_id).iterate_items():
20 print(item)
21
22