How to fix daily_cap_exceeded (HTTP 402)
The free plan has a daily pace limit: 1,000 credits a day while your welcome credits are active, 500 a day after that. Today's total has reached it. The limit only stops further calls: a call that starts under the limit runs in full even if it ends above it, so a report runs on a free account when the welcome credits or the month's allowance cover the whole call.
What the API returns
{
"error": {
"code": "daily_cap_exceeded",
"message": "free-plan daily limit reached — try again tomorrow or upgrade to a paid plan",
"request_id": "770372810e5f2a70"
}
}Why it happens
- A loop or a page that calls the API on every render.
- Calling the API for every user request instead of caching results that do not change (a day's panchang changes once a day).
- Running a benchmark or a full endpoint sweep on a free key.
How to fix it
- Cache responses keyed by (endpoint, date, lat, lon, tz); panchang and festival data can be cached for the whole day.
- The daily count resets at 00:00 UTC (05:30 IST); calls work again from then. Paid plans have no daily limit.
- Dashboard → Usage shows today's total and what is left of your welcome credits and monthly allowance.
Should your code retry?
Not automatically. Retrying will return the same error until credits are available; surface it to whoever manages the account.
See all codes on the troubleshooting index and the error envelope on Errors. Still stuck? Email [email protected] with the request_id.