1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "maxResults": 100,
12 "jobTitles": [
13 "Chief Executive Officer",
14 "VP of Sales",
15 "Head of Growth"
16 ],
17 "jobFunctions": [
18 "Sales",
19 "Marketing"
20 ],
21 "seniority": [
22 "CXO",
23 "Vice President",
24 "Director"
25 ],
26 "companySizeMin": 10,
27 "companySizeMax": 500,
28 "industries": [
29 "Computer Software",
30 "Information Technology & Services"
31 ],
32 "countries": [
33 "United States"
34 ]
35};
36
37
38const run = await client.actor("scalelist/leads-finder").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48