Skip to main content
POST
/
v1
/
activity
/
search
curl -X POST "https://api.v2.dealmachine.com/v1/activity/search" \
  -H "Authorization: Bearer dm_sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "equity",
    "types": ["search_people", "search_properties"],
    "page": 1,
    "per_page": 25,
    "sort": [
      { "field": "relevance", "direction": "desc" }
    ]
  }'
{
  "data": [
    {
      "activity_id": "act_e5f6g7h8",
      "type": "search_properties",
      "created_at": "2025-06-20T11:45:00Z",
      "matched_on": ["filters: equity_percent", "fields: equity_percent"],
      "request_summary": {
        "locations": [
          { "type": "county", "code": "48201" },
          { "type": "county", "code": "48113" }
        ],
        "filters": [
          { "filter_id": "property_type_id", "operator": "contains_any", "value": [1] },
          { "filter_id": "equity_percent", "operator": "greater_than_or_equal", "value": 40 }
        ],
        "fields": ["estimated_value", "equity_percent", "owner_name"]
      },
      "result_summary": {
        "total_results": 3412,
        "total_pages": 137,
        "pages_retrieved": 5,
        "credits_used": 125,
        "entity_count": {
          "people": 0,
          "properties": 125
        }
      }
    },
    {
      "activity_id": "act_r7s8t9u0",
      "type": "search_people",
      "created_at": "2025-06-28T14:22:00Z",
      "matched_on": ["fields: estimated_value"],
      "request_summary": {
        "locations": [
          { "type": "state", "code": "TX" }
        ],
        "filters": [
          { "filter_id": "estimated_value", "operator": "greater_than", "value": 500000 },
          { "filter_id": "has_phone", "value": true }
        ],
        "fields": ["full_name", "phones", "estimated_value"]
      },
      "result_summary": {
        "total_results": 1250,
        "total_pages": 50,
        "pages_retrieved": 3,
        "credits_used": 75,
        "entity_count": {
          "people": 75,
          "properties": 68
        }
      }
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_results": 2,
    "total_pages": 1,
    "has_next_page": false,
    "has_previous_page": false
  }
}
Query your past searches and enrichments. Filter by activity type, date range, or specific entity IDs — or use free-text search to find activities by filter names, location codes, enrichment inputs, and more. This endpoint does not consume credits.

Body Parameters

query
string
Free-text search across your activity history. Matches against filter IDs, filter values, location codes, enrichment inputs (email addresses, phone numbers, addresses), and requested field names.Examples: "estimated_value", "TX", "john@example.com", "48201", "equity", "555-123-4567", "1200 Barton Springs"The search is case-insensitive and matches partial strings — searching "equity" matches activities that used the equity_percent filter.
types
string[]
Filter by activity type. Omit to include all types. See Activity Types for the full list.Options: search_people, search_properties, count_people, count_properties, enrich_email, enrich_phone, enrich_address, enrich_latlng, enrich_apn
date_range
object
Filter to activities within a date range. Both fields are optional — omit start for “all time before end”, omit end for “all time after start”.
entity_ids
string[]
Find activities that returned specific entity IDs. Pass dm_person_id values (e.g., "per_x1y2z3") or dm_property_id values (e.g., "prop_a1b2c3"). Activities matching any of the provided IDs are returned.This is useful for answering “have I already accessed this person/property?”
page
integer
default:1
Page number (min: 1).
per_page
integer
default:25
Results per page (min: 1, max: 100).
sort
array
Array of sort objects. Defaults to [{ "field": "created_at", "direction": "desc" }] (most recent first).

curl -X POST "https://api.v2.dealmachine.com/v1/activity/search" \
  -H "Authorization: Bearer dm_sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "equity",
    "types": ["search_people", "search_properties"],
    "page": 1,
    "per_page": 25,
    "sort": [
      { "field": "relevance", "direction": "desc" }
    ]
  }'
{
  "data": [
    {
      "activity_id": "act_e5f6g7h8",
      "type": "search_properties",
      "created_at": "2025-06-20T11:45:00Z",
      "matched_on": ["filters: equity_percent", "fields: equity_percent"],
      "request_summary": {
        "locations": [
          { "type": "county", "code": "48201" },
          { "type": "county", "code": "48113" }
        ],
        "filters": [
          { "filter_id": "property_type_id", "operator": "contains_any", "value": [1] },
          { "filter_id": "equity_percent", "operator": "greater_than_or_equal", "value": 40 }
        ],
        "fields": ["estimated_value", "equity_percent", "owner_name"]
      },
      "result_summary": {
        "total_results": 3412,
        "total_pages": 137,
        "pages_retrieved": 5,
        "credits_used": 125,
        "entity_count": {
          "people": 0,
          "properties": 125
        }
      }
    },
    {
      "activity_id": "act_r7s8t9u0",
      "type": "search_people",
      "created_at": "2025-06-28T14:22:00Z",
      "matched_on": ["fields: estimated_value"],
      "request_summary": {
        "locations": [
          { "type": "state", "code": "TX" }
        ],
        "filters": [
          { "filter_id": "estimated_value", "operator": "greater_than", "value": 500000 },
          { "filter_id": "has_phone", "value": true }
        ],
        "fields": ["full_name", "phones", "estimated_value"]
      },
      "result_summary": {
        "total_results": 1250,
        "total_pages": 50,
        "pages_retrieved": 3,
        "credits_used": 75,
        "entity_count": {
          "people": 75,
          "properties": 68
        }
      }
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_results": 2,
    "total_pages": 1,
    "has_next_page": false,
    "has_previous_page": false
  }
}

Response Fields

data

An array of activity records, each representing a past API request.
FieldTypeDescription
activity_idstringUnique activity identifier (e.g., act_r7s8t9u0). Use this with Get Activity for full details.
typestringActivity type. See Activity Types.
created_atstringISO 8601 timestamp of when the request was made.
matched_onstring[]Only present when query is provided. Shows which parts of the request matched the search term (e.g., "filters: equity_percent", "locations: TX", "input: john@example.com").
request_summaryobjectSummary of the original request parameters (see below).
result_summaryobjectSummary of what the request returned (see below).

request_summary

A condensed view of what was sent in the original request. The shape varies by activity type. For search types (search_people, search_properties, count_people, count_properties):
FieldTypeDescription
locationsarrayThe location objects used in the search
filtersarrayThe filter objects with filter_id, operator, and value
fieldsstring[]The field IDs requested (empty array if defaults were used)
For enrichment types (enrich_email, enrich_phone, enrich_address, enrich_latlng, enrich_apn):
FieldTypeDescription
enrichment_typestringThe enrichment method (email, phone, address, latlng, apn)
items_submittedintegerNumber of items in the original request data array
fieldsstring[]The field IDs requested

result_summary

A summary of the results and cost. The shape varies slightly by activity type. For search types:
FieldTypeDescription
total_resultsintegerTotal matching records across all pages
total_pagesintegerTotal pages available
pages_retrievedintegerHow many pages you actually fetched (across multiple requests with different page values)
credits_usedintegerTotal credits consumed across all pages retrieved
entity_count.peopleintegerUnique people returned
entity_count.propertiesintegerUnique properties returned
For enrichment types:
FieldTypeDescription
total_resultsintegerTotal matched entities
items_matchedintegerItems that found a match
items_unmatchedintegerItems that did not match
credits_usedintegerCredits consumed
entity_count.peopleintegerUnique people returned
entity_count.propertiesintegerUnique properties returned
For count types:
FieldTypeDescription
total_resultsintegerThe count returned
credits_usedintegerAlways 0 (counts are free)

pagination

FieldTypeDescription
pageintegerCurrent page number
per_pageintegerResults per page
total_resultsintegerTotal activity records matching your query
total_pagesintegerTotal pages available
has_next_pagebooleanWhether more pages exist after this one
has_previous_pagebooleanWhether pages exist before this one

The query parameter searches across the full request parameters of every activity. This is the fastest way to find a past search when you remember what filters or inputs you used, but not the exact date or activity ID.

What Gets Searched

Activity TypeSearchable Fields
SearchesFilter IDs (estimated_value, equity_percent, has_phone…), filter values, location types and codes (TX, 48201, 90210), requested field names
EnrichmentsEnrichment inputs (email addresses, phone numbers, street addresses, APNs, coordinates), requested field names
All typesActivity type name

Search Behavior

  • Case-insensitive"equity" matches equity_percent
  • Partial matching"barton" matches "1200 Barton Springs Rd"
  • Multi-term"TX equity" matches activities that contain both TX and equity anywhere in the request
  • Combinable — use query together with types, date_range, and entity_ids to narrow results further

Examples

Find all searches that used an equity filter:
{ "query": "equity" }
Find enrichments where you looked up a specific email:
{ "query": "john.smith@example.com", "types": ["enrich_email"] }
Find searches in Texas from last month:
{
  "query": "TX",
  "types": ["search_people", "search_properties"],
  "date_range": {
    "start": "2025-06-01T00:00:00Z",
    "end": "2025-06-30T23:59:59Z"
  }
}
Find any activity involving a specific address:
{ "query": "1200 Barton Springs" }
When using query, sort by relevance to get the best matches first. Without query, relevance sort is not available and the default sort is created_at descending.

Searching by Entity ID

The entity_ids parameter lets you find all past activity that involved a specific person or property. This is especially useful for:
  • Deduplication — check if you’ve already accessed an entity before running a new search
  • Audit trail — see every request that touched a specific entity
  • Cost optimization — entities accessed within the same billing period are free on repeat
curl -X POST "https://api.v2.dealmachine.com/v1/activity/search" \
  -H "Authorization: Bearer dm_sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_ids": ["per_x1y2z3", "prop_a1b2c3"]
  }'
This returns all activities where either per_x1y2z3 or prop_a1b2c3 appeared in the results. The match is OR logic — activities matching any of the provided IDs are included.

Notes

  • This endpoint does not consume credits.
  • All parameters are optional. An empty request body {} returns your most recent activity, sorted newest first.
  • Activity is scoped to your organization. All API keys under the same account see the same history.
  • The request_summary is a condensed view. Use Get Activity for the full, unmodified request parameters.
  • Results are capped at 12 months of history.