1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "vendors": [
12 {
13 "id": "stripe",
14 "name": "Stripe",
15 "criticality": "high",
16 "owner": "Procurement",
17 "tags": [
18 "payments",
19 "renewal-q3",
20 "strategic vendor"
21 ],
22 "urlPacks": {
23 "pricing": [
24 {
25 "id": "stripe-pricing",
26 "name": "Stripe Pricing",
27 "url": "https://stripe.com/pricing",
28 "includePatterns": [
29 "pricing",
30 "annual",
31 "enterprise",
32 "billing"
33 ],
34 "excludePatterns": [
35 "cookie",
36 "sign in"
37 ]
38 }
39 ],
40 "terms": [
41 {
42 "id": "stripe-terms",
43 "name": "Stripe Services Agreement",
44 "url": "https://stripe.com/legal/ssa",
45 "includePatterns": [
46 "fees",
47 "renewal",
48 "termination",
49 "liability"
50 ],
51 "excludePatterns": [
52 "cookie",
53 "sign in"
54 ]
55 }
56 ]
57 }
58 }
59 ]
60};
61
62
63const run = await client.actor("taroyamada/vendor-change-monitor").call(input);
64
65
66console.log('Results from dataset');
67console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73