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.
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).
Business-family match types
Use these on Business (2) and Business Email (3).
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.
{
"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.
{
"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.
{
"id": 47,
"match_type": "address_zip",
"counts": { "12": 1842033, "19": 198042 },
"updating_count": false
}
Used by