1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "leads": [
10 {
11 "firstName": "Sarah",
12 "lastName": "Chen",
13 "title": "VP of Engineering",
14 "company": "Acme Corp",
15 "industry": "Software / SaaS",
16 "employeeCount": 250,
17 "companyDescription": "B2B project management platform serving mid-market companies",
18 "techStack": [
19 "React",
20 "Node.js",
21 "PostgreSQL",
22 "AWS",
23 ],
24 "recentSignals": [
25 "Recently adopted React for frontend migration",
26 "Raised Series B in Jan 2026",
27 ],
28 "email": "sarah.chen@acmecorp.com",
29 },
30 {
31 "firstName": "Marcus",
32 "lastName": "Rivera",
33 "title": "Head of Sales",
34 "company": "GrowthFlow Inc",
35 "industry": "Sales Enablement",
36 "employeeCount": 80,
37 "companyDescription": "Revenue intelligence platform for outbound sales teams",
38 "recentSignals": [
39 "Hired 5 SDRs in Q1 2026",
40 "Job posting for Sales Operations Manager",
41 ],
42 "email": "m.rivera@growthflow.io",
43 },
44 {
45 "firstName": "Priya",
46 "lastName": "Kapoor",
47 "title": "CTO",
48 "company": "DataBridge Analytics",
49 "industry": "Data & Analytics",
50 "employeeCount": 45,
51 "companyDescription": "Real-time data pipeline and analytics for e-commerce brands",
52 "techStack": [
53 "Python",
54 "Kafka",
55 "Spark",
56 "Snowflake",
57 ],
58 "fundingStage": "Seed",
59 "email": "priya@databridgeanalytics.com",
60 },
61 ],
62 "model": "gpt-4o-mini",
63 "template": "You are a world-class B2B sales copywriter. Write personalized cold email copy that is concise, lead-focused, and drives replies. Reference the prospect's specific context. Never use generic phrases like 'I hope this email finds you well'.",
64}
65
66
67run = client.actor("ryanclinton/ai-outreach-personalizer").call(run_input=run_input)
68
69
70print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
71for item in client.dataset(run["defaultDatasetId"]).iterate_items():
72 print(item)
73
74