1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "htmlPages": [{
10 "url": "https://example.com/article",
11 "html": "<html><head><title>Planning a dental appointment</title><meta name=\"author\" content=\"Demo Editor\"></head><body><nav>Home | Services | Contact</nav><article><h1>Planning a dental appointment</h1><p>The clinic team explains how routine appointments are organized. Patients can request a convenient time and receive clear preparation instructions. The reception team answers practical questions before each visit. </p><h2>Before your visit</h2><p>The practice team explains how routine appointments are organized. Patients can request a convenient time and receive clear preparation instructions. The reception team answers practical questions before each visit. </p></article><footer>Site navigation</footer></body></html>",
12 }],
13 "maxPages": 3,
14 "minCharacters": 200,
15}
16
17
18run = client.actor("variable_mitts/article-text-markdown-extractor").call(run_input=run_input)
19
20
21print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
22for item in client.dataset(run.default_dataset_id).iterate_items():
23 print(item)
24
25