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://shopeekh.com/collections/12453606",
13 "https://shopeekh.com/collections/12453606?page=1",
14 "https://shopeekh.com/m/Shopee-Beauty",
15 "https://shopeekh.com/api/v4/microsite/get_products_for_collection_landing_page?by=relevancy&card_set_name=Microsite%20ATC%20Card&collection_id=12453606&item_order=0&limit=60&match_id=12453606&need_customised_item_card=true&newest=0&offset=0&order=desc",
16 "https://shopeekh.com/api/v4/pagebuilder/get_csr_page?page_url=Shopee-Beauty&platform=4×tamp=0"
17 ],
18 "sortBy": "relevance",
19 "proxy": {
20 "useApifyProxy": true
21 },
22 "ignoreFieldsForChanges": []
23};
24
25
26const run = await client.actor("abotapi/shopee-collection-products").call(input);
27
28
29console.log('Results from dataset');
30console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
31const { items } = await client.dataset(run.defaultDatasetId).listItems();
32items.forEach((item) => {
33 console.dir(item);
34});
35
36