AskNews Logo Dark

Rate Limiting

Overview

This API employs rate and concurrency limiting to ensure fair usage and maintain service availability for all users. Rate and concurrency limits are enforced based on the subscription plan associated with each user's API key.

Rate Limits

The following subscription plans and their corresponding limits are enforced:

  • Free Plan:

    • Rate limit: 1 request per 10 seconds
    • Concurrency limit: 1 request at a time
  • Pro Plan:

    • Rate Limit: 1 request per second
    • Burst Limit: 5 requests per second
    • Concurrency Limit: 5 requests at a time
  • Spelunker Plan:

    • Rate Limit: 1 request per second
    • Burst Limit: 5 requests per second
    • Concurrency Limit: 5 requests at a time
  • Analyst Plan:

    • Rate Limit: 5 request per second
    • Burst Limit: 10 requests per second
    • Concurrency Limit: 10 requests at a time
  • Enterprise Plan:

    • Rate Limit: Custom
    • Burst Limit: Custom
    • Concurrency Limit: Custom

Handling Rate Limits

When a client exceeds their rate or concurrency limit, the API responds with an appropriate HTTP status code and includes specific headers in the response to provide details.

Status Codes and Responses

Rate Limit Exceeded

Headers:

  • X-RateLimit-Limit: The maximum number of requests permitted within the current rate limit window.
  • X-RateLimit-Remaining: The number of requests remaining before the rate limit resets.
  • Retry-After: The number of seconds until the rate limit resets.

Concurrency Limit Exceeded

Headers:

  • X-Concurrency-Limit: The maximum number of requests permitted to run concurrently.
  • X-Concurrency-Remaining: The number of requests remaining before the concurrency limit resets.

    We use cookies

    We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).

    By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
    Learn more on our terms of service and privacy policy.