All case studies

Who owns every property in Massachusetts

A statewide property database that takes a brokerage from the owner's name on a public record to the real owner behind it.

2.58M
property records, all 351 towns Source: database schema documentation
33,282
real owners resolved from 2.0M owner names Source: owner-matching design spec, June 2026
3.4ms
slowest search preset, down from 8.8s Source: database change 223, statewide search

The problem

“The assessor says the owner is an LLC. Who do I actually call?” value to confirm

Lornell Real Estate is a commercial brokerage in Central Massachusetts with a team of about five. Its brokers win listings by reaching owners before anyone else does.

The public record rarely names a person. The owner of record is a free-text string, often an LLC named after the street address or a trust with the trustee folded into the name. One landlord can appear under many spellings, so a real portfolio looks like a list of strangers.

The facts that answer “who decides” are scattered: property records across 351 towns, deeds and trustees in 21 county registry districts, company officers in the state’s corporate database, and city files for permits and licenses, each keyed differently. Answering the question for one property meant searching several state websites by hand. value to confirm

What I built

A private platform the firm’s brokers use through a map and a search screen.

  • Statewide parcel spine. All 2.58M assessment records in Massachusetts, across 351 towns: owner, mailing address, value, last sale, use and parcel shape.
  • Worcester deep zone. 47,118 parcels in the firm’s home market, joined to city permits, certificates, licenses, flood zones and zoning.
  • Owner resolution. 2.0M owner-name strings grouped into real-world owners, so a portfolio shows up as one owner.
  • Registry lookups. Deed and corporate-filing searches that turn an LLC or trust into the people behind it.
  • Seller signals. A 17-signal score on Worcester parcels and a simpler 0 to 100 signal on the state’s 444,032 commercial parcels.

A broker can ask for “industrial, mid-size, Worcester County, long-held by an out-of-state owner” and get the list sorted by seller signal. When the state publishes new parcel data, the update writes only what changed. It never deletes a parcel or overwrites the research the firm has added.

Diagram: The statewide spine and the Worcester deep zone, joined by a crosswalk, feed one precomputed search index behind secured database functions. Owner resolution and registry lookups feed in from the side.

The hard parts

An unmatched owner beats a wrong owner.

Merge two unrelated landlords and the broker calls the wrong person about the wrong building, and every portfolio count after that is fiction. So the rule runs the cautious way: merge only on strong evidence, and hold anything uncertain for a person. The result is 33,282 real owners built from 72,023 name strings, at about 95 to 98% precision on a hand audit of 60. Another 24,379 possible matches wait for review.

The same rule drives regular accuracy audits. One found that about 8% of CRM contacts in condo buildings pointed at another unit’s owner. The fix unlinked what it couldn’t prove, and suspect links went from 230 to 1.

Under the hood
  • Name features (abbreviation expansion, core name, sort key) are computed in SQL; scoring and clustering are unit-tested Python. A pre-filter cuts 2.0M owner keys to about 660k that share a name key or mailing address with another.
  • Hub guard: a mailing address shared by more than 15 distinct names is treated as a registered agent, law firm or property manager, and can’t link owners on its own.
  • Every scored pair is stored with its reason (name_variant, abbrev_expansion, shared_mailing_corroborated, llc_principal); only high-confidence pairs apply.
  • The condo bug (migration 106): a backfill linked contacts to the highest-value assessment on a shared lot, often another unit’s owner. Links under 0.35 name similarity were cleared and re-resolved by name at that lot, with a 0.45 floor. Name agreement rose from 0.86 to 0.95.

Answers inside a three-second limit.

The database stops any query from the public-facing role after 3 seconds. Searching 2.58M records on several criteria at once, sorted by seller signal, ran well past that, and the broker saw an error. After I rebuilt how searches are served, the slowest preset went from 8.8 seconds to 3.4 milliseconds, and owner-name autocomplete from about 3 seconds to about 6 milliseconds.

Under the hood
  • A denormalized read model (statewide_property_index, 2,575,607 rows) is built offline. RLS is on with zero policies, so only SECURITY DEFINER functions with bound jsonb filters and whitelisted sort columns can read it.
  • Fixes from reading query plans (migration 223):
    1. The function sorts DESC NULLS LAST; a plain DESC index is NULLS FIRST, so the planner sorted in memory (about 6.8s) until a matching partial index (total_val DESC NULLS LAST) WHERE is_cre fixed it.
    2. Multifamily preset: about 4s cold to 36ms with (asset_class, units DESC NULLS LAST).
    3. Portfolio owners: 4.8 to 8.8s to 3.4ms with a sort-leading partial index (seller_signal DESC NULLS LAST, owner_parcel_count) WHERE is_cre. The same index serves the owners rollup (now a top-signal sample) at 766ms, from 14.7s.
  • Autocomplete (migration 142): a catch-all p_name IS NULL OR … in a SQL function forces a generic plan valid for all 2M rows, hence a sequential scan. A name-required variant always uses the trigram index: about 3,063ms to about 6ms.

Twenty-one registries, and a “no records” that wasn’t.

Trustees and mortgages are recorded at the Registry of Deeds, split into 21 districts on four software platforms. The dangerous failure is quiet. On one platform, a throttled search returns a normal-looking page with no results, and a naive scraper records “no deeds” and keeps that wrong answer for months. Here every miss says why: district not supported, nothing found, or no answer from the registry, and only a real “nothing found” is kept. Coverage went from 7 to 17 supported districts.

Under the hood
  • A per-district table records each district’s platform and whether support is proven by live results or only by the search form. Platforms were read from the registry’s own navigation; a link scrape had found only 11 of 21.
  • One transport per platform. Five districts on an older GET-form system run from the edge worker over plain HTTP at no marginal cost.
  • deedsSearchExecuted() checks for the results panel, which appears even when nothing matches. Real negatives stay cacheable, throttled pages report as unreachable, and a search that hits the 20-row cap is never cached as a negative.
  • Throttling and bot protection are handled with control queries and fallbacks; every probe batch includes a known-good control district.

Results

  • 2.58M property records, all 351 towns. Row count of the statewide index.
  • 33,282 real owners from 72,023 name strings, about 95 to 98% precision. Hand audit of 60 owners.
  • Suspect contact-to-owner links: 230 to 1. Counted before and after the fix.
  • Slowest search preset: 8.8s to 3.4ms. Owner autocomplete: about 3s to about 6ms. Timings from query plans, recorded in the migrations.
  • 17 of 21 deed districts supported, 9 confirmed with live results. From the district table.
  • value to confirm
  • value to confirm

What’s next

  • Live results from every supported registry district. 9 of the 17 supported districts return live results today. Next: prove the other 8, each beside a control district, then take on the 4 still unsupported.
  • A back-tested seller signal. The full 17-signal model runs on Worcester, and a simpler signal covers the state. Next: test both against actual sales before anyone treats them as a forecast.
  • Clearing the review queue. 24,379 possible owner matches wait for a person. Next: work through them in the CRM’s review queue.

Stack

PostgreSQL and PostGIS with pg_trgm on Supabase · Python · Next.js 16 on Cloudflare Workers · MapLibre vector tiles · Playwright for the original crawler.

If your next sale depends on knowing who to call, and the answer is spread across public records, this is the kind of system I build.

Have a similar problem? Book a call.