1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "documents": [{
9 "source_id": "welcome-demo",
10 "html": "<html><head><title>Welcome to LLM Markdown Converter</title><meta name=\"description\" content=\"Fast, deterministic text formatting for AI\"></head><body><header><nav><a href=\"#\">Home</a></nav></header><main><h1>AI Data Cleaning Made Easy</h1><p>This utility strips away bloated HTML tags, scripts, and navigation bars, leaving only pure, structured Markdown optimized for LLM context windows.</p><table><tr><th>Feature</th><th>Benefit</th></tr><tr><td>Boilerplate Removal</td><td>Saves up to 70% token costs</td></tr><tr><td>Deterministic</td><td>Zero hallucinations, 100% reliable</td></tr></table></main><footer>Copyright 2026</footer></body></html>",
11 }] }
12
13
14run = client.actor("n4d.h1dr/html-to-llm-markdown").call(run_input=run_input)
15
16
17print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
18for item in client.dataset(run.default_dataset_id).iterate_items():
19 print(item)
20
21