Limits and plans
Use of CNPJAPI is limited by requests per minute and by monthly quota, according to the contracted plan.
- Requests per minute: protects against spikes; controls the rate of calls.
- Monthly quota: the total number of lookups included in your plan for the month.
Up-to-date limits for each plan are at https://cnpjapi.com.br/#planos.
When a limit is exceeded
When any limit is exceeded, the API responds:
HTTP/1.1 429 Too Many Requests
Retry-After: 30
429 Too Many Requestsindicates you hit the per-minute limit or the monthly quota.- The
Retry-Afterheader tells you how many seconds to wait before trying again.
Best practices
- Respect the
Retry-After: pause for the indicated time before repeating the call. - On a paid plan? Use batch:
POST /consulta/lotelooks up up to 20 CNPJs in a single call, counting as 1 request for the per-minute limit. Without a paid plan, or for one-off lookups, make one call at a time and spread them out (see Look up a CNPJ). - Track your usage: check
GET /cotato see how much of the plan you have used this month, without spending quota. - Treat
429as recoverable: it is not a bug in your code; it is a sign to slow down.
Need more volume?
If your operation consumes a lot of lookups, compare plans at https://cnpjapi.com.br/#planos or talk to the team through the site. Each plan defines its own per-minute limits and monthly quota.