1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "leads": [
12 {
13 "domain": "stripe.com",
14 "companyName": "Stripe"
15 },
16 {
17 "domain": "notion.so",
18 "companyName": "Notion"
19 }
20 ],
21 "icpCriteria": {
22 "target_industries": [
23 "SaaS",
24 "FinTech",
25 "E-commerce",
26 "MarTech"
27 ],
28 "employee_range": "50-5000",
29 "revenue_range": "$5M-$500M",
30 "target_titles": [
31 "VP Sales",
32 "Head of Revenue",
33 "CRO",
34 "CEO"
35 ],
36 "pain_points": [
37 "scaling sales team",
38 "lead quality",
39 "CRM hygiene",
40 "pipeline visibility"
41 ],
42 "tech_stack_must_have": [],
43 "tech_stack_nice_to_have": [
44 "Salesforce",
45 "HubSpot",
46 "Outreach"
47 ]
48 },
49 "modelName": "openai/gpt-4o-mini"
50};
51
52
53const run = await client.actor("joseph99/my-actor").call(input);
54
55
56console.log('Results from dataset');
57console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
58const { items } = await client.dataset(run.defaultDatasetId).listItems();
59items.forEach((item) => {
60 console.dir(item);
61});
62
63