1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "documents": [{
10 "id": "guide",
11 "html": "<h1>Guide</h1><p>Authorized example content.</p>",
12 "source_url": "https://example.com/guide",
13 }],
14 "options": {
15 "max_chunk_chars": 1200,
16 "remove_navigation": True,
17 "include_links": True,
18 },
19}
20
21
22run = client.actor("cris_araujo/contextpack-html-to-context").call(run_input=run_input)
23
24
25print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
26for item in client.dataset(run.default_dataset_id).iterate_items():
27 print(item)
28
29