1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": [
12 "property manager",
13 "apartments for rent"
14 ],
15 "location": "",
16 "customDomains": [
17 "@gmail.com",
18 "@yahoo.com"
19 ],
20 "countries": [
21 "United States",
22 "United Kingdom",
23 "India"
24 ],
25 "countryCode": "",
26 "queryModifiers": [
27 "email",
28 "contact",
29 "leasing office",
30 "inquiries",
31 "property manager"
32 ]
33};
34
35
36const run = await client.actor("neuro-scraper/rent-com-email-and-phone-number-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46