1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "expectedUrls": [
12 "https://docs.apify.com/account/settings",
13 "https://docs.apify.com/storage/dataset",
14 "https://docs.apify.com/actors/publishing/publish"
15 ],
16 "crawlRows": [
17 {
18 "url": "https://docs.apify.com/account/settings",
19 "text": "Your Apify account settings allow you to configure your profile, manage API tokens, and set your preferences."
20 },
21 {
22 "url": "https://docs.apify.com/storage/dataset",
23 "text": "Actors can define a dataset schema that describes the structure of each dataset item and controls how data appears in the Output tab."
24 }
25 ],
26 "minContentChars": 40
27};
28
29
30const run = await client.actor("opaline_opah/crawl-coverage-audit").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40