| name | lokalise-rate-limits |
| description | Implement Lokalise rate limiting, backoff, and request queuing patterns.
Use when handling rate limit errors, implementing retry logic,
or optimizing API request throughput for Lokalise.
Trigger with phrases like "lokalise rate limit", "lokalise throttling",
"lokalise 429", "lokalise retry", "lokalise backoff".
|
| allowed-tools | Read, Write, Edit |
| version | 1.14.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","lokalise","api"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Lokalise Rate Limits
Overview
Lokalise enforces a strict 6 requests per second rate limit across all API endpoints (https://api.lokalise.com/api2). Exceeding this triggers a 429 Too Many Requests response. This skill covers request queuing with 170ms minimum spacing, exponential backoff for 429 recovery, bulk operation throttling, and proactive quota monitoring via response headers.
Prerequisites
@lokalise/node-api SDK installed (npm install @lokalise/node-api)
- API token configured (read or read/write scope depending on operations)
- Node.js 18+ for native
AbortController support in timeout handling
Instructions
1. Understand the Rate Limit Headers
Every Lokalise API response includes rate limit headers:
X-RateLimit-Limit: 6 # Max requests per second
X-RateLimit-Remaining: 4 # Requests remaining in current window
X-RateLimit-Reset: 1700000000 # Unix timestamp when the window resets
Retry-After: 1 # Seconds to wait (only on 429 responses)
Always read these headers. Never hardcode assumptions about the window — Lokalise may adjust limits per plan tier.
2. Implement a Request Queue with 170ms Spacing
Space requests at minimum 170ms apart (1000ms / 6 = ~167ms, rounded up). Use p-queue for concurrency control:
import PQueue from "p-queue";
const lokaliseQueue = new PQueue({
concurrency: 1,
interval: 170,
intervalCap: 1,
});
async function queuedRequest<T>(fn: () => Promise<T>): Promise<T> {
return lokaliseQueue.add(fn, { throwOnTimeout: true });
}
{ } ;
lokalise = ({ : process.. });
keys = (
lokalise.().({
: ,
: ,
: ,
})
);