Rate Limiting Guide
Rate Limiting & Usage Tracking
Understanding API limits, billing cycles, and best practices for optimal usage
Transparent Limits
Know exactly how many API calls you have left at all times
Billing Cycle Based
Limits reset on your 30-day billing cycle, not calendar months
Smart Headers
Industry-standard rate limit headers in every response
Rate Limit Headers
Standard Headers Returned
X-RateLimit-LimitYour total daily limit for this endpoint
X-RateLimit-RemainingRequests remaining in current billing period
X-RateLimit-ResetUnix timestamp when your limit resets
Handling Rate Limits in Code
Rate Limit Examples
# Check rate limit headers in response (requires API key)curl -i -H "X-API-Key: YOUR_API_KEY" \"https://api.ogfetch.com/extract?url=https://github.com"# Headers returned:# X-RateLimit-Limit: 100# X-RateLimit-Remaining: 99# X-RateLimit-Reset: 1735689600
429 Rate Limit Exceeded
When You Exceed Your Limit
HTTP Response
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 150
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1735689600
Content-Type: application/json
{
"error": "Rate limit exceeded",
"message": "You have exceeded your daily limit of 150 requests",
"reset_time": "2025-01-01T00:00:00Z"
}Best Practices:
- Check the
X-RateLimit-Remainingheader before making requests - Implement exponential backoff when you receive a 429 response
- Cache API responses to avoid duplicate requests for the same URL
- Monitor your usage in the dashboard to prevent hitting limits
Billing Cycle Details
30-Day Billing Cycles
Your rate limits reset every 30 days from your subscription start date, not on calendar months.
Example: Subscribed on January 15th → Resets on February 14th, March 16th, etc.
Check your exact reset date in the dashboard or via API headers