1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "source": {
12 "mode": "url_list",
13 "urls": [
14 "https://docs.example.com/guide"
15 ],
16 "maxPages": 1000
17 },
18 "chunking": {
19 "strategy": "semantic",
20 "maxTokens": 512,
21 "overlapTokens": 64
22 },
23 "extractSchema": {
24 "fields": [
25 {
26 "name": "product_name",
27 "type": "string",
28 "instruction": "The product name stated on the page; null if absent."
29 }
30 ]
31 },
32 "aeo": {
33 "assets": [
34 "faq_pair",
35 "answer_block",
36 "llms_txt"
37 ]
38 }
39};
40
41
42const run = await client.actor("awesome_highboy/aeo-rag-ready-content-structurer").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52