Bridge APIRate limits and pagination

Rate limits and pagination

How many requests a Bridge API key can make, how to tell when you're close to the limit, and how to page through long lists.

Rate limits

Each API key can make 120 requests per minute. Every response includes headers that show where you are:

HeaderMeaning
RateLimit-LimitRequests allowed per minute (120).
RateLimit-RemainingRequests left in the current minute.
RateLimit-ResetSeconds until the limit resets.

Over the limit, requests get a 429 error with the code rate_limited:

{
  "status": "error",
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. The limit is 120 per minute per key."
  }
}

Wait for RateLimit-Reset seconds before trying again. To sync large amounts of data, request 100 items at a time instead of many small requests.

Pagination

GET /bookings returns results in pages. Control the page with two query parameters:

ParameterDefaultMeaning
take50How many results to return, from 1 to 100.
skip0How many results to skip before the first one returned.

The response includes a pagination object:

{
  "status": "success",
  "data": [ ... ],
  "pagination": {
    "total": 230,
    "take": 100,
    "skip": 100,
    "has_more": true
  }
}
  • total is the number of results that match your filters.
  • has_more is true while there are more results after this page.

To read every page, increase skip by take until has_more is false:

const headers = { Authorization: `Bearer ${process.env.BRIDGE_API_KEY}` };
const bookings = [];
let skip = 0;
let hasMore = true;

while (hasMore) {
  const url = `https://api.meetonbridge.com/v1/bookings?take=100&skip=${skip}`;
  const body = await (await fetch(url, { headers })).json();
  bookings.push(...body.data);
  hasMore = body.pagination.has_more;
  skip += 100;
}

Other list endpoints, such as GET /booking-pages and GET /collections, return every result in one response.