Public APIAPI Rate Limits

API Rate Limits

Understanding rate limits on the SocialRails Public API, including tier-based limits, response headers, and handling 429 errors.

The SocialRails API enforces rate limits to maintain fair usage and platform stability. Limits are applied per user account on an hourly window, all API keys under the same account share one limit.

Limits by Plan

PlanRequests per Hour
Creator60
Business300
Agency1,000

Free and Trial plans do not have API access.

Rate Limit Headers

Every API response includes these headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per hour
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

Example headers:

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 247
X-RateLimit-Reset: 1709402400

Handling 429 Responses

When you exceed your rate limit, you'll receive a 429 status code:

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Limit: 300 requests per hour."
  }
}
  1. Read the X-RateLimit-Reset header to know when the window resets
  2. Wait until that time before retrying
  3. Implement exponential backoff for consecutive 429s
  4. Consider caching responses that don't change frequently

Example: JavaScript Retry Logic

async function apiRequest(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, options);
 
    if (response.status === 429) {
      const resetTime = parseInt(response.headers.get('X-RateLimit-Reset'));
      const waitMs = (resetTime * 1000) - Date.now() + 1000;
      await new Promise(resolve => setTimeout(resolve, Math.max(waitMs, 1000)));
      continue;
    }
 
    return response;
  }
  throw new Error('Rate limit exceeded after retries');
}

Tips for Staying Under Limits

  • Cache responses, Store data locally and only re-fetch when needed
  • Use pagination wisely, Fetch larger pages (up to 100) instead of many small requests
  • Batch operations, Group related actions instead of making them one at a time
  • Monitor usage, Check X-RateLimit-Remaining to track your consumption
  • Upgrade if needed, Higher plans offer significantly more capacity

Frequently Asked Questions

Do rate limits apply per API key or per account?
Rate limits are applied per user account. If you have multiple API keys, they all share the same hourly limit.
When does the rate limit window reset?
The rate limit resets at the top of each UTC hour. Check the X-RateLimit-Reset header in any API response for the exact reset timestamp.
Does the health endpoint count against my rate limit?
No. The GET /api/v1/health endpoint is public and does not require authentication, so it does not count against your rate limit.
What should I do if I keep hitting the rate limit?
First, try caching responses and using pagination to reduce the number of requests. If you still need more capacity, upgrade to a higher plan for a higher hourly limit.