# API Rate Limit

**URL:** <https://community.hubspot.com/t/api-rate-limit/63587>\
**Category:** APIs & Integrations\
**Tags:** workflows\
**Created:** [August 23, 2022, 7:14pm UTC](https://community.hubspot.com/t/api-rate-limit/63587 "2022-08-23T19:14:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RZia](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@RZia](https://community.hubspot.com/u/RZia)\
**Post date:** [August 23, 2022, 7:14pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/1 "2022-08-23T19:14:07Z")

</div>

Hi,

I am working on a way to store how many contacts meet a certain criteria per day in some record that I can report on. More specifically, I am counting the total number of contacts with an active membership property per day. I want to then store that daily value somewhere permanant so I can report on it and see daily fluctuations. I haven’t seen a direct way to do this, so I am open to any recommendations, but I made some custom code actions to have a workaround for this. I am creating a custom object record called time\_series\_metrics daily to store the the total value of contacts that meet the criteria for that day. I have gotten everything working to the point where I can increment the total in the custom storage record using API calls in the Hubspot custom code actions in a daily recurring workflow that enrolls contacts if their membership is active. However, since the workflow it is in is scheduled to run daily, it bulk enrolls contacts at the same time and maxes out the API call rate limit per second. Is there any way to slow down workflow enrollment or a whole other approach to solving this problem.

Thanks

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [August 23, 2022, 8:46pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/2 "2022-08-23T20:46:13Z")

</div>

Are you saying you are trying to count the number of contacts who have a specific property value?

---

<div class="post-metadata">

**Author:** ![RZia](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@RZia](https://community.hubspot.com/u/RZia)\
**Post date:** [August 23, 2022, 8:47pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/3 "2022-08-23T20:47:48Z")

</div>

Yes, I want to count the number of contacts who have a specific property value and also store that value daily.

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [August 23, 2022, 8:50pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/4 "2022-08-23T20:50:54Z")

</div>

I’m pretty sure you could use the [search API](https://developers.hubspot.com/docs/api/crm/search). Assuming you get the search filter right, there is a property returned called “total” which would be the total number of records. Seems like that total is the number you want.

Example this will tell you the total number of contacts who have an email address:

```lia-code-sample
curl --location --request POST 'https://api.hubapi.com/crm/v3/objects/contacts/search' \
--header 'Authorization: Bearer xxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
 "filters": [
 {
 "propertyName": "email",
 "operator": "HAS_PROPERTY"
 }
 ]
}'

```

The result being:

```lia-code-sample
{
 "total": 11,
 "results": [...]
}

```

---

<div class="post-metadata">

**Author:** ![RZia](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@RZia](https://community.hubspot.com/u/RZia)\
**Post date:** [August 23, 2022, 8:56pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/5 "2022-08-23T20:56:34Z")

</div>

I don’t seem to see that specific total property in the docs, would I just specify “total” in the return properties portion of the body for the POST request?

 ![Screen Shot 2022-08-23 at 4.56.00 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/8/8d9e77085fcb81dc26a16f4d9b5f924541ed3103.png)

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [August 23, 2022, 8:59pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/6 "2022-08-23T20:59:21Z")

</div>

The example result is listed with each object. If you look at the contacts API you can see an example of the search endpoint and there you can see the total in the result data.

---

<div class="post-metadata">

**Author:** ![RZia](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@RZia](https://community.hubspot.com/u/RZia)\
**Post date:** [August 23, 2022, 9:01pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/7 "2022-08-23T21:01:58Z")

</div>

Great , this works! Thank you.

---

<div class="post-metadata">

**Author:** ![RubenBurdin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rubenburdin/32/75212_2.png) [@RubenBurdin](https://community.hubspot.com/u/RubenBurdin)\
**Post date:** [October 30, 2025, 5:45pm UTC](https://community.hubspot.com/t/api-rate-limit/63587/8 "2025-10-30T17:45:45Z")

</div>

Nice workaround, @RZia

that’s actually a clever way to snapshot metrics over time. If you want to avoid hitting rate limits on bulk workflows, using the CRM Search API exactly as LeeBartelme showed is the right path. The “total” value is always part of the response metadata, so you don’t need to request it explicitly

([Search the CRM - HubSpot docs](https://developers.hubspot.com/docs/api-reference/search/guide) )

For storing the daily count, consider a scheduled external job that calls this search endpoint once per day and writes the total to a custom object or external database via the Custom Objects API ([Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api-reference/crm-custom-objects-v3/guide) )

That way, you skip mass enrollments and API bursts from HubSpot workflows.

In 2025, I’ve seen more teams pair this pattern with a small sync layer like Stacksync, which logs metrics to a database automatically each day without running into HubSpot’s per-second API ceilings handy for keeping historical counts aligned without throttling headaches.
