Skip to main content

Concept

Deduplication & match types

Match types decide what counts as the "same record." They drive de-duplication inside a single query, scoping with dedupe_within, and cross-audience suppression in audience groups.

Picking a match type

Pass select_type on any counting or querying endpoint to collapse duplicate records before they're returned. Omit it to receive every matching record, duplicates and all. The valid values depend on which data source you're hitting: consumer-family sources expose person-level keys, business-family sources expose firmographic keys.

Count one record per household
curl -X POST https://app.via.tools/api/v1/data/count \\
  -H "X-Api-Token: $VIA_API_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
    "data_source_id": 4,
    "filters": [{ "field": "state", "values": ["TX"] }],
    "select_type": "last_address_zip"
  }'

Consumer-family match types

Use these on Consumer (4), Real Property (5), Auto (1), and Timeshare (6).

select_typewhat counts as a duplicate
address_zipOne record per mailing address + zip. "One per address."
last_address_zipOne record per surname + address + zip. "One per household."
name_address_zipOne record per first + last + address + zip. "One per individual."
phoneOne record per phone number.
emailOne record per email address.

Business-family match types

Use these on Business (2) and Business Email (3).

select_typewhat counts as a duplicate
mkeyOne record per company + address + zip. The canonical "one per business location" key.
individualOne record per first + last + company + address + zip, the same person at the same employer location.
phoneOne record per phone number.
emailOne record per email address.

Scoping with dedupe_within

dedupe_within narrows the dedupe to a secondary key. Common use: keep one record per owner per zip, even when the owner shows up across many properties.

One mortgage owner per secondary zip
{
  "data_source_id": 5,
  "select_type": "name_address_zip",
  "dedupe_within": "secondary_zip",
  "filters": [{ "field": "mortgage_lender", "values": ["Wells Fargo"] }]
}

Cross-audience dedup with audience groups

To suppress duplicates across several saved audiences, wrap them in an audience group. The group's match_type picks the dedupe key; order decides priority. Audiences earlier in the array are counted first, and the keys they consume are then suppressed from later audiences.

Group two audiences, dedup by address
{
  "name": "Spring 2026 mailing",
  "match_type": "address_zip",
  "order": [12, 19]
}

The response includes per-audience counts after suppression, plus an updating_count flag while recalculation is in flight. Groups must contain at least two audiences. A single-audience group is destroyed automatically.

Group count response
{
  "id": 47,
  "match_type": "address_zip",
  "counts": { "12": 1842033, "19": 198042 },
  "updating_count": false
}

Used by