Sold Count by ZIP
Count of sales in a ZIP, by default over the last 12 months
GET /api/properties/sold/count-by-zip/
1 credit
What it returns
Just the count of residential sales in a ZIP, by default over the last 12 months. It counts the rows sold-by-zip returns for the same parameters, so a home that sold twice in the range counts twice. You get only the integer — useful when you don't need the property details and want to minimize cost.
When to use it
- Display market velocity in a header widget (no need to render rows).
- Drive a chart of monthly sales trend across many ZIPs cheaply.
- Pre-check whether a ZIP has enough comp activity before calling sold-by-zip.
Date range
By default the endpoint counts the last 12 months. Pass start_date, end_date, or both (YYYY-MM-DD) to narrow that to a specific window — for example one calendar month at a time instead of re-counting the whole range on every poll:
Both bounds are optional and inclusive, and both are independent: pass only start_date for an open-ended window, or only end_date to cut off recent sales. Passing neither leaves existing behaviour unchanged.
start_date can reach back up to six years. Sales older than 12 months for a ZIP are prepared the first time that ZIP is asked for them, and that first request returns 202 with {"status": "loading", "retry_after_seconds": 60} and a Retry-After header, costs nothing, and the same request succeeds a minute or two later. A ZIP's newest sales refresh on demand when they are more than 4 hours old. The request that starts a refresh may wait up to about 8 seconds, then answers with fresh or stored data. Every other request answers right away from stored data. The only other 202 is the first load of a ZIP we hold no sales for in the last 12 months. A date older than six years returns 400 naming the earliest date we can serve, rather than quietly returning a partial set.
Property type
Pass property_type (one value or a comma-separated list, same values as sold-by-zip) to count only those types:
Omitting it counts every type. Unknown values return 400.
Pricing
1 credit per call regardless of the count.
FAQ
What's the difference between this and sold-by-zip?
This returns one integer (1 credit). sold-by-zip returns the full list (1 credit per 20 rows). Use this for cost-efficient screening; use sold-by-zip when you need details.
Parameters
zip(query, required) — 5-digit US ZIP code.start_date(query) — Earliest sale date to include, as YYYY-MM-DD. Optional — omit for the default window of the last 12 months. Inclusive: a sale on this exact date is returned. May reach back up to six years; a date older than 12 months may first return 202 while that ZIP's older sales are prepared (see Date range). Older than six years returns 400.end_date(query) — Latest sale date to include, as YYYY-MM-DD. Optional — omit for no upper bound. Inclusive: a sale on this exact date is returned. Must be on or after start_date and within the last six years.property_type(query) — Count only these property types. One value or a comma-separated list, e.g. single_family or single_family,townhomes. Optional — omit for every type. Values are the ones the response's property_type field carries, chiefly single_family, condos, townhomes, multi_family, apartment, mobile, duplex_triplex, coop, condo, land, farm, other. Case-insensitive; - and spaces are read as _. An unknown value returns 400 listing the full accepted set.
Responses
200202— Nothing is charged; retry after retry_after_seconds (also sent as Retry-After). Returned in two cases: the ZIP has no sales on hand for the last 12 months yet (first load, "Recent sales for ZIP ... are being loaded"), or the request reaches back more than 12 months and that older history is still loading.400— Bad request — a required parameter is missing or failed validation. Costs 0 credits.401— Authentication failed — missing or invalid API key. Costs 0 credits.402— Payment required — no active subscription or insufficient credit balance. Costs 0 credits.503— Upstream data provider is temporarily unavailable — retry with backoff.
Response fields
| Field | Type | Example |
|---|---|---|
zip_code | string | 65802 |
count | number | 986 |
Sample response
{
"zip_code": "65802",
"count": 986
}Use it through the MCP
Connect the Homesage.ai MCP to Claude, ChatGPT or Cursor, and your assistant calls this as the get_sold_count_by_zip tool. Set up the MCP.
More in Market Data
- List every sale in a ZIP, by default over the last 12 months —
GET /api/properties/sold/by-zip/
Every residential sale in a given US ZIP code, by default over the last 12 months and up to six years back with start_date. - Mortgage and lien data for a US property —
GET /api/mortgage-lien/analysis/
Mortgage and lien records for a US property — current and historical mortgages, lien summary, involuntary liens, pre-foreclosure status, and data quality metadata.