Limitations
Usage limits of the CNPJ.ws Public API: 3 requests per minute per IP and the HTTP 429 error.
The Public API has a limitation of serving only 3 requests per minute from the same IP. Understand that this limitation is independent of whether the query was successful in finding the CNPJ. After exceeding this limit, the requester will have to wait for 60 seconds to make the next request.
The user will receive an error message and HTTP Status Code 429:
{
"status": 429,
"titulo": "Muitas requisições",
"detalhes": "Excedido o limite máximo de 3 consultas por minuto. Liberação ocorrerá em Thu Jun 03 2021 16:15:00 GMT-0300 (Horário Padrão de Brasília)"
}If the API detects an abnormal volume of errors — more than 360 HTTP 429 errors within the same hour, a sign that the requester keeps retrying even after being blocked — the IP will be penalized and will not be able to make queries for 1 hour. If the behavior persists, the block will be renewed for another hour. Example:
{
"status": 429,
"titulo": "Muitas requisições",
"detalhes": "Excedido o limite máximo de 360 erros HTTP 429 por hora. Liberação ocorrerá em Thu Jun 03 2021 16:15:00 GMT-0300 (Horário Padrão de Brasília)"
}Validating Suframa Registration in the Public API
How to validate a Suframa registration in the CNPJ.ws Public API, with up to 3 requests per minute.
What is CNPJ
The National Register of Legal Entities is the registration used by the Federal Revenue to open an institution with or without profit purposes