Word API
Tips & Best Practices
Get the most out of the Word API with these tips.
Batch your requests
Instead of making 10 calls with count=1, make one call with count=10. You get the same result with 1/10th the rate limit usage. Each API call counts as one request regardless of how many words it returns.
Cache the daily word
The daily word is identical for all users in the same timezone and changes once per day. Cache it aggressively — there's no benefit to calling it more than once per day. Use Cache-Control: max-age=86400 or your framework's caching (e.g. Next.js revalidate).
Use rate limit headers proactively
Every response includes these headers:
X-RateLimit-Limit— your daily cap (e.g. 100 for free, 5000 for plus)X-RateLimit-Remaining— requests left todayX-RateLimit-Reset— Unix timestamp when the rolling 24h window resetsX-Burst-Limit/X-Burst-Remaining— per-minute burst counters
Check X-RateLimit-Remaining before making a request in tight loops to avoid hitting the 429 wall.
Keep your API key secret
Never put your API key in client-side JavaScript, public repositories, or URL query parameters. Use a server-side proxy (like a Next.js API route or Express endpoint) to call the Anagrama API from the server, and expose a keyless endpoint to your frontend. See the React Widget example for a complete pattern.
Use wordsets for custom word lists
If you need domain-specific words (e.g. animals, food, science terms), create a wordset instead of filtering random words client-side. Wordsets support hints, categories, and server-side scrambling — everything you need for vocabulary quizzes, flashcards, and custom puzzles.