Keeping your database current
Re-downloading the full national file every day works, but it is 13.5 GB and 147 million rows to re-ingest. The daily change set contains only the properties that changed — typically 150,000–200,000 rows (about 30 MB) — in exactly the same columns as the national file.
The pattern is the one used for any keyed replica:
- Load the national file once (your baseline).
- Every day, apply that day’s change set: upsert
incremental.parquetbyid, then delete the ids inremoved_ids.csvand theold_ids inmerged_ids.csv(two records found to be one home; it continues undernew_id).
The two manifests
Section titled “The two manifests”| File | What it tells you |
|---|---|
/data/latest/manifest.json | The current national build: version (a date), row count, checksums. |
/data/changes/manifest.json | The last 30 daily change sets, newest first. Each release has version, prev_version and its files, with an asset name for each download. |
Both manifests are public. The files they describe require a subscription.
Getting a download link
Section titled “Getting a download link”Every file is downloaded the same way: ask for a short-lived link, then fetch it.
curl -s -X POST https://api.straply.com/v1/issue-download \ -H "Authorization: Bearer $STRAPLY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"asset": "changes/2026-11-13/incremental.parquet"}'# {"url": "https://api.straply.com/dl/…", "expires_at": "…", "bytes": 31313905}Assets: national.parquet, national.csv.gz, and from the change manifest
changes/<version>/incremental.parquet, changes/<version>/removed_ids.csv and changes/<version>/merged_ids.csv.
Homes on the market carry their current listing’s MLS number and MLS name as the columns mls_number and
mls_name, refreshed every night. They are empty for homes that are not on the market or not listed through an MLS.
Step 1 — the baseline
Section titled “Step 1 — the baseline”Download national.parquet and record the version from /data/latest/manifest.json at the same
time. That version is your sync point.
Step 2 — the daily loop
Section titled “Step 2 — the daily loop”- Read
/data/changes/manifest.json. - Take every release whose
versionis newer than your sync point, oldest first. - If the oldest release’s
prev_versionis newer than your sync point, you have fallen more than 30 days behind: reload the baseline instead. - For each release: upsert
incremental.parquet, deleteremoved_ids.csv, then set your sync point to that release’sversion. Do all three in one transaction.
New releases are published each morning.
listing_confirmed_at (when a for-sale home was last confirmed on the market) moves every day for most
listings without anything else changing, so it is not part of the change sets. It is in each day’s full
national and per-geo files. If you need it, refresh it from those files, joining on id.
Applying a change set
Section titled “Applying a change set”DuckDB
Section titled “DuckDB”-- onceCREATE TABLE properties AS SELECT * FROM 'national.parquet';ALTER TABLE properties ADD PRIMARY KEY (id);
-- each dayBEGIN;INSERT OR REPLACE INTO properties SELECT * FROM 'incremental.parquet';DELETE FROM properties WHERE id IN ( SELECT id FROM read_csv('removed_ids.csv', header = true, columns = {'id': 'VARCHAR'}));DELETE FROM properties WHERE id IN ( -- merged_ids.csv is absent before 2026-11-24 SELECT old_id FROM read_csv('merged_ids.csv', header = true, columns = {'old_id': 'VARCHAR', 'new_id': 'VARCHAR'}));COMMIT;PostgreSQL
Section titled “PostgreSQL”Load the change set into a staging table (for example with DuckDB’s postgres extension, or by
converting to CSV), then merge. price_history and tax_history are lists of records; store them as
jsonb.
BEGIN;INSERT INTO properties SELECT * FROM properties_stagingON CONFLICT (id) DO UPDATE SET street = EXCLUDED.street, status = EXCLUDED.status, list_price = EXCLUDED.list_price, last_sold_price = EXCLUDED.last_sold_price, last_sold_date = EXCLUDED.last_sold_date, price_history = EXCLUDED.price_history, tax_history = EXCLUDED.tax_history -- …list every column;DELETE FROM properties WHERE id IN (SELECT id FROM removed_ids_staging);COMMIT;REPLACE INTO properties SELECT * FROM properties_staging;DELETE p FROM properties p JOIN removed_ids_staging r ON r.id = p.id;Checking your copy
Section titled “Checking your copy”Each release lists a sha256 for every file; verify downloads against it. After applying, your row
count should match national_rows in the latest national manifest for the same version.