Search Contacts by custom property


#1

I have just begun to look, so forgive me if the answer is obvious.

Is there a way to search contacts by a custom property using the Contact API?


#2

Hi @jeffrey.meeks,

It’s not currently possible to search by custom property via the HubSpot APIs. The closest you could come is to use the batch contacts APIs and filter the results based on your custom property.


#3

Hi @Derek_Gervais,

This is an inefficient way to do it having knowing that for example if I have more than 10K contacts, and the result I expect to get are just 2 contacts.

Is this still unavailable? is there anyway to do this a little easier?

Thank you guys!


#4

Hi @Desarrollo4Color,

This still isn't possible, though this is something that product would like to implement in the future; check out the following HubSpot Ideas post:


#5

Also if you try fetch all existing contacts and filter - the API Get all contacts - only allows a maximum count of 100 which is an issue as i want ALL contacts.


#6

Hi again, @carolynebrownlee.

The Get all contacts endpoint can return all records, but only 100 per page/call. As the description notes:

A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page.

After receiving the first set of records (up to 100), you will place the vid-offset value returned in the vidOffset query parameter in a second request to get the next set. Rinse and repeat until "has-more": false is returned.