# CRM API Objects Contacts → Error when adding multiple filters (4 or more filters)

**URL:** <https://community.hubspot.com/t/crm-api-objects-contacts-error-when-adding-multiple-filters-4-or-more-filters/24999>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [September 3, 2020, 12:03pm UTC](https://community.hubspot.com/t/crm-api-objects-contacts-error-when-adding-multiple-filters-4-or-more-filters/24999 "2020-09-03T12:03:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marinamele](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marinamele/32/33328_2.png) [@marinamele](https://community.hubspot.com/u/marinamele)\
**Post date:** [September 3, 2020, 12:03pm UTC](https://community.hubspot.com/t/crm-api-objects-contacts-error-when-adding-multiple-filters-4-or-more-filters/24999/1 "2020-09-03T12:03:46Z")

</div>

Hi,

I’m using the CRM API → Objects → Contacts → Search endpoint (/crm/v3/objects/contacts/search)  
I didn’t have any errors when performing a filter serach with 3 conditions. However, today I tried 4 conditions and it faild with the following error:

Invalid input JSON on line 1, column 319: Cannot construct instance of `com.hubspot.inbounddb.publicobject.core.v3.sea…

I’ve checked that the error disappears if sending only 3 of these 4 conditions or filters.

Can you help me? Thanks!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [September 4, 2020, 5:22am UTC](https://community.hubspot.com/t/crm-api-objects-contacts-error-when-adding-multiple-filters-4-or-more-filters/24999/2 "2020-09-04T05:22:54Z")

</div>

Hey @marinamele,

As stated on the [documentation](https://developers.hubspot.com/docs/api/crm/search),

> When multiple `filters` are provided within a `filterGroup`, they will be combined using a logical `AND` operator. When multiple `filterGroup`s are provided, they will be combined using a logical `OR` operator. The system supports a maximum of three `filterGroups` with up to three `filters` each.

---

<div class="post-metadata">

**Author:** ![marinamele](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marinamele/32/33328_2.png) [@marinamele](https://community.hubspot.com/u/marinamele)\
**Post date:** [September 4, 2020, 6:51am UTC](https://community.hubspot.com/t/crm-api-objects-contacts-error-when-adding-multiple-filters-4-or-more-filters/24999/3 "2020-09-04T06:51:11Z")

</div>

Thanks Wendy for your reply!

I think this limit is quite low. I’m filtering contacts between two dates so I’m using 2 filters inside a filterGroup. This lets me with only a filter to narrow my search. And it has to be a property.

Do you know if HubSpot will increment the limit of filters inside a filterGroup?

Thanks!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [September 8, 2020, 3:21am UTC](https://community.hubspot.com/t/crm-api-objects-contacts-error-when-adding-multiple-filters-4-or-more-filters/24999/4 "2020-09-08T03:21:28Z")

</div>

Hey @marinamele,

Currently, I’m not aware of increasing the filter limit as part of our product roadmap.

Having said that, one other suggestion that I have for your team is to [create a list](https://knowledge.hubspot.com/lists/create-active-or-static-lists) within HubSpot and use the [Get contacts in a list | Contact Lists API](https://legacydocs.hubspot.com/docs/methods/lists/get_list_contacts) to retrieve the contacts in a list.
