Hey guys, i am struggling to get all of the contacts that I've searched with http api in hubspot crm. I see the total contacts but just getting the 10 results. I saw that we can use pagination but is there a way to loop through the http api column? How do we do that in clay?
๐ค You've caught us outside of our support hours (9am-9pm EST), but don't worry - we'll be back in touch within 24 hours (often sooner!). If you haven't already, please include the URL of your table in the thread below so that we can help you as quickly as possible!
Pass a limit param in the body, you can get max of 100 in one call
{
"filterGroups": [
{
"filters": [
{
"propertyName": "associations.company",
"operator": "EQ",
"value": "123"
}
]
}
],
"properties": ["email", "firstname", "lastname", "phone", "jobtitle"],
"limit": 100
}
Then if you want to pull next 100 you need to pass after param do this
{
"filterGroups": [
{
"filters": [
{
"propertyName": "associations.company",
"operator": "EQ",
"value": "123"
}
]
}
],
"properties": ["email", "firstname", "lastname", "phone", "jobtitle"],
"limit": 100,
"after":100
}
and so one.
Thanks Muhammed, For the second batch do i need to create another column for http api? If not how do i store the values?
Yes, you have to create another column
OR you can keep editing the same column by changing the parameters (not recommended)
Is it a good use if i make limit 5000 like a huge number and get all of them at once no need to use another request?
Halil F. that is not how API works, it wont return more than 100 at one time regardless you put 5K or 10K in the limit
Oh i see, it says 200 in the error.
Than i should make another column or narrow down by filters, thanks
Yes, narrow down by filters or make another api call. In this case I think you can get 200 per api call See if you are able to do so.
You might hit a clay cell character limit as well if you try to pull 200 contacts as well but see what works with your usecase
Hi Halil! Thanks for jumping in Muhammad! Nice job. If you hit a cell limit, you have to filter for "Field Paths to Return" within the HTTP integration. Let me know the issue still persists and happy to look at it :) https://downloads.intercomcdn.com/i/o/w28k1kwz/1228636804/bbfbc38fab46953ae1c8a9549962/Berrycast_WYidh545DS.png?expires=1729851300&signature=f14fe324162d4ab410aa4e55f696dd4b42e1413d26fe47cea47b6d98b7c8f602&req=dSIlHs99m4lfXfMW1HO4zZiFKd8PIQ1xPzHwYqM9lYjOMspe%2BTn8VtVqz38p%0ADXpL%0A
We haven't heard back from you in a bit, so we're going to go ahead and close things out here - feel free to let us know if you still need something!