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 "queries": [
13 "kahve"
14 ],
15 "urls": [
16 "https://www.a101.com.tr/arama?k=kahve",
17 "https://www.a101.com.tr/arama?k=kahve&page=2",
18 "https://www.a101.com.tr/arama?q=kahve",
19 "https://www.a101.com.tr/kapida/arama?k=su",
20 "https://www.a101.com.tr/kapida",
21 "https://www.a101.com.tr/ekstra/aldin-aldin",
22 "https://www.a101.com.tr/ekstra/aldin-aldin?page=2",
23 "https://www.a101.com.tr/liste/aldin-aldin-elektronik",
24 "https://www.a101.com.tr/liste/premium-markalar",
25 "https://www.a101.com.tr/anne-bebek-oyuncak/bebek-bezi",
26 "https://www.a101.com.tr/elektronik",
27 "https://www.a101.com.tr/markalar/philips",
28 "https://www.a101.com.tr/elektronik/braun-kf570-filtre-kahve-makinesi_p-26056989",
29 "https://www.a101.com.tr/elektronik/braun-kf570-filtre-kahve-makinesi_p-26056989?utm_source=x",
30 "https://a101.com.tr/arama?k=kahve"
31 ],
32 "proxy": {
33 "useApifyProxy": true
34 },
35 "incrementalMode": false,
36 "emitUnchanged": false,
37 "emitExpired": false,
38 "ignoreFieldsForChanges": []
39};
40
41
42const run = await client.actor("abotapi/a101-product-scraper").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52