Skip to main content

Overview

The High IQ API enforces rate limiting to protect against abuse and ensure fair usage across all clients. Rate limits are applied per-IP address, with different tiers for different operation types. Rate limiting is disabled in development mode and on localhost to allow unrestricted local testing.

Rate Limit Tiers

The API provides six pre-configured rate limit tiers, each designed for a specific class of operations: Additionally, there is a strain submission rate limiter (5 per hour per IP) for public website strain submissions.

Tier Selection by Endpoint

Read-heavy endpoints that serve cached data:
  • GET /strains - Strain catalog
  • GET /strains/search - Strain search
  • GET /strains/popular - Popular strains
  • GET /strains/slug/:slug - Strain detail
  • GET /strains/slug/:slug/complete - Full strain data
  • GET /strains/by-terpene/:terpene - Terpene filtering
  • GET /strains/by-type/:type - Type filtering

Rate Limit Headers

Every response includes rate limit headers so clients can track their current usage:

429 Too Many Requests

When a rate limit is exceeded, the API returns a 429 status code with a Retry-After header indicating how many seconds to wait:

Handling 429 Responses

Implement exponential backoff or respect the Retry-After header:

Rate Limit Key Generation

Rate limits are keyed based on request identity, falling back through several sources:

API Key Rate Limiting

For external integrations using API keys, a configurable per-key rate limiter is available:
This allows different rate limits for different API consumers. Unconfigured keys fall back to a default of 100 requests per minute.

Development Mode

Rate limiting is completely disabled when any of these conditions are true:
  • NODE_ENV=development
  • Request host contains localhost
  • Request host contains 127.0.0.1
This allows unrestricted local testing without needing to worry about rate limits:

Best Practices

Cache Responses

Cache API responses client-side to reduce unnecessary requests. Most strain data changes infrequently.

Respect Retry-After

Always check the Retry-After header before retrying. Do not retry immediately.

Use Bulk Endpoints

Prefer batch endpoints (like /notebooks/stream/batch) over making many individual requests.

Monitor Headers

Track X-RateLimit-Remaining proactively and slow down requests before hitting the limit.