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 "searchTerm": "ecksofa",
13 "urls": [
14 "https://www.otto.de/suche/ecksofa/",
15 "https://www.otto.de/moebel/sofas/ecksofas/",
16 "https://www.otto.de/moebel/sofas/",
17 "https://www.otto.de/suche/ecksofa/?sortiertnach=preis-aufsteigend",
18 "https://www.otto.de/moebel/sofas/ecksofas/?sortiertnach=preis-aufsteigend",
19 "https://www.otto.de/moebel/sofas/ecksofas/?marke=sit-more&preis=100-500",
20 "https://www.otto.de/dundee/tilelist?rule=%28und.%28suchbegriff.ecksofa%29.%28~.%28v.1%29%29%29&sortiertnach=topseller&o=120",
21 "https://www.otto.de/dundee/tilelist?rule=%28und.%28suchbegriff.ecksofa%29.%28~.%28v.1%29%29%29&sortiertnach=topseller",
22 "https://otto.de/suche/ecksofa",
23 "https://www.otto.de/technik/fernseher/",
24 "https://www.otto.de/suche/laptop/?suchbegriff=laptop",
25 "https://www.otto.de/moebel/"
26 ],
27 "brands": [],
28 "proxy": {
29 "useApifyProxy": true
30 },
31 "incrementalMode": false,
32 "emitUnchanged": false,
33 "emitExpired": false,
34 "ignoreFieldsForChanges": []
35};
36
37
38const run = await client.actor("abotapi/otto-de-scraper").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48