# Difficulty detecting duplicate Contacts

**URL:** <https://community.hubspot.com/t/difficulty-detecting-duplicate-contacts/126587>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [February 21, 2025, 3:31pm UTC](https://community.hubspot.com/t/difficulty-detecting-duplicate-contacts/126587 "2025-02-21T15:31:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![MichaelMa](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@MichaelMa](https://community.hubspot.com/u/MichaelMa)\
**Post date:** [February 21, 2025, 6:08pm UTC](https://community.hubspot.com/t/difficulty-detecting-duplicate-contacts/126587/2 "2025-02-21T18:08:34Z")

</div>

I’m confused on whether you’re querying the list of user emails via Batch API or Search API since you mention both.

If you are using Search API, you can use filter groups and the IN operator (and put the emails in an array) on a property to run the search. I’m not sure if there’s a limit on how many items can be in an array.

Eg,

This has two OR filters that searches the email field and work\_email field and will return records if any result is true.

```lia-code-sample
{
 "filterGroups": [
 {//Searches the email field
 "filters": [
 {
 "propertyName": "email",
 "operator": "IN",
 "values": ["bh@hubspot.com", "emailmaria@hubspot.com"]
 }
 ]
 },
 {//Searches the work_email field
 "filters": [
 {
 "propertyName": "work_email",
 "operator": "IN",
 "values": ["red@hubspot.com", "blue@hubspot.com"]
 }
 ]
 }
 ]
}

```

I do agree with you that Batch API errors could be a lot more useful.

---

_[View the full topic](https://community.hubspot.com/t/difficulty-detecting-duplicate-contacts/126587)._
