1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://www.allbirds.com/products/mens-cruiser-medium-grey",
13 "https://www.allbirds.com/products/womens-tree-runner-nz-medium-grey",
14 "https://www.brooklinen.com/products/luxe-core-sheet-set",
15 "https://www.brooklinen.com/products/classic-core-sheet-set",
16 "https://www.apple.com/shop/buy-iphone/iphone-17",
17 "https://www.staples.com/hammermill-copy-plus-8-5-x-11-copy-paper-20-lbs-92-brightness-5000-sheets-carton-105007/product_122374",
18 "https://www.gymshark.com/products/gymshark-crest-hoodie-black-ss22",
19 "https://barefootbuttons.com/product/max-bore-standard-silver-footswitch-topper/",
20 "https://colourpop.com/products/mocha-moment-cloud-whip-lip-liner-fresh-kiss-glossy-balm"
21 ],
22 "mode": "snapshot",
23 "watch": [
24 "price",
25 "availability"
26 ],
27 "minChangePct": 0,
28 "historyDays": 30,
29 "stateKey": "",
30 "includeVariants": false,
31 "allowTextFallback": true,
32 "currencyHint": "",
33 "requestTimeoutSecs": 30,
34 "maxConcurrency": 8,
35 "maxRunSecs": 240,
36 "proxyConfiguration": {
37 "useApifyProxy": true
38 }
39};
40
41
42const run = await client.actor("insight.solutions/price-tracker-api").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52