> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liveohana.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate limits

> How many requests you can make, and how to handle 429 responses.

Each host profile can make **120 requests per minute**. The limit is shared by every API key on the profile, so creating more keys doesn't raise it.

At 100 bookings per page, that's enough to page through 12,000 bookings a minute. Most integrations will never reach it.

## Rate limit headers

Every authenticated response, including errors, reports where you stand in the current one-minute window:

| Header | Meaning |
| - | - |
| `X-RateLimit-Limit` | Requests allowed per window. |
| `X-RateLimit-Remaining` | Requests left in the current window. |
| `X-RateLimit-Reset` | When the window resets, as a Unix timestamp in seconds. |

## When you hit the limit

Requests over the limit return `429` with the `rate_limited` error code. The `Retry-After` header gives the number of seconds to wait before trying again.

```json theme={null}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit of 120 requests per minute exceeded. Retry after the `Retry-After` header."
  }
}
```

Wait at least `Retry-After` seconds, then retry. If you sync on a schedule, spread requests out rather than sending them in bursts, and use [`updated_since`](https://docs.liveohana.ai/pagination#syncing-changes) so each sync only fetches bookings that changed.

```javascript theme={null}
async function ohanaGet(url) {
  for (let attempt = 0; attempt < 5; attempt++) {
    const response = await fetch(url, {
      headers: { Authorization: `Bearer ${process.env.OHANA_API_KEY}` },
    });
    if (response.status !== 429) return response;
    const waitSeconds = Number(response.headers.get("Retry-After") ?? 60);
    await new Promise((resolve) => setTimeout(resolve, waitSeconds * 1000));
  }
  throw new Error("Ohana API rate limit: gave up after 5 attempts");
}
```

## Per-IP limit

There's also a much higher per-IP limit that protects the API from floods of unauthenticated traffic. It also returns `429 rate_limited` with `Retry-After`, but no `X-RateLimit-*` headers. Normal integrations, including vendors syncing many host profiles from one server, shouldn't reach it.

> [!NOTE]
>
> Need a higher limit? Email [support@liveohana.ai](mailto:support@liveohana.ai) with your use case.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.