1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://apify.com"
14 }
15 ],
16 "wccInput": {
17 "aggressivePrune": false,
18 "clickElementsCssSelector": "[aria-expanded=\"false\"]",
19 "clientSideMinChangePercentage": 15,
20 "crawlerType": "playwright:adaptive",
21 "debugLog": false,
22 "debugMode": false,
23 "expandIframes": true,
24 "ignoreCanonicalUrl": false,
25 "keepUrlFragments": false,
26 "proxyConfiguration": {
27 "useApifyProxy": true
28 },
29 "readableTextCharThreshold": 100,
30 "removeCookieWarnings": true,
31 "removeElementsCssSelector": "nav, footer, script, style, noscript, svg,\n[role=\"alert\"],\n[role=\"banner\"],\n[role=\"dialog\"],\n[role=\"alertdialog\"],\n[role=\"region\"][aria-label*=\"skip\" i],\n[aria-modal=\"true\"]",
32 "renderingTypeDetectionPercentage": 10,
33 "saveFiles": false,
34 "saveHtml": false,
35 "saveHtmlAsFile": false,
36 "saveMarkdown": true,
37 "saveScreenshots": false,
38 "useSitemaps": false
39 }
40};
41
42
43const run = await client.actor("tri_angle/sitemap-change-orchestrator").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