# Increase rate limit for API?

**URL:** https://meta.discourse.org/t/increase-rate-limit-for-api/296032
**Category:** Development
**Tags:** rest-api
**Created:** [February 20, 2024, 8:47am UTC](https://meta.discourse.org/t/increase-rate-limit-for-api/296032 "2024-02-20T08:47:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Shauny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shauny/32/362012_2.png) [@Shauny](https://meta.discourse.org/u/Shauny)
#### Post date: [February 20, 2024, 8:47am UTC](https://meta.discourse.org/t/increase-rate-limit-for-api/296032/1 "2024-02-20T08:47:55Z")

</div>

Is there a rate limit for posting to the API?

I have set up my site to grant badges to users on the forum based on stuff they achieve on my main site, and I am doing bulk API calls to add in the historical ones now as it’s a new feature.

However when I set it off, it may add 30 or more badges for a user, and it only does some of those then I need to trigger it again to get the rest.

There seems to be a rate limit?

Can I increase this limit somewhere? Maybe just for calls from my website?

Thanks

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [February 20, 2024, 4:27pm UTC](https://meta.discourse.org/t/increase-rate-limit-for-api/296032/2 "2024-02-20T16:27:02Z")

</div>

Maybe have a look at this topic:

> [@Available settings for global rate limits and throttling](https://meta.discourse.org/t/available-settings-for-global-rate-limits-and-throttling/78612):
>
> Discourse ships with 3 different global rate limits that can be configured by site admins. Global per-ip rate limits These limits apply to every unique IP address that hits the Discourse application. (files that are served directly from the filesystem or the CDN are excluded) By default this rate limit is enabled, you may disable it or set it to a reporting mode. DISCOURSE\_MAX\_REQS\_PER\_IP\_MODE : default block, this rate limit applies out of the box. (other options are warn, warn+block, and n…

I think API rate limits are here:

> <https://github.com/discourse/discourse/blob/1f34f653bfb6ccb39a4f4f8085b07e9d94389e6f/config/discourse_defaults.conf#L200-L216>

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [February 20, 2024, 5:34pm UTC](https://meta.discourse.org/t/increase-rate-limit-for-api/296032/3 "2024-02-20T17:34:57Z")

</div>

So if you’re on a hosted plan somewhere you’ll just need to add a one-second delay between your calls to stay under the limit:

> [@Lilly](#):
>
> `max_admin_api_reqs_per_key_per_minute = 60`
