B2B teams selling into real estate brokerages need fresh signals: brokerage moves, hiring posts, market commentary. Direct MLS access is gated and expensive. Public SERP plus Reddit covers 80% of the same signal at a fraction of the cost. This tutorial walks through the two-day Claude Code build that landed on Reddit in 2026.
Prerequisites
- Python 3.10+
- A Scavio API key
- Anthropic API key for Claude Code
Walkthrough
Step 1: Define market and practice
Parameterize city plus practice area.
def query_for(city, practice):
return f'{practice} brokerages {city} 2026 hiring OR new listings'Step 2: Run SERP discovery
Top 25 organic results plus brokerage news.
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def discover(query):
r = requests.post('https://api.scavio.dev/api/v1/google',
headers={'x-api-key': API_KEY},
json={'query': query, 'num_results': 25})
return r.json().get('organic_results', [])Step 3: Reddit signal per market
Reddit search for hiring threads and reviews.
def reddit_signal(city, practice):
r = requests.post('https://api.scavio.dev/api/v1/reddit/search',
headers={'x-api-key': API_KEY},
json={'query': f'{city} {practice} brokerage'})
return r.json().get('posts', [])[:10]Step 4: Extract contact pages
Use Scavio's extract endpoint on each candidate site.
def contacts(url):
r = requests.post('https://api.scavio.dev/api/v1/extract',
headers={'x-api-key': API_KEY}, json={'url': url})
return r.json().get('content', '')Step 5: Score and rank
Claude scores each prospect by recency and fit.
import anthropic
client = anthropic.Anthropic()
def score(prospect):
msg = client.messages.create(
model='claude-sonnet-4-6', max_tokens=200,
messages=[{'role':'user','content':f'Score 1-10 fit: {prospect}'}])
return msg.content[0].textStep 6: Email digest
Top 25 prospects with one-line rationale.
# SMTP wiring left to reader; output is markdown digest.Python Example
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
def daily_engine(city, practice):
serp = requests.post('https://api.scavio.dev/api/v1/google',
headers={'x-api-key': API_KEY},
json={'query': f'{practice} brokerages {city} 2026'}).json()
rdt = requests.post('https://api.scavio.dev/api/v1/reddit/search',
headers={'x-api-key': API_KEY},
json={'query': f'{city} {practice} brokerage'}).json()
return {'prospects': serp.get('organic_results',[])[:25], 'signal': rdt.get('posts',[])[:10]}
print(daily_engine('austin', 'commercial'))JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY;
export async function dailyEngine(city, practice) {
const [serp, rdt] = await Promise.all([
fetch('https://api.scavio.dev/api/v1/google', { method:'POST', headers:{'x-api-key':API_KEY,'Content-Type':'application/json'}, body: JSON.stringify({ query: `${practice} brokerages ${city} 2026` }) }).then(r => r.json()),
fetch('https://api.scavio.dev/api/v1/reddit/search', { method:'POST', headers:{'x-api-key':API_KEY,'Content-Type':'application/json'}, body: JSON.stringify({ query: `${city} ${practice} brokerage` }) }).then(r => r.json())
]);
return { serp, rdt };
}Expected Output
Daily morning email with top 25 brokerage prospects per market, scored by Claude on recency and fit. Reddit signal flags hiring threads and brokerage reviews.