Skip to main content
err:user:too_many_requests:query_quota_exceeded
Example
{
  "meta": {
    "requestId": "req_4dgzrNP3Je5mU1tD"
  },
  "error": {
    "detail": "Workspace has exceeded the analytics query quota of 1000 queries per hour",
    "status": 429,
    "title": "Too Many Requests",
    "type": "https://unkey.com/docs/errors/user/too_many_requests/query_quota_exceeded"
  }
}

What Happened?

Your workspace has made too many analytics queries in a short period! We limit the number of queries you can run per hour to keep the analytics service fast and reliable for everyone. This is a rate limit on the number of queries, not about individual query complexity.

How to Fix It

1. Wait and Retry

The quota resets every hour. Wait a bit and try your query again.

2. Cache Your Results

Instead of running the same query repeatedly, cache the results in your application:
app.get('/dashboard', async (req, res) => {
  // This runs a query EVERY time someone loads the dashboard
  const stats = await fetch('https://api.unkey.com/v1/analytics', {
    method: 'POST',
    headers: { 'Authorization': 'Bearer unkey_XXX' },
    body: JSON.stringify({ query: 'SELECT COUNT(*) FROM key_verifications' })
  })
  res.json(stats)
})

3. Batch Your Queries

If you’re making multiple queries, try to combine them into a single query with JOINs or subqueries.

4. Use Webhooks Instead

For real-time updates, consider using webhooks instead of polling the analytics API repeatedly.

Default Quota

PlanQueries per Hour
Free1,000
Pro10,000
EnterpriseCustom

Need a Higher Quota?

Running into limits often? We can increase your quota!Contact our support team and tell us:
  • What you’re building
  • Why you need more queries per hour
  • Your current usage patterns
We’ll work with you to find the right quota for your needs, or help optimize your query patterns.