Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Optimizes Lokalise API throughput with cursor pagination, local caching, batch key operations, and rate-limit throttling.
Use this skill ↓23% 82%+59 ptsof test cases passed
Passed 18 of 22 test cases with the skill, and 5 of 22 without it.
In my Lokalise local cache implementation, I read a local JSON metadata file. What specific object property from this file must match what specific property from the API's project statistics to confidently consider it a cache hit?
Compares the timestamp against the last_activity property from the project statistics object
3 of 3 safety checks passed
Optimize Lokalise API throughput for translation pipelines by implementing cursor pagination, local caching, batch key operations (500/request), request throttling under the 6 req/s rate limit, and selective language downloads.
@lokalise/node-api SDK v9+ (ESM) or REST API accessLOKALISE_API_TOKEN environment variable setCursor pagination is significantly faster than offset pagination for projects with 5K+ keys. Offset pagination degrades as page numbers increase because the server must skip rows; cursor pagination uses a pointer.
import { LokaliseApi } from '@lokalise/node-api';
const lok = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! });
// Generator that yields all keys using cursor pagination
async function* getAllKeys(projectId: string) {
let cursor: string | undefined;
do {
const result = await lok.keys().list({
project_id: projectId,
limit: 500, // Maximum allowed per request
pagination: 'cursor',
cursor,
});
for (const key of result.items) yield key;
cursor = result.hasNextCursor() ? result.nextCursor : undefined;
} while (cursor);
}
// Usage: 10,000 keys = 20 API calls (vs 100 with default limit=100)
let count = 0;
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus popular skills in the same category.