Skip to main content
Rate limits control how many requests an API key can make within a time window. They protect the service and ensure fair usage across all consumers.

Default limits

Rate limits are configured per API key through the API Console. Limits use a per-second sliding window. The default limit is set when you create a key and can be adjusted based on your needs.
Contact support if you need higher rate limits than what’s available in the console.

Rate limit headers

The API includes rate limit headers on every response:
HeaderDescription
X-RateLimit-LimitMaximum requests allowed per second
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp (seconds) when the window resets
Retry-AfterSeconds to wait before retrying (only on 429 responses)

Handling 429 responses

When you exceed your rate limit, the API returns a 429 status code:
{
  "error": "Too Many Requests",
  "message": "Rate limit of N requests per second exceeded"
}
Use the rate limit headers to monitor usage and the Retry-After header to pace retries:
import time
import requests

response = requests.get(
    "https://search-api.andisearch.com/api/v1/search",
    params={"q": "test"},
    headers={"x-api-key": "YOUR_API_KEY"}
)

# Check remaining quota on any response
remaining = int(response.headers.get("X-RateLimit-Remaining", 0))

if response.status_code == 429:
    retry_after = int(response.headers.get("Retry-After", 1))
    time.sleep(retry_after)
    # Retry the request

Monitoring usage

Use the X-RateLimit-Remaining header to track how close you are to your limit in real time. For aggregate usage and credit consumption, see the API Console.

Next steps

Error handling

Error codes and retry strategies.

Authentication

API key management and security.