| name | grammarly-rate-limits |
| description | Implement Grammarly rate limiting, backoff, and idempotency patterns.
Use when handling rate limit errors, implementing retry logic,
or optimizing API request throughput for Grammarly.
Trigger with phrases like "grammarly rate limit", "grammarly throttling",
"grammarly 429", "grammarly retry", "grammarly backoff".
|
| allowed-tools | Read, Write, Edit |
| version | 1.8.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","grammarly","writing"] |
| compatibility | Designed for Claude Code |
Grammarly Rate Limits
Overview
Grammarly's Text API enforces plan-dependent rate limits across its writing score, AI detection, and plagiarism endpoints. The plagiarism checker is asynchronous and requires polling, which adds complexity to rate management. Token endpoints are separately throttled at roughly 10 requests per hour, so credential rotation during high-throughput batch processing of documents (e.g., scanning an entire content library) requires careful token lifecycle management to avoid auth-layer 429s on top of API-layer throttling.
Rate Limit Reference
| Endpoint | Limit | Window | Scope |
|---|
| Writing score | 100 req (Business) | 1 minute | Per API key |
| AI content detection | 60 req (Business) | 1 minute | Per API key |
| Plagiarism check (submit) | 30 req | 1 minute | Per API key |
| Plagiarism check (poll) | 120 req | 1 minute | Per API key |
| Token refresh | 10 req | 1 hour | Per client credentials |
Rate Limiter Implementation
class GrammarlyRateLimiter {
private tokens: number;
private lastRefill: number;
private readonly max: number;
private readonly refillRate: number;
private queue: Array<{ resolve: () => void }> = [];
constructor(maxPerMinute: number) {
. = maxPerMinute;
. = maxPerMinute;
. = .();
. = maxPerMinute / ;
}
(): <> {
.();
(. >= ) { . -= ; ; }
( ..({ resolve }));
}
() {
now = .();
. = .(., . + (now - .) * .);
. = now;
(. >= && ..) {
. -= ;
..()!.();
}
}
}
scoreLimiter = ();
plagiarismLimiter = ();