Overview
To ensure fair usage and maintain the stability of our API, we implement intelligent rate limiting based on multiple factors.Rate Limiter Types
Pandabase uses three types of rate limiters, depending on the endpoint and resource being accessed:- Global IP-based limiter (
GlobalResource): Applies to all requests from a specific IP address - Account-based limiter (
AccountResource): Applies to requests authenticated with your API key - Store-based limiter (
StoreResource): Applies to requests specific to a storefront/shop
How It Works
We provide generous rate limits designed to accommodate normal usage patterns. The account-based rate limiter is generally stricter and more dynamic than the global IP-based limiter, but both are set at levels sufficient for most use cases.Rate Limit Headers
All API responses include the following headers to help you manage your request rate:| Header | Description |
|---|---|
X-RateLimit-Limit | The maximum number of requests permitted within the current rate limit window. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The time at which the current rate limit window resets (UTC epoch seconds). |
X-RateLimit-Type | The type of rate limiter applied (GlobalResource, AccountResource, or StoreResource). |
Handling Rate Limits
When you exceed the rate limit, the API returns a429 Too Many Requests response:
Best Practices
- Monitor headers: Check
X-RateLimit-Remainingto track available requests - Implement exponential backoff: When you receive a
429response, wait before retrying - Respect reset times: Use
X-RateLimit-Resetto determine when to retry - Cache responses: Reduce API calls by caching data when appropriate
- Batch requests: Where possible, combine multiple operations into single requests
Example Retry Logic
Rate Limit Variations
Be aware that rate limits may vary:- Different endpoints have different rate limits based on their resource intensity
- Rate limits can change over time as we optimize our infrastructure
- Higher-tier plans may have increased rate limits
Always rely on the headers returned in each API response to determine your current rate limit status rather than hardcoding values.
