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://example.com/"
15 ],
16 "maxPages": 1000
17 },
18 "ownership_attestation": true,
19 "chunking": {
20 "strategy": "semantic",
21 "maxTokens": 512,
22 "overlapTokens": 64
23 },
24 "extractSchema": {
25 "fields": [
26 {
27 "name": "product_name",
28 "type": "string",
29 "instruction": "The product name stated on the page; null if absent."
30 }
31 ]
32 },
33 "aeo": {
34 "assets": [
35 "faq_pair",
36 "answer_block",
37 "llms_txt"
38 ]
39 }
40};
41
42
43const run = await client.actor("awesome_highboy/aeo-rag-ready-content-structurer").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53