1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "item_id": "3D0941295",
14 "maker": "VAG",
15 "description": "Headlight range control",
16 "origin_price": 2600
17 },
18 {
19 "item_id": "850901CA0A",
20 "maker": "Nissan",
21 "description": "Rear bumper absorber",
22 "origin_price": 1300
23 },
24 {
25 "item_id": "620939134R",
26 "maker": "Renault",
27 "description": "Rear bumper absorber",
28 "origin_price": 950
29 },
30 {
31 "item_id": "55593189",
32 "maker": "Opel",
33 "description": "Oil filter",
34 "origin_price": 590
35 },
36 {
37 "item_id": "03D906051",
38 "maker": "VAG",
39 "description": "Ignition coil",
40 "origin_price": 260
41 },
42 {
43 "item_id": "263203C100",
44 "maker": "Hyundai",
45 "description": "Oil filter",
46 "origin_price": 170
47 },
48 {
49 "item_id": "A2711800009",
50 "maker": "Mercedes",
51 "description": "Oil filter",
52 "origin_price": 560
53 },
54 {
55 "item_id": "11427566327",
56 "maker": "BMW",
57 "description": "Oil filter",
58 "origin_price": 490
59 },
60 {
61 "item_id": "04152YZZA1",
62 "maker": "Toyota",
63 "description": "Oil filter",
64 "origin_price": 140
65 },
66 {
67 "item_id": "8200768913",
68 "maker": "Renault",
69 "description": "Oil filter",
70 "origin_price": 210
71 }
72 ],
73 "proxyConfiguration": {
74 "useApifyProxy": true,
75 "apifyProxyGroups": [
76 "RESIDENTIAL"
77 ]
78 }
79};
80
81
82const run = await client.actor("climond/avtopro-ua-competitor-price-checker").call(input);
83
84
85console.log('Results from dataset');
86console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
87const { items } = await client.dataset(run.defaultDatasetId).listItems();
88items.forEach((item) => {
89 console.dir(item);
90});
91
92