curl -X POST "https://api.v2.dealmachine.com/v1/properties/search/count" \
-H "Authorization: Bearer dm_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"locations": [
{ "type": "state", "code": "TX" }
],
"anchor": "properties",
"contact_audience": "owners",
"filters": [
{
"filter_id": "estimated_value",
"operator": "range",
"value": { "min": 200000, "max": 600000 }
},
{
"filter_id": "has_absentee_owners",
"value": true
}
]
}'
const response = await fetch('https://api.v2.dealmachine.com/v1/properties/search/count', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
locations: [{ type: 'state', code: 'TX' }],
anchor: 'properties',
contact_audience: 'owners',
filters: [
{
filter_id: 'estimated_value',
operator: 'range',
value: { min: 200000, max: 600000 },
},
{
filter_id: 'has_absentee_owners',
value: true,
},
],
}),
});
const counts = await response.json();
console.log(`Properties: ${counts.total_properties.toLocaleString()}`);
console.log(`People: ${counts.total_people.toLocaleString()}`);
import requests
response = requests.post(
"https://api.v2.dealmachine.com/v1/properties/search/count",
headers={"Authorization": f"Bearer {api_key}"},
json={
"locations": [{"type": "state", "code": "TX"}],
"anchor": "properties",
"contact_audience": "owners",
"filters": [
{
"filter_id": "estimated_value",
"operator": "range",
"value": {"min": 200000, "max": 600000},
},
{
"filter_id": "has_absentee_owners",
"value": True,
},
],
},
)
counts = response.json()
print(f"Properties: {counts['total_properties']:,}")
print(f"People: {counts['total_people']:,}")
{
"total_properties": 1847,
"total_people": 2134,
"total_results": 1847
}
{
"total_properties": 1847,
"total_people": 3412,
"total_results": 3412
}
{
"error": {
"code": "validation_error",
"message": "Validation failed",
"request_id": "req_abc123def456",
"details": {
"issues": [
{
"path": "contact_audience",
"message": "contact_audience is required when anchor is 'people'"
}
]
}
}
}
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid",
"request_id": "req_def456ghi789"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Please retry after the specified time.",
"request_id": "req_ghi789jkl012"
}
}
Properties
Count Properties
POST
/
v1
/
properties
/
search
/
count
curl -X POST "https://api.v2.dealmachine.com/v1/properties/search/count" \
-H "Authorization: Bearer dm_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"locations": [
{ "type": "state", "code": "TX" }
],
"anchor": "properties",
"contact_audience": "owners",
"filters": [
{
"filter_id": "estimated_value",
"operator": "range",
"value": { "min": 200000, "max": 600000 }
},
{
"filter_id": "has_absentee_owners",
"value": true
}
]
}'
const response = await fetch('https://api.v2.dealmachine.com/v1/properties/search/count', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
locations: [{ type: 'state', code: 'TX' }],
anchor: 'properties',
contact_audience: 'owners',
filters: [
{
filter_id: 'estimated_value',
operator: 'range',
value: { min: 200000, max: 600000 },
},
{
filter_id: 'has_absentee_owners',
value: true,
},
],
}),
});
const counts = await response.json();
console.log(`Properties: ${counts.total_properties.toLocaleString()}`);
console.log(`People: ${counts.total_people.toLocaleString()}`);
import requests
response = requests.post(
"https://api.v2.dealmachine.com/v1/properties/search/count",
headers={"Authorization": f"Bearer {api_key}"},
json={
"locations": [{"type": "state", "code": "TX"}],
"anchor": "properties",
"contact_audience": "owners",
"filters": [
{
"filter_id": "estimated_value",
"operator": "range",
"value": {"min": 200000, "max": 600000},
},
{
"filter_id": "has_absentee_owners",
"value": True,
},
],
},
)
counts = response.json()
print(f"Properties: {counts['total_properties']:,}")
print(f"People: {counts['total_people']:,}")
{
"total_properties": 1847,
"total_people": 2134,
"total_results": 1847
}
{
"total_properties": 1847,
"total_people": 3412,
"total_results": 3412
}
{
"error": {
"code": "validation_error",
"message": "Validation failed",
"request_id": "req_abc123def456",
"details": {
"issues": [
{
"path": "contact_audience",
"message": "contact_audience is required when anchor is 'people'"
}
]
}
}
}
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid",
"request_id": "req_def456ghi789"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Please retry after the specified time.",
"request_id": "req_ghi789jkl012"
}
}
Returns the total number of properties and people matching a set of filters. Use the same
filters, anchor, and contact_audience parameters as Search Properties.
Body Parameters
array
Array of location objects defining where to search. Required unless filters or protocol filters are provided (max 15). Locations use OR logic.
Show Location object properties
Show Location object properties
string
required
Location type:
state, county, city, zip_code, radius, or polygon.string
Location identifier. Required for
state (2-letter abbreviation), county (5-digit FIPS code), city (place ID), and zip_code (5-digit ZIP).number
Center point latitude. Required for
radius.number
Center point longitude. Required for
radius.number
Search radius in miles. Required for
radius.array
Array of
[longitude, latitude] pairs defining the boundary. Required for polygon (minimum 3 points).array
Array of filter objects. Required unless locations or protocol filters are provided. You can mix property filters (
source_type=properties) and people filters (source_type=people).Show Filter object properties
Show Filter object properties
string
required
The filter slug from the List Filters endpoint (e.g.,
estimated_value, property_type_id).string
One of the filter’s
allowed_operators. See Filter Values for all operators by type. Optional for BOOLEAN filters — automatically defaults to is_boolean.any
required
The filter value. Shape depends on the operator — can be a number, string, boolean, array, or object. See Filter Values.
object
Restrict counts to property list IDs, for example
{ "property_list_ids": [123] }.object
Exclude property list IDs, for example
{ "property_list_ids": [456] }.boolean | object
Exclude records already exported by your organization.
string
default:"properties"
Controls which entity is counted as
total_results.Use properties to count matching properties. Use people to count matching people; this requires contact_audience.string
Which contacts to count. Required when
anchor is people, optional when properties.Options: owners, owners_and_family, renters, residentscurl -X POST "https://api.v2.dealmachine.com/v1/properties/search/count" \
-H "Authorization: Bearer dm_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"locations": [
{ "type": "state", "code": "TX" }
],
"anchor": "properties",
"contact_audience": "owners",
"filters": [
{
"filter_id": "estimated_value",
"operator": "range",
"value": { "min": 200000, "max": 600000 }
},
{
"filter_id": "has_absentee_owners",
"value": true
}
]
}'
const response = await fetch('https://api.v2.dealmachine.com/v1/properties/search/count', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
locations: [{ type: 'state', code: 'TX' }],
anchor: 'properties',
contact_audience: 'owners',
filters: [
{
filter_id: 'estimated_value',
operator: 'range',
value: { min: 200000, max: 600000 },
},
{
filter_id: 'has_absentee_owners',
value: true,
},
],
}),
});
const counts = await response.json();
console.log(`Properties: ${counts.total_properties.toLocaleString()}`);
console.log(`People: ${counts.total_people.toLocaleString()}`);
import requests
response = requests.post(
"https://api.v2.dealmachine.com/v1/properties/search/count",
headers={"Authorization": f"Bearer {api_key}"},
json={
"locations": [{"type": "state", "code": "TX"}],
"anchor": "properties",
"contact_audience": "owners",
"filters": [
{
"filter_id": "estimated_value",
"operator": "range",
"value": {"min": 200000, "max": 600000},
},
{
"filter_id": "has_absentee_owners",
"value": True,
},
],
},
)
counts = response.json()
print(f"Properties: {counts['total_properties']:,}")
print(f"People: {counts['total_people']:,}")
{
"total_properties": 1847,
"total_people": 2134,
"total_results": 1847
}
{
"total_properties": 1847,
"total_people": 3412,
"total_results": 3412
}
{
"error": {
"code": "validation_error",
"message": "Validation failed",
"request_id": "req_abc123def456",
"details": {
"issues": [
{
"path": "contact_audience",
"message": "contact_audience is required when anchor is 'people'"
}
]
}
}
}
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid",
"request_id": "req_def456ghi789"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Please retry after the specified time.",
"request_id": "req_ghi789jkl012"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
total_properties | integer | Number of properties matching the filters |
total_people | integer | Number of people matching the filters and contact_audience |
total_results | integer | Equals total_properties when anchor is properties, or total_people when anchor is people |
Notes
- The same filter validation rules apply as Search Properties.
contact_audienceis required whenanchoris"people"and optional whenanchoris"properties".
⌘I