# Rate limits (https://docs.getbeel.com/en/api/rate-limits)

120 requests per minute per key, with RateLimit and Retry-After headers.

Each API key can make **120 requests every 60 seconds**, in test and live mode. The count is per key, not per IP address, and includes calls to the [MCP server](/en/api/mcp).

## Headers [#headers]

Every response tells you where you stand:

| Header                | Value                                  |
| --------------------- | -------------------------------------- |
| `RateLimit-Limit`     | Requests allowed in the window (`120`) |
| `RateLimit-Remaining` | Requests left                          |
| `RateLimit-Reset`     | Seconds until the window resets        |

## When you exceed the limit [#when-you-exceed-the-limit]

You get `429` with `type: "rate_limit_error"` and `code: "rate_limit_exceeded"`, plus a `Retry-After` header with the seconds to wait.

```js
async function getbeel(path, init = {}) {
  for (let attempt = 0; attempt < 3; attempt++) {
    const res = await fetch(`https://www.getbeel.com/api/v1${path}`, {
      ...init,
      headers: {
        Authorization: `Bearer ${process.env.GETBEEL_API_KEY}`,
        ...init.headers,
      },
    });

    if (res.status !== 429) return res;

    const wait = Number(res.headers.get('Retry-After') ?? '1');
    await new Promise((resolve) => setTimeout(resolve, wait * 1000));
  }

  throw new Error('Getbeel rate limit: too many retries');
}
```

Requests refused for a missing scope also count towards the limit.

If you need a higher limit, write to us.
