1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "listings": [
12 {
13 "id": "EXAMPLE-INK",
14 "title": "Example printer ink cartridge 2-pack",
15 "price": 34.99,
16 "description": "1-year limited warranty. Using third-party ink will void your warranty. See warranty details."
17 },
18 {
19 "id": "EXAMPLE-MOWER",
20 "title": "Example cordless lawn mower",
21 "price": 299,
22 "description": "3-year limited warranty. All implied warranties are disclaimed. Full warranty terms at example.com/warranty"
23 },
24 {
25 "id": "EXAMPLE-SKILLET",
26 "title": "Example cast iron skillet",
27 "price": 39.95,
28 "description": "Lifetime warranty! 100% satisfaction guaranteed."
29 },
30 {
31 "id": "EXAMPLE-DRILL",
32 "title": "Example cordless drill",
33 "price": 129,
34 "description": "3-year limited warranty. Implied warranties are limited to the duration of this written warranty. See warranty terms."
35 }
36 ]
37};
38
39
40const run = await client.actor("ultimatemc/warranty-claim-checker").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50