Generic outreach gets ignored. The SDRs who book meetings in 2026 send personalized notes that reference the prospect's recent LinkedIn post, their company's latest news, or a Reddit thread in their space. This tutorial walks through building an SDR research agent that pulls all three signals automatically for every prospect.
Prerequisites
- Python 3.8+
- A Scavio API key
- An Apollo or HubSpot prospect list
- OpenAI or Claude API for personalization draft
Walkthrough
Step 1: Load the prospect
Start with a prospect name and company.
prospect = {'name': 'Jane Doe', 'company': 'Acme Corp', 'title': 'Head of Growth'}Step 2: Fetch recent LinkedIn posts
Use Google SERP to find recent LinkedIn posts by the prospect.
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def linkedin_posts(name):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'site:linkedin.com/posts "{name}"', 'num_results': 5})
return r.json().get('organic_results', [])Step 3: Fetch recent company news
Google News for the company's latest mentions.
def company_news(company):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'"{company}"', 'tbm': 'nws'})
return r.json().get('news_results', [])[:3]Step 4: Fetch Reddit discussion in the prospect's space
Pull recent Reddit threads relevant to the prospect's role.
def reddit_signals(title, company):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'platform': 'reddit', 'query': f'{title} {company}', 'time': 'month'})
return r.json().get('posts', [])[:3]Step 5: Draft personalized email
Feed all signals into Claude or GPT to draft the personalized cold email.
import anthropic
client = anthropic.Anthropic()
def draft_email(prospect, posts, news, reddit):
context = f'LinkedIn: {posts}\nNews: {news}\nReddit: {reddit}'
resp = client.messages.create(
model='claude-sonnet-4-6',
max_tokens=500,
messages=[{'role': 'user', 'content': f'Write a 3-sentence cold email to {prospect["name"]} at {prospect["company"]}. Context: {context}'}]
)
return resp.content[0].textPython Example
import os, requests
import anthropic
API_KEY = os.environ['SCAVIO_API_KEY']
claude = anthropic.Anthropic()
def research(prospect):
posts = requests.post('https://api.scavio.dev/api/v1/search', headers={'x-api-key': API_KEY},
json={'query': f'site:linkedin.com/posts "{prospect["name"]}"'}).json().get('organic_results', [])[:3]
news = requests.post('https://api.scavio.dev/api/v1/search', headers={'x-api-key': API_KEY},
json={'query': f'"{prospect["company"]}"', 'tbm': 'nws'}).json().get('news_results', [])[:3]
reddit = requests.post('https://api.scavio.dev/api/v1/search', headers={'x-api-key': API_KEY},
json={'platform': 'reddit', 'query': prospect['title'], 'time': 'month'}).json().get('posts', [])[:3]
return {'posts': posts, 'news': news, 'reddit': reddit}
prospect = {'name': 'Jane Doe', 'company': 'Acme Corp', 'title': 'Head of Growth'}
signals = research(prospect)
print(signals)JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY;
async function scavio(body) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify(body)
});
return r.json();
}
const prospect = { name: 'Jane Doe', company: 'Acme Corp', title: 'Head of Growth' };
const [posts, news, reddit] = await Promise.all([
scavio({ query: `site:linkedin.com/posts "${prospect.name}"` }),
scavio({ query: `"${prospect.company}"`, tbm: 'nws' }),
scavio({ platform: 'reddit', query: prospect.title, time: 'month' })
]);
console.log({ posts: posts.organic_results?.slice(0, 3), news: news.news_results?.slice(0, 3), reddit: reddit.posts?.slice(0, 3) });Expected Output
For each prospect, the agent returns 3 LinkedIn posts, 3 company news items, and 3 Reddit threads in the prospect's space. Claude then drafts a 3-sentence cold email that references the most specific signal (e.g. 'Saw your post about Q4 pipeline hitting plan...').