Real Estate
Real Estate Investment Scout
Find the best US housing markets to invest in — ranked by AI.
A 4-phase pipeline that pulls live market statistics from 100 US cities via Redfin, uses Claude to rank and select the top 10 investment markets, then surfaces active Zillow listings and deep market reports from Perplexity for each selected city. The entire research workflow an analyst would spend days on, done in minutes.
Inputs
- City List The US cities to collect market data for — 100 cities are included by default and can be edited in the config file before running.
Outputs
What you get after a full run.
- 100-city ranked scorecard with investment scores across 5 dimensions
- Top 10 investment markets selected and ranked by Claude
- Per-city investment thesis and key risk written by Claude
- 1,199 active Zillow listings across the top 10 markets, with photos and full specs
- 10 deep city reports from Perplexity
- Interactive US map with all 100 cities sized by transaction volume and colored by investment score
How it works
A 4-phase pipeline. Read the blog here for a deeper explanation.
- Collect Redfin agent pulls live market stats for 100 US cities: median price, days on market, sale-to-list ratio, YoY appreciation, homes sold, and price per sqft. The 100-city list covers a wide range of market conditions — expensive coastal metros, mid-size Sunbelt cities, Midwest industrial towns, and smaller markets with strong in-migration signals. Each agent call returns one city’s full market snapshot including the Redfin market description, which is used as additional context in the Claude ranking step.
- Rank Claude scores all 100 cities on 5 investment factors — appreciation, competitiveness, affordability, speed, and liquidity — then selects the final top 10 with a written thesis and key risk per city. The 5-factor scoring runs in a single Claude call with all 100 cities in context, so scores are calibrated relative to each other rather than against an absolute scale. Claude is prompted to select the top 10 from the highest-scoring cities while also considering factor balance — a city that scores extremely high on one factor but very low on another is ranked below a more balanced alternative.
- Listings Zillow agent pulls active listings across 3 zip codes per city (downtown, mid-city, and residential). 30 API calls. 1,199 total listings with photos and full specs. The three zip codes per city were selected to represent different neighborhood tiers: a downtown or urban core zip, a mid-city residential zip, and a suburban or outlying zip. This gives the Listings Explorer tab a cross-neighborhood view rather than a single snapshot of one part of the market.
- Research Perplexity agent generates a deep market report for each of the 10 selected cities, covering appreciation trends, affordability, rental demand, and structural risk factors. Perplexity is used here specifically because it synthesizes live web sources — news articles, analyst reports, and local data — rather than relying on a training cutoff. Each report prompt asks Perplexity to focus on forward-looking signals rather than historical description, which is what Claude’s ranking already covered.
Stack
Nimble primitives plus the full runtime stack.
APIS & AGENTS
What it does
- redfin_market_housing_data_community_2026_05_02 Pulls live market stats per city from Redfin — median price, days on market, sale-to-list ratio, YoY change, and market description.
- zillow_plp Fetches active property listings from Zillow by zip code — price, beds, baths, sqft, home type, photos, and days on Zillow.
- perplexity Generates a deep real estate investment report for any city — appreciation trends, affordability, rental demand, and risk factors.
RUNTIME STACK
Role
- claude-sonnet-4-6 Anthropic Claude API — scores 30 candidate markets, selects the top 10, and writes an investment thesis and key risk per city.
- streamlit 4-tab dashboard combining market data, Claude analysis, active listings, and city deep dives.
- plotly Scatter geo map, radar chart, horizontal bar charts, price histograms, and scatter plots.
- pydeck Interactive property maps using CARTO dark tiles — no Mapbox token required.
- python 3.9+ Pipeline orchestration across 4 phases.
- MIT license Fork, modify, ship — no restrictions.

Reach out if you have any questions.
Talk to an Expert