1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "input": [
12 {
13 "productId": 5364974201,
14 "domainCode": "com",
15 "startPage": 1,
16 "endPage": 3,
17 "sort": "relevancy",
18 "vp": false,
19 "ratings": "4,5",
20 "aspect": 6051
21 },
22 {
23 "productId": 1234567890,
24 "domainCode": "ca",
25 "startPage": 3,
26 "sort": "helpful",
27 "vp": true
28 }
29 ]
30};
31
32
33const run = await client.actor("axesso_data/walmart-reviews-scraper").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43