1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchQueries": [
13 "phone case"
14 ],
15 "productIds": [
16 "1005010155028387"
17 ],
18 "storeIds": [
19 "1101493050"
20 ],
21 "urls": [
22 "https://www.aliexpress.com/item/1005010155028387.html"
23 ],
24 "region": "US",
25 "currency": "USD",
26 "language": "en_US",
27 "sortBy": "default",
28 "priceMin": 0,
29 "priceMax": 0,
30 "ratingMin": 0,
31 "shipFrom": "",
32 "freeShippingOnly": false,
33 "choiceOnly": false,
34 "fourStarPlus": false,
35 "includeSponsored": true,
36 "includeWelcomeGifts": false,
37 "maxItems": 3,
38 "maxPages": 1,
39 "includeReviews": false,
40 "maxReviewsPerProduct": 20,
41 "reviewFilter": "all",
42 "includeProductStats": true
43};
44
45
46const run = await client.actor("vexaloom-labs/aliexpress-multi-region-search-store-and-review").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56