1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "documents": [
12 {
13 "label": "Project Gutenberg",
14 "url": "https://www.gutenberg.org/policy/robot_access.html"
15 },
16 {
17 "label": "Project Gutenberg terms of use",
18 "url": "https://www.gutenberg.org/policy/terms_of_use.html"
19 }
20 ],
21 "clauseTerms": [
22 "automated means",
23 "automated",
24 "scrape",
25 "scraping",
26 "crawler",
27 "crawl",
28 "spider",
29 "bot",
30 "robot",
31 "robots.txt",
32 "data mining",
33 "text and data mining",
34 "harvest",
35 "AI agent",
36 "artificial intelligence",
37 "machine learning",
38 "LLM",
39 "large language model",
40 "rate limit",
41 "API key",
42 "resale",
43 "resell"
44 ],
45 "contextChars": 600,
46 "reportUnchanged": false,
47 "stateStoreName": "tos-clause-baselines",
48 "timeoutSeconds": 20,
49 "maxResponseBytes": 1000000,
50 "maxRedirects": 3,
51 "concurrency": 4,
52 "userAgent": "TosClauseWatcher/0.1 (+https://apify.com)"
53};
54
55
56const run = await client.actor("kingii98/target-site-terms-automation-clause-change-watcher").call(input);
57
58
59console.log('Results from dataset');
60console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66