1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "seoIssues": [
12 {
13 "type": "broken_internal_links",
14 "affectedPages": 47
15 },
16 {
17 "type": "missing_meta_description",
18 "affectedPages": 132
19 },
20 {
21 "type": "canonical_error",
22 "affectedPages": 12
23 },
24 {
25 "type": "missing_alt_text",
26 "affectedPages": 300
27 },
28 {
29 "type": "redirect_loops",
30 "affectedPages": 4
31 },
32 {
33 "type": "orphan_page",
34 "affectedPages": 7
35 }
36 ],
37 "analysisMode": "balanced",
38 "groupSimilarIssues": true,
39 "includeRecommendations": true,
40 "siteName": ""
41};
42
43
44const run = await client.actor("riad_h/seo-fix-priority-engine").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54