# How to Manage API Call Limits and Quotas in Bubble

- Tool: Bubble
- Difficulty: Intermediate
- Time required: 20-25 min
- Compatibility: All Bubble plans
- Last updated: March 2026

## TL;DR

Managing API call limits in Bubble involves monitoring your workload unit consumption, handling rate limit (429) errors from external APIs gracefully, implementing request queuing with backend workflows, and caching API responses to reduce redundant calls. This tutorial covers tracking your API usage, building retry logic for rate-limited requests, queuing high-volume operations, and knowing when to upgrade your Bubble plan.

## Overview: API Call Limits in Bubble

This tutorial helps you manage both Bubble's internal workload unit limits and external API rate limits. You will learn to monitor usage, handle errors gracefully, and implement patterns that keep your app running smoothly under heavy API usage.

## Before you start

- A Bubble app making API calls via the API Connector
- Basic understanding of Backend Workflows and the API Connector
- Access to your Bubble app's Settings → App Metrics
- Familiarity with HTTP status codes

## Step-by-step guide

### 1. Monitor your current API usage

Go to Settings → App Metrics to view your workload unit consumption. The dashboard shows WU usage over time, broken down by activity type. API calls to external services cost WUs for the outbound request, the data transfer, and any workflow processing. Check the Server Logs tab for individual API call costs. Also log into your external API provider dashboards (OpenAI, Stripe, etc.) to check their rate limit headers and current usage against your plan limits.

**Expected result:** You understand your current API usage patterns and which operations consume the most WUs.

### 2. Handle 429 rate limit errors gracefully

In the API Connector, enable 'Include errors in response and allow workflow actions to continue' on API calls that may be rate-limited. In your workflow after the API call, check if the response status is 429. When a 429 is detected, add a 'Add a pause before next action' step with a delay (start with 5 seconds), then retry the API call. If using backend workflows, re-schedule the same workflow to run after a delay. Always show a user-friendly message like 'Processing, please wait' rather than exposing the raw error.

> Pro tip: Many APIs include a Retry-After header in 429 responses telling you exactly how long to wait before retrying.

**Expected result:** Your app gracefully handles rate limit errors with automatic retry logic instead of failing silently.

### 3. Implement request queuing for bulk operations

For operations that process many items (sending emails to all users, updating many records via API), use a queuing pattern with backend workflows. Instead of making all API calls at once, create a backend workflow that processes one item and then re-schedules itself for the next item with a small delay. Set the delay to respect the API's rate limit — for example, if the limit is 60 requests per minute, schedule each call 1 second apart. Add a termination condition so the workflow stops after processing all items.

**Expected result:** Bulk API operations process items sequentially with rate-limit-respecting delays.

### 4. Cache API responses to reduce redundant calls

Create a Data Type called 'APICache' with fields: endpoint (text), response_data (text), cached_at (date), and expires_at (date). Before making an API call, check if a valid cached response exists: Do a Search for APICache where endpoint = the URL and expires_at > Current date/time. If found, use the cached response. If not, make the API call, save the response to APICache with an appropriate expiration (5 minutes for real-time data, 24 hours for reference data), and return the result. This dramatically reduces both external API calls and WU consumption.

**Expected result:** Frequently requested API data is served from cache, reducing external API calls and WU usage.

### 5. Plan for growth and manage costs

Calculate your projected API usage: multiply your current daily API calls by your expected user growth over the next 3 months. Compare against both Bubble's WU limits and your external API plan limits. If approaching Bubble WU limits, consider: adding a WU package ($29 for 200,000 WUs), upgrading your plan, or optimizing heavy workflows. If approaching external API limits, upgrade the API plan or implement more aggressive caching. Set up WU alerts in Bubble at 75 percent of your allocation to get early warnings.

**Expected result:** You have a capacity plan for API usage and alerts configured to warn before hitting limits.

## Complete code example

File: `Workflow summary`

```text
API CALL MANAGEMENT SUMMARY
=====================================

MONITORING:
  Settings → App Metrics → WU dashboard
  Logs tab → Server logs → per-call WU cost
  External API dashboards → rate limit usage
  Set alert at 75% WU allocation

429 ERROR HANDLING:
  API Connector → Enable error responses
  Workflow: Check response status
    If 429 → Pause 5 seconds → Retry
    If still 429 → Schedule retry in 30 sec
  User-facing: Show 'Processing' message

REQUEST QUEUING:
  Backend workflow: process_single_item
    1. Make API call for one item
    2. Schedule next item with delay
    3. Delay = 60/rate_limit seconds
    4. Terminate when list is empty
  Trigger: Schedule on a List from frontend

RESPONSE CACHING:
  APICache Data Type:
    endpoint, response_data, cached_at, expires_at
  Before API call:
    Search cache (endpoint + not expired)
    If found → use cached response
    If not → call API → save to cache
  TTL examples:
    Real-time data: 5 minutes
    Reference data: 24 hours
    Static data: 7 days

COST PLANNING:
  Monthly WU estimate = daily calls × 30
  Compare vs plan limit
  Options if exceeding:
    1. Optimize (cache, reduce calls)
    2. Add WU package ($29/200K)
    3. Upgrade plan
```

## Common mistakes

- **Making the same API call multiple times on a single page load** — Multiple elements referencing the same external API data source trigger separate API calls, multiplying costs Fix: Cache the API response in a custom state on page load, then reference the custom state from multiple elements
- **Not handling rate limit errors, causing silent failures** — When a 429 response is not caught, the workflow continues with empty data, leading to broken features and confused users Fix: Enable error handling on API calls and add conditional logic to detect and retry rate-limited requests
- **Processing bulk operations synchronously without delays** — Sending 100 API calls instantly triggers rate limiting and most calls fail Fix: Use backend workflow queuing with delays between calls to respect rate limits

## Best practices

- Monitor WU consumption weekly in Settings → App Metrics
- Cache external API responses to avoid redundant calls
- Handle 429 errors with automatic retry and exponential backoff
- Queue bulk API operations with backend workflows
- Set WU usage alerts at 75% of your plan allocation
- Use Option Sets for data that does not need API calls
- Review and optimize your heaviest API-consuming workflows quarterly

## Frequently asked questions

### What happens when I hit Bubble's WU limit?

If you have overages disabled, Bubble takes your app offline. If overages are enabled, you are charged $0.30 per 1,000 additional WUs. Set up alerts to avoid surprises.

### How many WUs does an API call cost?

A typical API call costs 1-5 WUs depending on the amount of data transferred and any workflow processing. Complex calls with large responses cost more.

### Can I cache API responses without a separate Data Type?

For short-term caching on a single page, use custom states. For caching across pages and sessions, a Data Type is necessary.

### What is the difference between Bubble rate limits and external API limits?

Bubble limits are measured in WUs (server resource consumption). External API limits are set by the API provider, typically measured in requests per minute or per month.

### How do I know which API calls are most expensive?

Check the Server Logs tab in Bubble. Each logged action shows its WU cost. Sort by WU cost to find your most expensive API operations.

### Can RapidDev help optimize API usage in my Bubble app?

Yes. RapidDev can audit your API usage, implement caching strategies, build queuing systems, and optimize workflows to reduce both WU consumption and external API costs.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/manage-api-call-limits-quotas-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/manage-api-call-limits-quotas-bubble
