Hi there!
Quick question.
Does anyone know how to improve API requests for the contacts endpoint?
LInk: Search the CRM - HubSpot docs
I’ve been running into issues because I have hundreds of thousands of contacts, and with the page limit capped at 200, I need to paginate through them and make a very large number of requests.
I tried filtering but there isn’t an specific filter that helps me out here
Thanks!
Hey @MFerrari5,
Welcome to the Community!
Currently the limits on the search endpoint are the following:
- 200 records/page max
- 10,000 total results per query (paging beyond returns 400)
- 5 requests/second/account
That said, I’d like to tag in some of our Top Contributors to see if they have any tips and tricks on this!
Hey @SteveHTM, @Josh, @Mike_Eastwood -- Do you have any suggestions for @MFerrari5 on this?
Thanks in advance!
Sam, Community Manager
How often do you need to pull all the contacts? It’s probably easier to do an export and prefil your database instead of trying to API through all of them.
I suppose you could use the export API to generate an export and then ingest that file if you need to constantly retrieve all the records.
Hi @MichaelMa @SamTassey
In short, our process relies on the API. We retrieve contacts updated in the last three days, which results in approximately 30,000 contacts. Due to the 200-contact limit per request, this requires making over 150 API calls.
So if there is like a field we could use to filter out some inactive contacts would be great
Thanks!
Would it be possible to simply run the API more often so that it has to query less in a single time?
How much data do you need from the contact record? You might be able to pull a bit more records using GraphQL (500 record limit, I believe?).
Have you looked at creating a web hook and have HubSpot send the contact changes to your endpoint in “real-time” instead of doing an API pull?