---
title: "Count Sales in a ZIP Code — Market Data API"
description: "Return how many residential properties sold in a US ZIP code over the last 365 days, a fast, low-cost way to gauge market liquidity. Costs 1 credit per call."
---

# Count of sold properties in a ZIP in the last 365 days

`GET /api/properties/sold/count-by-zip/`

1 credit

## What it returns

Just the **count** of residential properties sold in a ZIP within the last 365 days. Same dedup + recency rules as `sold-by-zip`, but only the integer count — 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 returns the full trailing 365 days. 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-pulling the whole year on every poll:

```
?zip=95630&start_date=2026-08-01&end_date=2026-08-31
```

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.

Either bound must fall within the last 365 days. An older date 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:

```
?zip=65802&property_type=single_family
```

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 properties). Use this for cost-efficient screening; use `sold-by-zip` when you need details.
