Multiple subreddits posted the same build the same week: a B2B real estate AI search agent built in 2 days with Claude Code. This tutorial walks the build and explains why SERP + Reddit beats expensive MLS sponsorship for B2B sellers.
Prerequisites
- Claude Code
- Scavio API key
- Markdown editor
Walkthrough
Step 1: Define the agent skill in markdown
Claude Code skill that takes city + practice area.
# brokerage-discovery.md
Given a city and brokerage type, return top 25 prospects with:
- Brokerage name and primary office
- Hiring signals from public job pages
- Recent news mentions
- Reddit thread sentiment (r/realtors, r/RealEstateAgents)
Use Scavio MCP for all retrieval.Step 2: Wire Scavio MCP in Claude Code
Add MCP server config.
{
"mcpServers": {
"scavio": {
"url": "https://mcp.scavio.dev/mcp",
"headers": { "x-api-key": "${SCAVIO_API_KEY}" }
}
}
}Step 3: Run discovery query
SERP for brokerages + recent hiring.
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def brokerages(city):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'real estate brokerage {city} hiring 2026'}).json()
return r.get('organic_results', [])[:25]Step 4: Add Reddit sentiment layer
Threads about brokerages in the city.
def reddit_signal(city):
r = requests.post('https://api.scavio.dev/api/v1/reddit/search',
headers={'x-api-key': API_KEY},
json={'query': f'{city} brokerage'}).json()
return r.get('posts', [])[:10]Step 5: Compose the morning email digest
Daily 25-prospect brief with sentiment context.
def digest(city):
return {'prospects': brokerages(city), 'reddit': reddit_signal(city)}Python Example
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
H = {'x-api-key': API_KEY}
def agent(city):
s = requests.post('https://api.scavio.dev/api/v1/search', headers=H, json={'query': f'real estate brokerage {city}'}).json()
r = requests.post('https://api.scavio.dev/api/v1/reddit/search', headers=H, json={'query': f'{city} broker'}).json()
return {'prospects': s.get('organic_results', [])[:25], 'reddit': r.get('posts', [])[:10]}
print(agent('Austin TX'))JavaScript Example
const H = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
export async function agent(city) {
const [s, r] = await Promise.all([
fetch('https://api.scavio.dev/api/v1/search', { method:'POST', headers:H, body: JSON.stringify({ query: `real estate brokerage ${city}` }) }).then(r => r.json()),
fetch('https://api.scavio.dev/api/v1/reddit/search', { method:'POST', headers:H, body: JSON.stringify({ query: `${city} broker` }) }).then(r => r.json())
]);
return { s, r };
}Expected Output
25 brokerage prospects per city per morning, with Reddit sentiment context. Total cost: ~5 credits/run on Scavio.