1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sources": [
12 {
13 "type": "hackernews",
14 "query": "who is hiring",
15 "postTypes": [
16 "hiring"
17 ]
18 }
19 ],
20 "icpConfig": {
21 "sectors": [
22 "saas",
23 "fintech",
24 "devtools"
25 ],
26 "companySizeRange": {
27 "min": 10,
28 "max": 500
29 },
30 "targetRoles": [
31 "CTO",
32 "VP Engineering",
33 "Head of Product",
34 "Engineering Manager"
35 ],
36 "keywords": [
37 "api",
38 "cloud",
39 "kubernetes",
40 "microservices"
41 ],
42 "locations": [
43 "United States",
44 "Brazil",
45 "Europe"
46 ],
47 "techStack": [
48 "React",
49 "Node.js",
50 "Postgres",
51 "AWS"
52 ],
53 "excludedSectors": [
54 "gaming",
55 "consumer"
56 ]
57 },
58 "triggerTypes": [
59 "funding",
60 "hiring",
61 "content"
62 ],
63 "maxLeads": 200,
64 "enrichmentLevel": "standard",
65 "groqModel": "llama-3.3-70b-versatile",
66 "openaiModel": "gpt-4o-mini",
67 "proxyConfig": {
68 "useApifyProxy": true
69 },
70 "icpDocuments": [
71 "Our product helps B2B SaaS companies automate outbound sales. Our best customers are VP of Sales and Head of Growth at Series A–C companies with 20–200 employees, typically in the US or Europe. They use tools like Salesforce, HubSpot, Outreach, and Apollo. Key pain point: their SDRs spend 60% of time on manual research instead of conversations.",
72 "Companies that are a poor fit: consumer apps, gaming, agencies, non-profits, or companies with fewer than 10 employees. Also avoid companies where the primary buyer is a CEO at very early stage — they rarely have budget."
73 ],
74 "ragTopK": 3,
75 "ragEvalEnabled": true
76};
77
78
79const run = await client.actor("antoniovfranco/leadgraph").call(input);
80
81
82console.log('Results from dataset');
83console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
84const { items } = await client.dataset(run.defaultDatasetId).listItems();
85items.forEach((item) => {
86 console.dir(item);
87});
88
89