1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://example.com"
13 ],
14 "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>"
15};
16
17
18const run = await client.actor("larelabs/refinery-html-to-llm-cleaner").call(input);
19
20
21console.log('Results from dataset');
22console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
23const { items } = await client.dataset(run.defaultDatasetId).listItems();
24items.forEach((item) => {
25 console.dir(item);
26});
27
28