562 B
562 B
Rate Limits & Caching
Throttling
- Requests are throttled per window (default 30s) to avoid bursts.
- Separate caps for sensitive endpoints.
- Configure via env:
SPOTIFY_RATE_WINDOW_SECONDS=30
SPOTIFY_RATE_MAX_REQUESTS=50
SPOTIFY_RATE_MAX_REQUESTS_SENSITIVE=20
429 handling
- If Spotify returns 429, respects
Retry-Afterand retries (up to 3 attempts).
Response caching
- GET responses cached: search ~10 minutes, album ~1 hour.
- Token responses are cached separately.
Batching
getAlbums([ids])provided for batch lookups.