Dashboard

Rate Limits

FHIRfly uses rate limiting to ensure fair usage and maintain service quality for all users.

Default Limits

Plan Rate Limit Monthly Quota
Free 10 req/sec 10,000 requests
Developer 50 req/sec 100,000 requests
Pro 100 req/sec 250,000 requests
Business 200 req/sec 500,000 requests
Enterprise Custom Custom

See our Pricing page for full plan details.

Rate Limit Headers

Every API response includes headers showing your current rate limit status:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 115
X-RateLimit-Reset: 1704067200
Header Description
X-RateLimit-Limit Maximum requests per minute
X-RateLimit-Remaining Requests remaining in current window
X-RateLimit-Reset Unix timestamp when the window resets

Handling Rate Limits

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

{
  "error": "rate_limit_exceeded",
  "error_description": "Rate limit exceeded. Try again in 45 seconds.",
  "retry_after": 45
}

Best Practices

  1. Implement exponential backoff - Wait longer between retries
  2. Use batch endpoints - Fetch multiple items in one request
  3. Cache responses - NDC and NPI data changes infrequently
  4. Monitor the headers - Slow down before hitting limits

Example: Exponential Backoff

Node.js
import { Fhirfly } from "@fhirfly-io/terminology";

// The SDK handles 429 retries automatically with exponential backoff.
// No manual retry logic needed.
const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });

const result = await client.ndc.lookup("0069-0151-01");

Batch Requests

Use batch endpoints to fetch multiple items efficiently:

Node.js
const result = await client.ndc.lookupMany([
  "0069-0151-01",
  "0069-0152-01",
  "0069-0153-01"
]);
console.log(`Found ${result.data.found} drugs`);

Batch requests count as 1 request toward your rate limit, regardless of how many items you fetch.

Quota Management

Track your monthly usage in the Dashboard. You'll receive email alerts at:

  • 80% of quota used
  • 90% of quota used
  • 100% of quota used (requests will be rejected)

Need Higher Limits?

Contact us for enterprise plans with custom rate limits and dedicated support.