Verity API

Rate Limits

Understanding API rate limits and how to handle them

The Verity API uses rate limiting to ensure fair usage and maintain service quality for all users.

Rate Limit Tiers

PlanRequests/MinuteBurst Limit
Free60100
Pay-as-you-go300500

Rate Limit Headers

Every API response includes headers to help you track your rate limit status:

HeaderDescription
X-RateLimit-LimitYour rate limit per minute
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the limit resets

Example headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1701878400

Handling Rate Limits

When you exceed your rate limit, the API returns a 429 Too Many Requests response:

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Try again in 30 seconds.",
    "hint": "Consider upgrading to a higher plan for increased limits."
  }
}

The response includes a Retry-After header indicating how many seconds to wait:

Retry-After: 30

Best Practices

Implement Exponential Backoff

When rate limited, wait and retry with increasing delays:

async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After') || Math.pow(2, i);
      await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
      continue;
    }

    return response;
  }
  throw new Error('Max retries exceeded');
}

Cache Responses

Many API responses can be cached to reduce the number of requests:

  • Policy details change infrequently - cache for 1 hour
  • Code lookup results - cache for 24 hours
  • Use the /policies/changes endpoint to check for updates

Batch Requests

Use array parameters where supported to reduce request count:

# Instead of multiple requests...
/v1/codes/lookup?code=76942
/v1/codes/lookup?code=76943
/v1/codes/lookup?code=76944

# Use a single request
/v1/codes/lookup?codes=76942,76943,76944

Expensive Operations

Some endpoints have higher rate limit costs:

EndpointCost Multiplier
GET /v1/codes/lookup1x
GET /v1/policies1x
GET /v1/policies/:id1x
GET /v1/policies/:id?include=...2x
POST /v1/prior-auth/check3x
POST /v1/policies/compare5x
GET /v1/policies?mode=semantic10x

For example, if your rate limit is 60 requests/minute and you make a policies/compare request (5x cost), it counts as 5 requests against your limit.

Upgrading Your Plan

If you consistently hit rate limits, consider upgrading to the pay-as-you-go plan:

  • 5x higher rate limits (300 req/min)
  • Priority support
  • Usage-based billing

Visit the Usage & Billing page in the Developer Console to upgrade.

On this page