Check API limits reached in the past 2 days


#1

Hi there,

I was wandering if there is a way to check API usage in the past. I know that you released a new endpoint that lets us check your API usage for the current day.

I think we reached out limit between Thursday and Friday but I cannot find a way to check this out!

Can you help us on this? Is it also possible to check which integration has been responsible for this?

Thanks a lot!

Kind regards,
Riccardo


#2

Hi @Riccardo_Pisani,

It’s not currently possible to check historical API usage for a portal’s API key. If you direct message me the Hub ID of the portal you’re referring to, I can take a look at your usage for Thursday & Friday to see if I notice anything. In general, this usage is only related to integrations that use your portal’s API key, so any integrations that appear in your Integrations page will not contribute to the daily usage limit.


#3

Hi there, I have sent thru the ID.
I look forward to it.

Thanks a lot,
Riccardo


#4

Hi Darek,

at which time does this counter resets once you reach the API calls limit? Also do we have the possibility to increasing the API calls daily limit?

Thanks.

Kind regards,
Riccardo


#5

Hi @Riccardo_Pisani,

The daily limit resets at midnight in your portal’s timezone. If you’re regularly going over your limit and looking to get more calls per day, you can look into the API add on. You can find the pricing and details on our software pricing page by clicking to view add ons and clicking ‘more add ons’:

https://www.hubspot.com/pricing/marketing


#6

Hi Derek, yes, sure! I’ll look into the add-on.

Thanks
Riccardo


#7

Hey Derek, are there any ways to be notified when we reach i.e the 80 of the total amount of calls?


#8

Hi @Riccardo_Pisani,

There isn’t currently a way to set up notifications, but in theory you could poll the endpoint mentioned above periodically to keep tabs on your usage.


#9

Hi Derek - Is the Workflow tool impacted when we reach the api limit?

Does WFs keep on working if we reach the API limit?

Riccardo


#10

Hi @Riccardo_Pisani,

None of the HubSpot tools are impacted by hitting your API limit. It will only affect incoming requests.


#11

Hi there Derek,

we are again facing some issues with your API Quota -

We don't understand when it happened and since when we are not getting more data from our website integration - Could you help me understand this?

Thanks a lot.

Kind regards,
Riccardo


#12

Hi @Riccardo_Pisani,

I'm seeing roughly 600,000 requests coming into that portal over the past couple of days. The vast majority of them are to the contacts API; specifically, the batch update endpoint. Have you run any imports or started using any integrations that use your API key lately?


#13

Yes we did, we were interested in understand:

  1. the day we reached the limit
  2. from when HubSpot stopperd synching

We need this to put in place a recovery process.

Thanks a ton Derek

Best regards,
Riccardo


#14

Hi @Riccardo_Pisani,

So it looks like you initially reached the limit on March 14th, and continued to hit the limit through the 15th. Once you hit the 40k limit, all further requests would fail. At midnight the next day, your limit would reset, so you'd get another 40k requests. It also appears that you will occasionally hit the per-second limit, which would contribute to your daily limit.

  1. You first reached the limit on March 14th, and reached it again on the 15th
  2. Requests would have started failing once you hit the limit on the 14th (roughly 10am)

As a side note, requests that hit the per-second limit will still count toward your daily limit; you'll want to make sure that you consistently keep your requests to below 10 requests per second in order to make full use of your daily 40k.


#15

Hi there Derek, thanks a lot for your support on this topic.

Is it possible to know which job is causing this/ also the IP would help a lot is it a Polish one or a Spanish one?

Thanks

Kind regards,
RIccardo


#16

Hi @Riccardo_Pisani,

We don't keep logs for this long, so I'm not able to go back and examine requests from March. I might be able to get the IP address of certain requests, but for requests made with a hapikey that's as much information as we have. OAuth tokens are connected to an app, so we can see which app is making the requests, but hapikeys are portal specific and don't have any information on the entity making the requests. Do you have more recent examples that you'd like me to dig into?


#17

Hi Derek, we have reached the limits several times this quarter as well! like twice per week lately! The IP would be great!

Thanks a lot


#18

Hi @Riccardo_Pisani,

We only have logs going back ~7 days, but from looking at your traffic over the past 7 days I can see a number of rate limit errors. They appear to be per-second rate limit errors, though, not per-day rate limit errors. This means that you're likely making requests to fast (i.e. more than 10 per second) instead of making too many requests overall.

I can also see a very large spike in request traffic at midnight every night; my guess would be that you run one or more jobs every night at midnight, which eats up the biggest chunk of your daily requests. I'd recommend the following:

  • Check your rate limiting implementation to make sure that you're not making more than 10 requests per second (which is the biggest contributor to your rate limit errors)
  • Examine the scripts/jobs you have that run right at midnight; the majority of your request traffic happens between 12am - 1am, so increasing efficiency here would go a long way for both your per-day and per-second limits.