1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": ["https://example.com"],
10 "raw_payload": "<html><head><script>gtag('event','page_view')</script><style>.nav,.footer{display:block}</style></head><body><nav>Home · Pricing · Login</nav><article><h1>Quarterly update</h1><p>We reduced embedding cost by cleaning HTML before chunking.</p></article><footer>© 2026 · Legal · Careers</footer></body></html>",
11}
12
13
14run = client.actor("larelabs/refinery-html-to-llm-cleaner").call(run_input=run_input)
15
16
17print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
18for item in client.dataset(run["defaultDatasetId"]).iterate_items():
19 print(item)
20
21