1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "url": "https://shopee.vn/B%E1%BB%99-%C4%91%E1%BB%93-qu%E1%BA%A7n-%C3%A1o-Labubu-Macaron-V2-th%E1%BA%BF-h%E1%BB%87-th%E1%BB%A9-hai-17cm-(Ch%E1%BB%89-qu%E1%BA%A7n-%C3%A1o)-i.1147787392.27407095750?sp_atk=47de084f-6337-4979-a259-cb7bb500268b&xptdk=47de084f-6337-4979-a259-cb7bb500268b",
12 "total_ratings": 200,
13 "max_retries": 2,
14 "timeout": 5,
15 "proxy": {
16 "useApifyProxy": true,
17 "apifyProxyCountry": "SG",
18 "apifyProxyGroups": [
19 "RESIDENTIAL"
20 ]
21 }
22};
23
24
25const run = await client.actor("ecomscrape/shopee-reviews-scraper").call(input);
26
27
28console.log('Results from dataset');
29console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
30const { items } = await client.dataset(run.defaultDatasetId).listItems();
31items.forEach((item) => {
32 console.dir(item);
33});
34
35