algolia-rate-limits
Handle Algolia rate limits and throttling: per-key limits, indexing queue limits, 429 responses, and backoff strategies. Trigger: "algolia rate limit", "algolia throttling", "algolia 429", "algolia retry", "algolia backoff", "algolia too many requests".
Best use case
algolia-rate-limits is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Handle Algolia rate limits and throttling: per-key limits, indexing queue limits, 429 responses, and backoff strategies. Trigger: "algolia rate limit", "algolia throttling", "algolia 429", "algolia retry", "algolia backoff", "algolia too many requests".
Teams using algolia-rate-limits should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/algolia-rate-limits/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How algolia-rate-limits Compares
| Feature / Agent | algolia-rate-limits | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Handle Algolia rate limits and throttling: per-key limits, indexing queue limits, 429 responses, and backoff strategies. Trigger: "algolia rate limit", "algolia throttling", "algolia 429", "algolia retry", "algolia backoff", "algolia too many requests".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Algolia Rate Limits
## Overview
Algolia has two distinct rate limiting mechanisms: **per-API-key limits** (configurable, returns HTTP 429) and **server-side indexing limits** (protects cluster stability, returns HTTP 429 with specific messages). The `algoliasearch` v5 client has built-in retry with backoff, but you need to handle sustained rate limiting yourself.
## How Algolia Rate Limiting Works
### Per-API-Key Rate Limits
| Setting | Default | Where to Change |
|---------|---------|-----------------|
| `maxQueriesPerIPPerHour` | 0 (unlimited) | Dashboard > API Keys > Edit |
| `maxHitsPerQuery` | 1000 | Dashboard > API Keys > Edit |
| Search requests | Plan-dependent | Upgrade plan |
### Server-Side Indexing Limits
When the indexing queue is overloaded, Algolia returns 429 with these messages:
| Message | Meaning | Action |
|---------|---------|--------|
| `Too many jobs` | Queue full | Reduce batch frequency |
| `Job queue too large` | Too much pending work | Wait for queue to drain |
| `Old jobs on the queue` | Stuck tasks | Check dashboard > Indices > Operations |
| `Disk almost full` | Record quota near limit | Delete unused records or upgrade |
## Instructions
### Step 1: Configure Per-Key Rate Limits
```typescript
import { algoliasearch } from 'algoliasearch';
const client = algoliasearch(process.env.ALGOLIA_APP_ID!, process.env.ALGOLIA_ADMIN_KEY!);
// Create a rate-limited API key for frontend use
const { key } = await client.addApiKey({
apiKey: {
acl: ['search'],
description: 'Frontend search key — rate limited',
maxQueriesPerIPPerHour: 1000, // Per user IP
maxHitsPerQuery: 20,
indexes: ['products'], // Restrict to specific indices
validity: 0, // 0 = never expires
},
});
console.log(`Created rate-limited key: ${key}`);
```
### Step 2: Implement Backoff for Sustained 429s
```typescript
import { ApiError } from 'algoliasearch';
async function withBackoff<T>(
operation: () => Promise<T>,
config = { maxRetries: 5, baseDelayMs: 1000, maxDelayMs: 30000 }
): Promise<T> {
for (let attempt = 0; attempt <= config.maxRetries; attempt++) {
try {
return await operation();
} catch (error) {
if (attempt === config.maxRetries) throw error;
// Only retry on 429 or 5xx
if (error instanceof ApiError) {
if (error.status !== 429 && error.status < 500) throw error;
}
// Exponential backoff with jitter
const delay = Math.min(
config.baseDelayMs * Math.pow(2, attempt) + Math.random() * 500,
config.maxDelayMs
);
console.warn(`Rate limited (attempt ${attempt + 1}). Retrying in ${delay.toFixed(0)}ms`);
await new Promise(r => setTimeout(r, delay));
}
}
throw new Error('Unreachable');
}
// Usage
const { hits } = await withBackoff(() =>
client.searchSingleIndex({ indexName: 'products', searchParams: { query: 'laptop' } })
);
```
### Step 3: Throttled Batch Indexing
```typescript
import PQueue from 'p-queue';
// Limit concurrent indexing operations to avoid overloading the queue
const indexingQueue = new PQueue({
concurrency: 1, // One batch at a time
interval: 1000, // Per second
intervalCap: 2, // Max 2 operations per second
});
async function throttledBulkIndex(records: Record<string, any>[]) {
const BATCH_SIZE = 500;
const chunks: Record<string, any>[][] = [];
for (let i = 0; i < records.length; i += BATCH_SIZE) {
chunks.push(records.slice(i, i + BATCH_SIZE));
}
let indexed = 0;
await Promise.all(
chunks.map(chunk =>
indexingQueue.add(async () => {
const { taskID } = await client.saveObjects({
indexName: 'products',
objects: chunk,
});
await client.waitForTask({ indexName: 'products', taskID });
indexed += chunk.length;
console.log(`Indexed ${indexed}/${records.length}`);
})
)
);
}
```
### Step 4: Monitor Usage Approaching Limits
```typescript
// Check current API key usage via the dashboard or programmatically
async function checkKeyUsage(apiKey: string) {
const keyInfo = await client.getApiKey({ key: apiKey });
console.log({
description: keyInfo.description,
maxQueriesPerIPPerHour: keyInfo.maxQueriesPerIPPerHour,
acl: keyInfo.acl,
indexes: keyInfo.indexes,
});
}
// Check record count vs plan limit
async function checkRecordUsage() {
const { items } = await client.listIndices();
const totalRecords = items.reduce((sum, idx) => sum + (idx.entries || 0), 0);
console.log(`Total records across all indices: ${totalRecords.toLocaleString()}`);
}
```
## Error Handling
| Scenario | Detection | Response |
|----------|-----------|----------|
| Burst spike (429) | `ApiError` with status 429 | Built-in retry handles it; add backoff for persistence |
| Sustained overload | Repeated 429s across minutes | Reduce batch size and frequency |
| Indexing queue full | 429 with "Too many jobs" | Pause indexing, wait for queue drain |
| Plan limit reached | 429 with quota message | Upgrade plan or reduce record count |
## Resources
- [API Key Rate Limiting](https://support.algolia.com/hc/en-us/articles/4905140190353)
- [Indexing Rate Limits](https://support.algolia.com/hc/en-us/articles/4406975251089)
- [p-queue](https://github.com/sindresorhus/p-queue)
## Next Steps
For security configuration, see `algolia-security-basics`.Related Skills
workhuman-rate-limits
Workhuman rate limits for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman rate limits".
wispr-rate-limits
Wispr Flow rate limits for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr rate limits".
windsurf-rate-limits
Understand and manage Windsurf credit system, usage limits, and model selection. Use when running out of credits, optimizing AI usage costs, or understanding the credit-per-model pricing structure. Trigger with phrases like "windsurf credits", "windsurf rate limit", "windsurf usage", "windsurf out of credits", "windsurf model costs".
webflow-rate-limits
Handle Webflow Data API v2 rate limits — per-key limits, Retry-After headers, exponential backoff, request queuing, and bulk endpoint optimization. Use when hitting 429 errors, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "webflow rate limit", "webflow throttling", "webflow 429", "webflow retry", "webflow backoff", "webflow too many requests".
vercel-rate-limits
Handle Vercel API rate limits, implement retry logic, and configure WAF rate limiting. Use when hitting 429 errors, implementing retry logic, or setting up rate limiting for your Vercel-deployed API endpoints. Trigger with phrases like "vercel rate limit", "vercel throttling", "vercel 429", "vercel retry", "vercel backoff", "vercel WAF rate limit".
veeva-rate-limits
Veeva Vault rate limits for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva rate limits".
vastai-rate-limits
Handle Vast.ai API rate limits with backoff and request optimization. Use when encountering 429 errors, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "vastai rate limit", "vastai throttling", "vastai 429", "vastai retry", "vastai backoff".
twinmind-rate-limits
Implement TwinMind rate limiting, backoff, and optimization patterns. Use when handling rate limit errors, implementing retry logic, or optimizing API request throughput for TwinMind. Trigger with phrases like "twinmind rate limit", "twinmind throttling", "twinmind 429", "twinmind retry", "twinmind backoff".
together-rate-limits
Together AI rate limits for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together rate limits".
techsmith-rate-limits
TechSmith rate limits for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith rate limits".
supabase-rate-limits
Manage Supabase rate limits and quotas across all plan tiers. Use when hitting 429 errors, configuring connection pooling, optimizing API throughput, or understanding tier-specific quotas for Auth, Storage, Realtime, and Edge Functions. Trigger: "supabase rate limit", "supabase 429", "supabase throttle", "supabase quota", "supabase connection pool", "supabase too many requests".
stackblitz-rate-limits
WebContainer resource limits: memory, CPU, file system size, process count. Use when working with WebContainers or StackBlitz SDK. Trigger: "webcontainer limits".