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 "https://apify.com"
13 ],
14 "maxRequestsPerCrawl": 10,
15 "maxDepth": 2,
16 "proxyConfiguration": {
17 "useApifyProxy": false
18 },
19 "seoParams": {
20 "maxTitleLength": 70,
21 "minTitleLength": 10,
22 "maxMetaDescriptionLength": 140,
23 "maxLinksCount": 3000,
24 "maxWordsCount": 350,
25 "outputLinks": false,
26 "workingStatusCodes": [
27 200,
28 301,
29 302,
30 304
31 ]
32 }
33};
34
35
36const run = await client.actor("scrapio/seo-audit-tool").call(input);
37
38
39console.log('Results from dataset');
40console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46