1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": [
12 "phone holder",
13 "led strip lights"
14 ],
15 "dealFeeds": [
16 "desktop"
17 ],
18 "country": "us",
19 "preset": "proven_sellers",
20 "customWeights": {
21 "salesVelocityPerDay": 40,
22 "rating": 25,
23 "reviewCount": 20,
24 "shipsFromSelectedCountry": 15
25 },
26 "maxResults": 100,
27 "minUnitsSold": 100,
28 "minRating": 4,
29 "sorts": [
30 "orders"
31 ],
32 "pagesPerKeyword": 3,
33 "maxReviewLookups": 300,
34 "parallelKeywords": 2
35};
36
37
38const run = await client.actor("apt_marble/aliexpress-product-research").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48