1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "workflow": "search_products",
12 "queries": [
13 "handmade silver ring"
14 ],
15 "maxListings": 25,
16 "maxBuyerChargeUsd": 5,
17 "marketCountry": "US",
18 "currency": "USD",
19 "itemType": "all",
20 "handmadeOnly": false,
21 "onSaleOnly": false,
22 "freeShippingOnly": false,
23 "includeAds": true,
24 "sort": "relevance",
25 "detailLevel": "core",
26 "maxDetailListings": 25,
27 "maxShopProfiles": 5,
28 "monitorTargetType": "shop",
29 "firstRunBehavior": "seed_only",
30 "stateNamespace": "default",
31 "maxPagesPerTarget": 5,
32 "maxRequests": 105000,
33 "maxSourceBytes": 512000000,
34 "maxRuntimeSecs": 1800,
35 "detailConcurrency": 2
36};
37
38
39const run = await client.actor("luminar/etsy-product-shop-listing-change-monitor").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49