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 "searchQuery": "ايفون",
13 "category": "",
14 "city": "",
15 "subTag": "",
16 "carBodyType": "",
17 "cities": [],
18 "neighborhood": "",
19 "excludeCategory": "",
20 "postIds": [],
21 "includeSimilarListings": false,
22 "includeSeller": false,
23 "includeLikeCounts": false,
24 "includeComments": false,
25 "maxCommentsPerListing": 10,
26 "trendingRangeDays": 1,
27 "onlyWithImage": false,
28 "onlyWithVideo": false,
29 "hideShowRooms": false,
30 "postedWithin": "",
31 "onlyWithPrice": false,
32 "carCondition": "",
33 "fuelType": "",
34 "transmission": "",
35 "sellOrWaiver": "",
36 "is4WD": false,
37 "splitByCity": false,
38 "sortBy": "recentlyActive",
39 "maxItems": 30
40};
41
42
43const run = await client.actor("vexaloom-labs/haraj-classifieds-search-and-seller-listings").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53