1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "idealCustomerProfile": {
12 "industries": [
13 "SaaS",
14 "B2B"
15 ],
16 "sizeMin": 11,
17 "sizeMax": 200,
18 "preferredTech": [
19 "HubSpot",
20 "Stripe"
21 ],
22 "keywords": [
23 "sales",
24 "marketing",
25 "automation"
26 ]
27 },
28 "sourcing": {
29 "sources": [
30 "yc",
31 "hn-hiring",
32 "techcrunch",
33 "prnewswire",
34 "cb-news"
35 ],
36 "maxResults": 20,
37 "recencyDays": 30,
38 "triggerEventTypes": [
39 "funding",
40 "hiring",
41 "leadership",
42 "launch"
43 ]
44 },
45 "proxyConfiguration": {
46 "useApifyProxy": true
47 }
48};
49
50
51const run = await client.actor("ghewaretech/b2b-lead-intelligence").call(input);
52
53
54console.log('Results from dataset');
55console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
56const { items } = await client.dataset(run.defaultDatasetId).listItems();
57items.forEach((item) => {
58 console.dir(item);
59});
60
61