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 "searchTerms": [
13 "t-shirt"
14 ],
15 "categories": [],
16 "brands": [],
17 "urls": [
18 "https://www.theiconic.com.au/catalog/?q=t-shirt",
19 "https://www.theiconic.com.au/womens-clothing-dresses/",
20 "https://www.theiconic.com.au/womens-clothing-dresses/?page=2&sort=new",
21 "https://www.theiconic.com.au/womens-clothing-dresses/?special_price=1&sort=popularity",
22 "https://www.theiconic.com.au/catalog/?q=t-shirt&price=10-50&gender=female&size=M",
23 "https://www.theiconic.com.au/aere",
24 "https://www.theiconic.com.au/aere/?page=1&sort=popularity&special_price=1",
25 "https://www.theiconic.com.au/leigh-boxy-tshirt-2498829.html",
26 "https://www.theiconic.com.au/leigh-boxy-tshirt-2498829.html?utm_source=x&utm_medium=y",
27 "https://www.theiconic.com.au/sale/",
28 "https://www.theiconic.com.au/new-arrivals/",
29 "https://www.theiconic.co.nz/leigh-boxy-tshirt-2498829.html",
30 "https://sitemap.theiconic.com.au/sitemap_index_product.xml"
31 ],
32 "fetchReviews": true,
33 "maxReviews": 20,
34 "maxItems": 20,
35 "proxy": {
36 "useApifyProxy": true,
37 "apifyProxyGroups": [
38 "RESIDENTIAL"
39 ]
40 },
41 "incrementalMode": false,
42 "emitUnchanged": false,
43 "emitExpired": false,
44 "changeScope": "all",
45 "compactUpdates": false,
46 "expireAfterMissedScans": 1,
47 "ignoreFieldsForChanges": []
48};
49
50
51const run = await client.actor("abotapi/theiconic-com-au-scraper").call(input);
52
53
54console.log('Results from dataset');
55console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
56const { items } = await client.dataset(run.defaultDatasetId).listItems();
57items.forEach((item) => {
58 console.dir(item);
59});
60
61