Rate limits

Understand per-endpoint limits and handle 429 responses

Rate limits are enforced per API key (or IP address if unauthenticated). Limits reset on a rolling 1-minute window.

Limits by endpoint category

CategoryEndpointsLimit
Listings (read/write)GET, POST, PATCH /v1/listings and listing actions120 / minute
OrdersGET /v1/orders, POST /v1/orders/{id}/fulfill, /refund120 / minute
Order redeliveryPOST /v1/orders/{id}/redeliver10 / hour per order, 100 / hour per API key
EventsGET /v1/events120 / minute
Account updatePUT /v1/account10 / minute
Self-revokePOST /v1/api-keys/self-revokeunlimited
Stripe connectPOST /v1/account/stripe/connect5 / minute

429 response

When you exceed a limit, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

1{
2 "type": "https://docs.listbee.so/errors/rate-limited",
3 "title": "Rate Limited",
4 "status": 429,
5 "detail": "Rate limit exceeded. Try again in 12 seconds.",
6 "code": "rate_limited",
7 "retry_after": 12
8}

The Retry-After header and retry_after body field both contain the number of seconds remaining in the current window. The body field is an RFC 9457 extension member — agents can read it without parsing headers.

Handling 429s in Python

1import time
2from listbee import ListBee
3from listbee.exceptions import RateLimitError
4
5client = ListBee(api_key="lb_...")
6
7
8def create_listing_with_backoff(title: str, price: int, max_retries: int = 4):
9 for attempt in range(max_retries):
10 try:
11 return client.listings.create(title=title, price=price)
12 except RateLimitError as e:
13 if attempt == max_retries - 1:
14 raise
15 wait = e.extras.get("retry_after") or (2 ** attempt)
16 time.sleep(wait)
17 raise RuntimeError("unreachable")

Bulk operations

There are no batch endpoints. If you need to create many listings programmatically, throttle your requests to stay within the 120/minute limit — roughly 2 per second with headroom.

1import time
2from listbee import ListBee
3
4client = ListBee(api_key="lb_...")
5
6listings_data = [
7 {"title": "Course module 1", "price": 1900},
8 {"title": "Course module 2", "price": 1900},
9 # ...
10]
11
12for data in listings_data:
13 client.listings.create(**data)
14 time.sleep(0.6) # ~100/minute, well within limits

Next steps

  • Idempotency — retry failed requests safely
  • Errors — full error format reference