Recipe: this weekend's open houses to a list of agents to text
Agents who visit open houses, lenders, and people who host them for others all want the same list: every open house this weekend and the listing agent's mobile number. This recipe builds it with HomeHarvest in one script and saves it as a CSV.
What do I need?
- Python 3.10 or newer and
pip install -U homeharvest. - A city, county or ZIP code. Bigger areas give more open houses.
- HomeHarvest 0.9.0 or newer.
How does the script work?
It asks for listings with an open house this Saturday or Sunday (the open_house filter, new in 0.9.0) and writes one row per listing with the agent's name, mobile number, email, office, address, price and time. On 0.8.18, use the fallback on the open houses page.
import csv
from datetime import date, timedelta
from homeharvest import scrape_property
AREA = "Travis County, TX"
# This coming weekend
today = date.today()
saturday = today + timedelta(days=(5 - today.weekday()) % 7)
sunday = saturday + timedelta(days=1)
homes = scrape_property(
location=AREA,
listing_type="for_sale",
open_house=True,
open_house_from=saturday,
open_house_to=sunday,
return_type="pydantic",
)
def mobile(agent):
phones = agent.phones if isinstance(agent.phones, list) else []
nums = [p.get("number") for p in phones if p.get("type") == "Mobile"] or [p.get("number") for p in phones]
return nums[0] if nums else None
rows = []
for home in homes:
agent = home.advertisers.agent if home.advertisers else None
office = home.advertisers.office if home.advertisers else None
event = next((e for e in home.open_houses or []
if e.start_date and saturday <= e.start_date.date() <= sunday), None)
if not agent or not agent.name or not event:
continue
rows.append({
"agent_name": agent.name,
"agent_phone": mobile(agent),
"agent_email": agent.email,
"office": office.name if office else None,
"address": home.address.formatted_address,
"list_price": home.list_price,
"open_house": event.start_date.strftime("%a %b %d, %I:%M %p"),
"listing_url": str(home.property_url),
})
with open("open_house_agents.csv", "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=list(rows[0]) if rows else ["agent_name"])
writer.writeheader()
writer.writerows(rows)
print(len(rows), "open houses this weekend in", AREA, "-> open_house_agents.csv")Tested with homeharvest 0.9.0 on 2026-11-23. Needs 0.9.0 or newer.
The CSV (example values):
agent_name,agent_phone,agent_email,office,address,list_price,open_house,listing_url
Jane Agent,5125550101,jane@example.com,Example Realty,"1234 Main St, Austin, TX 78704",735000,"Sat Nov 28, 12:00 PM",https://...
How do I get more open houses?
- Run it again closer to the weekend, after more agents post.
- Loop over a few nearby cities or ZIP codes and combine the rows.
- Use a county instead of a city, as the script does.
What should the text say?
Short and about their listing. Say who you are, name the address, and ask one easy question. For example: "Hi Jane, I'm Sam with Example Homes. Is 1234 Main still on for Saturday at noon? I may have a buyer for it." Send from your own phone, one at a time. Honor anyone who asks you to stop, and follow the TCPA and your state's rules.
Can someone write the texts for me?
Yes. Modern Realty writes the texts to these agents. You check or edit each one before it goes. The Modern Realty team's own brokerage texted about 450 listing agents. About 400 wrote back.
Last updated 2026-11-23. Report a problem.