API RecipesBy Zapinner1 min read
Deduplicate a Lead List
Collapse exact and near-duplicate leads into one record each, with a confidence score on every match.
Problem
A lead list has the same person listed more than once under slightly different spellings. You want one clean record per person before importing.
Input
json
[
{ "name": "Jon Smith", "email": "j.smith@acme.io" },
{ "name": "John Smith", "email": "j.smith@acme.io" }
]Request
bash
curl -X POST https://zapinner.com/api/v1/dedupe \
-H "Authorization: Bearer $ZAPINNER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "records": [ ... ], "fields": ["name", "email"] }'Output
json
{ "duplicates": [ { "records": [0, 1], "confidence": 0.94 } ] }Explanation
Dedupe scores candidate pairs on the fields you specify and returns groups with a confidence value. Normalizing identity fields first makes matching more accurate.
Error handling
Validation failures (empty records, non-primitive values) return a 400 with a reason and are never charged. Handle the structured error and fix the payload.
Production considerations
- Choose a confidence threshold for auto-merge; send the borderline band to human review.
- Use survivorship to keep the best value per field when merging.
Related APIs
Match (one-to-many lookup at write time), Repair (dedupe as part of a full clean).
Fix messy data before it breaks your workflow.
Start free with 1,000 credits a month across every capability — no credit card required.
