Skip to content
NewsDataHub NewsDataHub API Docs

Quota Headers

Every API response includes headers that show your current quota usage and limits. These headers help you track your usage and implement proper rate limiting in your applications.

Type: integer

Number of API calls remaining in your current quota period.

Type: integer

Total number of API calls allowed in your quota period.

Type: integer

Number of API calls used in your current quota period.

Type: unix timestamp

Unix timestamp when your quota will reset.

Type: string

Either “daily” or “monthly” indicating your quota period type.

100 requests/day

Resets daily at midnight UTC

10,000 requests/month

Resets monthly on your billing date

50,000 requests/month

Resets monthly on your billing date

150,000 requests/month

Resets monthly on your billing date

Custom limits

Contact sales for custom quotas

X-Quota-Remaining: 92
X-Quota-Limit: 100
X-Quota-Used: 8
X-Quota-Reset: 1735689600
X-Quota-Type: daily

Shows 8 calls used out of 100 daily limit, with 92 remaining. Quota resets at midnight UTC.

Monthly Quota (Developer/Professional/Business/Enterprise)

Section titled “Monthly Quota (Developer/Professional/Business/Enterprise)”
X-Quota-Remaining: 8500
X-Quota-Limit: 10000
X-Quota-Used: 1500
X-Quota-Reset: 1738368000
X-Quota-Type: monthly

Shows 1,500 calls used out of 10,000 monthly limit (Developer plan example). Quota resets on billing cycle date.

const response = await fetch('https://api.newsdatahub.com/v1/news', {
headers: {
'X-API-Key': 'your-api-key',
'User-Agent': 'docs-quota-headers/1.0-js'
}
});
const remaining = parseInt(response.headers.get('X-Quota-Remaining'));
const resetTime = parseInt(response.headers.get('X-Quota-Reset'));
if (remaining < 10) {
console.warn('Low quota remaining:', remaining);
}
// Calculate time until reset
const timeUntilReset = (resetTime * 1000) - Date.now();

When you exhaust your quota, you’ll receive a 403 Forbidden response (not 429):

{
"error": "Quota Exceeded",
"message": "You have exhausted your monthly/daily API quota. Visit https://newsdatahub.com/plans to upgrade your plan or wait for your quota to reset."
}

Key difference:

  • 403 (Quota Exhausted): Used all allocated requests for the period - upgrade plan or wait for reset
  • 429 (Rate Limited): Making requests too quickly (per-minute limit) - slow down and retry

Both include X-Quota-* headers showing your usage and reset time.

  • Monitor quota headers on every response to track usage proactively
  • Implement client-side rate limiting based on remaining quota
  • Cache responses when possible to reduce API calls
  • Handle 403 quota errors gracefully - direct users to upgrade page or show reset time
  • Handle 429 rate limit errors with exponential backoff retry logic
  • Set up alerts for low quota thresholds
  • Consider upgrading if you consistently hit limits