Rate Limits & Caching
There is no enforced rate limit on the public Doungim REST API or MCP server, but a fair-use policy applies and high-volume callers are asked to cache aggressively. Doungim is a TTRPG gaming console for D&D and other tabletop role-playing games; the public API exists to spread the data, not to absorb sustained heavy traffic.
CDN cache headers
Every REST response carries:
Cache-Control: public, max-age=300, s-maxage=3600, stale-while-revalidate=86400That's 5 minutes in the browser, 1 hour at the edge, and a day of stale-while-revalidate. The underlying data updates rarely — most weeks not at all — so this is conservative.
Recommended client-side TTLs
- Static spells / monsters / items: 24 hours, refresh on app launch.
- Search results: 1 hour (queries are bounded, the index is stable).
- Encounter tables: 24 hours.
Mirror the data
Apps that ship to users (mobile, desktop, offline-first web) should pull the whole list endpoints once at build time or once a week:
# Pull every spell once
curl https://www.doungim.com/api/v1/dnd/spells > spells.json
# Pull every monster index
curl https://www.doungim.com/api/v1/dnd/monsters > monsters.jsonThen fetch individual /{slug} entries only on demand and cache them.
Identify yourself
Please set a recognisable User-Agent so we can spot a misbehaving client without blocking your whole IP range:
User-Agent: MyApp/1.2 (contact: alice@example.com)Abuse policy
We may rate-limit or block clients that:
- Hammer endpoints faster than 10 requests per second sustained.
- Skip caching and re-fetch the same page on every render.
- Strip the citation block from responses before redisplaying the data.