1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sourceMode": "browseUrls",
12 "startUrls": [
13 {
14 "url": "https://www.mourjan.com/ae/apartments/rental/en/"
15 }
16 ],
17 "listingUrls": [],
18 "keywords": [],
19 "vertical": "all",
20 "countries": [],
21 "cities": [],
22 "propertyType": "",
23 "make": "",
24 "model": "",
25 "jobTitle": "",
26 "employer": "",
27 "employmentType": "",
28 "serviceType": "",
29 "location": "",
30 "blockedResponsePolicy": "failSource",
31 "detailLevel": "listingOnly",
32 "includeDescription": true,
33 "includeImages": true,
34 "includeContacts": false,
35 "maxItems": 50,
36 "maxPagesPerSource": 3,
37 "maxDetailPages": 0,
38 "runMode": "snapshot",
39 "monitorKey": "",
40 "emitUnchanged": false,
41 "inactiveAfterDays": 14,
42 "maxConcurrency": 2,
43 "requestDelayMs": 500
44};
45
46
47const run = await client.actor("getascraper/mourjan-scraper").call(input);
48
49
50console.log('Results from dataset');
51console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57