1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 "https://www.etsy.com/listing/743657804/sheepskin-slippers-wool-slippers-fur?ga_order=most_relevant&ga_search_type=all&ga_view_type=gallery&ga_search_query=&ref=sc_gallery-5-1&plkey=89e47f49c28602795b44fc71559e2839056339d8%3A743657804&frs=1",
13 "https://www.etsy.com/c/clothing-and-shoes?ref=catnav-10923",
14 "https://www.etsy.com/search?q=apple%20watch",
15 "https://www.etsy.com/shop/PetiteFraise?ref=simple-shop-header-name&listing_id=490831663&page=2#items"
16 ],
17 "maxItems": 10,
18 "endPage": 1,
19 "extendOutputFunction": ($) => {
20 const result = {};
21
22
23
24 return result;
25 },
26 "customMapFunction": (object) => { return {...object} },
27 "proxy": {
28 "useApifyProxy": true,
29 "apifyProxyGroups": [
30 "RESIDENTIAL"
31 ]
32 }
33};
34
35
36const run = await client.actor("epctex/etsy-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46