1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "no_website",
12 "cities": [
13 "Houston, TX"
14 ],
15 "categories": [
16 "plumber",
17 "pressure washing"
18 ],
19 "maxLeads": 3,
20 "maxResultsPerCity": 6,
21 "minRating": 0,
22 "minReviews": 0,
23 "maxReviews": 10000,
24 "requirePhone": true,
25 "countryCode": "us",
26 "language": "en",
27 "badWebsiteTimeoutMs": 2500,
28 "maxBadWebsiteProbes": 6
29};
30
31
32const run = await client.actor("natural_lease/no-website-qualified-leads").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42