Recipe: wake up quiet leads with homes that just sold
Old leads go quiet, but they still care what homes like theirs sell for. This recipe takes your list of quiet leads, finds homes that sold in each lead's ZIP code and budget in the last 30 days, and gives you one fact per lead to open a text with.
What do I need?
- Python 3.10 or newer and
pip install -U homeharvest. - Your leads with a ZIP code and a max price. A CRM export as CSV works; swap the sample list for
pd.read_csv("leads.csv").
How does the script work?
It pulls each ZIP code's sales from the last 30 days once, then for each lead counts the sales in budget, finds the median price, and picks the most recent one as an example.
import pandas as pd
from homeharvest import scrape_property
# Your old leads: who they are and the ZIP they were shopping in.
# In real use, load your CRM export: leads = pd.read_csv("leads.csv")
leads = pd.DataFrame([
{"lead": "Lead 1", "zip": "92107", "max_price": 1_500_000},
{"lead": "Lead 2", "zip": "92117", "max_price": 1_000_000},
{"lead": "Lead 3", "zip": "92104", "max_price": 900_000},
])
notes = []
for zip_code, group in leads.groupby("zip"):
sold = scrape_property(location=zip_code, listing_type="sold", past_days=30, limit=200)
if sold.empty:
continue
for _, lead in group.iterrows():
in_budget = sold[sold["sold_price"] <= lead["max_price"]]
if in_budget.empty:
continue
latest = in_budget.sort_values("last_sold_date", ascending=False).iloc[0]
notes.append({
"lead": lead["lead"],
"zip": zip_code,
"sold_in_budget_30d": len(in_budget),
"median_sold_price": int(in_budget["sold_price"].median()),
"example_home": latest["formatted_address"],
"example_price": int(latest["sold_price"]),
"example_beds": latest["beds"],
})
notes = pd.DataFrame(notes)
print(notes.to_string(index=False) if not notes.empty else "No sales in these ZIPs yet.")
notes.to_csv("lead_talking_points.csv", index=False)Tested with homeharvest 0.8.18 and 0.9.0 on 2026-11-23.
The output (example values):
lead zip sold_in_budget_30d median_sold_price example_home example_price example_beds
Lead 3 92104 14 640000 123 Elm St, San Diego, CA 655000 2
Lead 1 92107 12 1210000 456 Bay Ave, San Diego, CA 1180000 3
Can I mention a price cut instead?
Yes, from 0.9.0. Homes for sale have price_reduced_amount and last_price_change_date, so you can tell a lead "the 3-bed on Elm just dropped $25K". Pull listing_type="for_sale" for the ZIP and keep rows where price_reduced_amount is set.
What if my leads are in Texas or Utah?
Sale prices are blank in non-disclosure states, so the budget filter drops everything. Use the count of homes sold and the list prices instead: change sold_price to list_price in the script.
What should the text say?
Lead with the home, not with you. For example: "Hi Maria, a 3-bed on Bay Ave just sold for $1.18M, close to what you were looking at. Want me to send the others that sold near you?" One fact, one easy question. The Modern Realty team's own brokerage tested this. Texts about a sold or pending home got a reply 30% of the time within 3 days. It was a small test of 101 texts.
Can someone write these texts for me?
Yes. Modern Realty writes the texts to these leads, in your voice, using the homes each lead asked about. You check or edit each one before it goes.
Last updated 2026-11-23. Report a problem.