Data model
Built to grow from 2 counties to 500.
PostgreSQL (Supabase), split into five areas. Each lead keeps its full history and a link to the exact county file it came from. The same structure works for any county, any platform and any future lead type (code violations, evictions, divorces) without redesign.
How a lead flows
- 01
Fetch
Download the county file politely and save a fingerprinted copy (ops.evidence).
- 02
Parse
Turn it into clean rows: names split, addresses normalized, dates and amounts checked.
- 03
Match
Look up the case or parcel. New → insert. Changed → new version. Same → just mark seen.
- 04
Score
Add up motivation signals (absentee, deceased owner, surplus amount, sale soon …).
- 05
Deliver
Write the daily CSVs and queue each new or changed lead for your tools (integrations.outbox).
core · the leads
One row per real-world record, plus its full change history.
core.records
Every lead: case or parcel number, owner, decedent, property and mailing address, amounts, dates, lead score and signals, source link. Unique on (feed, natural ID), so the same case can never be stored twice.
core.record_versions
A new row each time a county changes something (sale date moved, amount updated, case closed), with old → new values per field.
core.record_parties
Everyone named on a case: owners, heirs, petitioners, plaintiffs, attorneys. Ready for skip tracing each person.
ref · the rules
Configuration in tables, not in code. Adding a county is a row here.
ref.states
Foreclosure process, tax-sale model and where probate lives for each target state.
ref.counties
All counties in the eight states (FIPS code, seat, population, timezone) with rollout status and priority.
ref.platforms
Each vendor platform (Tyler, RealAuction, GovEase, SRI …) with its access policy and our decision.
ref.source_feeds
Each source: URL, schedule, method, compliance decision, robots verdict, date last verified, expected minimum per day.
ref.record_types
The four lead types and their GoHighLevel tags.
ops · the proof
Everything needed to answer “what ran, what changed, where did this come from?”
ops.pipeline_runs
One row per daily run with counts, duration and a link to the GitHub Actions run.
ops.run_feeds
Per-feed result for every run: files read, records accepted or rejected, new / updated / unchanged.
ops.evidence
Every downloaded source file, saved to storage with its SHA-256 fingerprint.
ops.exports
Every CSV produced, with row count and fingerprint.
ops.http_log
Every request made to a county site, for rate-limit and politeness audits.
ops.alerts
Failures, empty feeds, layout changes and robots.txt changes, with email delivery status.
integrations · the hand-off
A reliable outbox between the leads and your tools.
integrations.outbox
One row per lead per tool, with a unique idempotency key, status, attempts and the tool's response.
integrations.crm_links
The GoHighLevel contact ID (and others) for each lead, so updates never create duplicates.
integrations.contact_enrichment
Phones, emails, mailing address, DNC and litigator status returned by skip trace and scrub.
Design choices that matter later
- No duplicates by design. Each record has a stable key built from the county, source and case or parcel number, enforced by a unique index.
- “New” means new. A lead is marked NEW once, on the day it first appears. Later changes are UPDATED, with the exact fields listed.
- Search is instant. Trigram indexes on names, addresses and case numbers, so partial and misspelled searches still match.
- Locked down. Row-level security is on for every table; the website reads through a few read-only functions only.
- Room to grow. County-specific extras go into an
attributesfield, so a new county never needs a schema change. - Versioned changes. Database changes are numbered migration files, checked by fingerprint before they run.
CSV file
34 columns, every day.
File name trusty_leads_{date}_{scope}.csv, one for all leads and one per lead type. Dates are MM/DD/YYYY and the file opens cleanly in Excel. Column names are set in one config file, so they can match your GoHighLevel import exactly.
- 1Change Type
- 2Lead Type
- 3Sub Type
- 4State
- 5County
- 6Case / Parcel #
- 7Filing Date
- 8Sale / Event Date
- 9Status
- 10Owner Name
- 11Owner First Name
- 12Owner Last Name
- 13Co-Owner Name
- 14Decedent Name
- 15Date of Death
- 16Petitioner / Heir
- 17Property Address
- 18Property City
- 19Property State
- 20Property Zip
- 21Mailing Address
- 22Mailing City
- 23Mailing State
- 24Mailing Zip
- 25Amount
- 26Amount Type
- 27Plaintiff / Lender
- 28Attorney
- 29Homestead
- 30Lead Score
- 31Signals
- 32Changed Fields
- 33Source URL
- 34Record ID
JSON API
Plug it into anything.
The same data the portal shows is available as JSON, for your own systems, Zapier or Make. In production these endpoints require an API key.
| Method | Endpoint | Returns |
|---|---|---|
| GET | /api/records | Search leads: q, state, county_fips, record_type, signal, change, min_score, sort, limit, offset |
| GET | /api/record?key= | One lead with parties, version history, source file and integration log |
| GET | /api/deltas?days=30 | New and updated counts per day, with the CSV files for each day |
| GET | /api/delta?day=&record_type= | The rows that changed on one day |
| GET | /api/download/{day}/{file} | Download a daily CSV |
| GET | /api/overview | Totals, by type, by county, daily trend, last run, alerts, top leads |
| GET | /api/runs | Recent runs with per-feed results and GitHub links |
| GET | /api/sources | States, counties, platforms and feeds with their last result |
| GET | /api/integrations | Outbox totals and a sample request per tool |
| GET | /api/acceptance | Clean-run streak, duplicate checks and field completeness |
| GET | /api/spot-check?record_type=&seed= | A reproducible random sample of 20 records |
curl "https://trusty-county-records-pipeline.pages.dev/api/records?record_type=probate&state=FL&sort=score&limit=5"