Tutorial: Personalize Sales Outreach with Company Enrichment
Generic outreach gets ignored. This tutorial shows you how to use the B2B Enrichment API to pull company context — description, industry, tech stack, and social links — then turn that data into personalized outreach templates your SDRs can use immediately.
What You'll Build
A function that enriches a prospect company and generates a personalized outreach brief with talking points, tech references, and a social proof angle.
Enrich for Outreach
Request the fields that drive personalization: description, industry, techStack, socialLinks, and founded.
JavaScript
async function buildOutreachBrief(domain) {
const response = await fetch(
"https://b2b-enrichment.p.rapidapi.com/api/enrich",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.RAPIDAPI_KEY,
},
body: JSON.stringify({
company: domain,
fields: [
"name",
"description",
"industry",
"size",
"techStack",
"socialLinks",
"founded",
],
}),
}
);
if (!response.ok) {
const err = await response.json();
return { error: err.error?.message };
}
const { data } = await response.json();
return {
company: data.name,
domain,
oneLiner: data.description,
industry: data.industry,
size: data.size,
founded: data.founded,
techReferences: buildTechAngle(data.techStack),
linkedinUrl: data.socialLinks?.linkedin || null,
twitterUrl: data.socialLinks?.twitter || null,
talkingPoints: buildTalkingPoints(data),
};
}
Python
import os
import requests
def build_outreach_brief(domain: str) -> dict:
response = requests.post(
"https://b2b-enrichment.p.rapidapi.com/api/enrich",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["RAPIDAPI_KEY"],
},
json={
"company": domain,
"fields": [
"name", "description", "industry", "size",
"techStack", "socialLinks", "founded",
],
},
timeout=30,
)
if not response.ok:
return {"error": response.json()["error"]["message"]}
data = response.json()["data"]
social = data.get("socialLinks") or {}
return {
"company": data.get("name"),
"domain": domain,
"one_liner": data.get("description"),
"industry": data.get("industry"),
"size": data.get("size"),
"founded": data.get("founded"),
"tech_references": build_tech_angle(data.get("techStack") or []),
"linkedin_url": social.get("linkedin"),
"twitter_url": social.get("twitter"),
"talking_points": build_talking_points(data),
}
Generate Talking Points
Use enrichment data to create specific, relevant talking points — not generic filler.
function buildTechAngle(techStack) {
if (!techStack || techStack.length === 0) return null;
const known = techStack.slice(0, 3).join(", ");
return `Their stack includes ${known} — mention relevant integrations or case studies.`;
}
function buildTalkingPoints(data) {
const points = [];
if (data.description) {
points.push(`What they do: ${data.description}`);
}
if (data.size) {
points.push(`Company size: ${data.size} employees — tailor pricing tier accordingly.`);
}
if (data.founded) {
const age = new Date().getFullYear() - parseInt(data.founded);
if (age <= 3) {
points.push(`Early-stage (founded ${data.founded}) — lead with speed-to-value and startup pricing.`);
} else if (age >= 10) {
points.push(`Established company (founded ${data.founded}) — lead with reliability and enterprise features.`);
}
}
if (data.techStack?.length > 0) {
points.push(buildTechAngle(data.techStack));
}
if (data.socialLinks?.linkedin) {
points.push(`LinkedIn: ${data.socialLinks.linkedin} — check recent posts for conversation starters.`);
}
return points;
}
Template: Personalized Cold Email
Here's how to plug enrichment data into a cold email template:
Subject: [TECH_REFERENCE] for {{company}}
Hi {{first_name}},
I noticed {{company}} is building in the {{industry}} space
{{#if founded_recently}} — impressive growth since {{founded}}{{/if}}.
{{#if tech_stack}}Your team uses {{tech_top_3}}, and we've helped
similar teams cut {{relevant_metric}} by {{percentage}}.{{/if}}
Would a 15-minute walkthrough be worth your time this week?
{{sender_name}}
The enrichment brief gives your SDR everything they need to fill this template without manual research.
Process a Prospect List
const prospects = ["linear.app", "vercel.com", "raycast.com"];
const briefs = [];
for (const domain of prospects) {
const brief = await buildOutreachBrief(domain);
if (!brief.error) {
briefs.push(brief);
console.log(`${brief.company}: ${brief.talkingPoints.length} talking points`);
}
await new Promise((r) => setTimeout(r, 6000)); // rate limit
}
// Export to CSV or push to your sales tool
Tips
- Enrich before the SDR touches the lead. Run enrichment as a background job when a lead enters your pipeline. By the time the SDR opens the record, context is already there.
- Use
socialLinks.linkedinfor research. The company LinkedIn page is the single best source for recent news, headcount changes, and content topics. Link it directly in the CRM. - Tech stack drives relevance. If a prospect uses the same tools as your best customers, mention it. Shared technology creates instant credibility.
- Don't over-automate the message. Use enrichment data for research and talking points, not to generate entire emails. Prospects can spot fully automated outreach immediately.
- Batch weekly, not daily. Company data doesn't change fast. Enrich your prospect list once a week and cache the results to stay well within rate limits.