-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.js
More file actions
25 lines (22 loc) · 687 Bytes
/
Copy pathrun.js
File metadata and controls
25 lines (22 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* olx-listings — JavaScript example.
*
* npm install apify-client
* export APIFY_TOKEN=... # https://console.apify.com/account/integrations
* node run.js
*
* Docs: https://apify.com/bovi/olx-listings
*/
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const input = {
"searchQuery": "nike",
"domain": "olx.pl",
"maxItems": 100,
"minPrice": 0,
"maxPrice": 0,
"proxyConfiguration": {}
};
const run = await client.actor('bovi/olx-listings').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item);