1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "conversion_type": "html_to_markdown",
10 "source_code": """<h1>Hello World</h1>
11<p>This is a <strong>demo paragraph</strong> with <em>italic text</em> and a <a href=\"https://example.com\">link</a>.</p>
12<h2>Features</h2>
13<ul>
14 <li>Fast conversion</li>
15 <li>Supports <code>inline code</code></li>
16 <li>Tables and lists</li>
17</ul>
18<blockquote>This is a blockquote.</blockquote>
19<pre><code>console.log('Hello!');</code></pre>""",
20 "root_class_name": "Root",
21 "orm_target": "both",
22 "batch_conversions": [],
23 "proxy_configuration": {},
24}
25
26
27run = client.actor("moving_beacon-owner1/my-actor-64").call(run_input=run_input)
28
29
30print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
31for item in client.dataset(run["defaultDatasetId"]).iterate_items():
32 print(item)
33
34