Tutorial

How to Build a Real Estate Prospecting Agent with Claude Code

Two-day Claude Code build for a B2B real estate prospecting agent. SERP plus Reddit covers 80% of MLS at a fraction of the cost.

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.

JSON
{
  "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.

Python
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.

Python
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.

Python
def digest(city):
    return {'prospects': brokerages(city), 'reddit': reddit_signal(city)}

Python Example

Python
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

JavaScript
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

JSON
25 brokerage prospects per city per morning, with Reddit sentiment context. Total cost: ~5 credits/run on Scavio.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Claude Code. Scavio API key. Markdown editor. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Two-day Claude Code build for a B2B real estate prospecting agent. SERP plus Reddit covers 80% of MLS at a fraction of the cost.