Company Search
In the Commercial API, in the Premium Plan
, you can perform searches using filters to find companies that meet your requirements.
Attention: Access to this endpoint is exclusive to Premium Plan subscribers.
Method: GET
Endpoint: https://comercial.cnpj.ws/pesquisa?ADD_FILTERS
Filters
You can use the filters below in your queries:
atividade_principal_id
CNAE Code
atividade_secundaria_id
CNAE Code
atividade_id
CNAE Code (search in the primary and secondary activity)
natureza_juridica_id
Legal Nature Code
razao_social
Company Name
nome_fantasia
Trade Name
pais_id
BACEN Country Code
estado_id
IBGE State Code
cidade_id
IBGE City Code
cep
ZIP Code
situacao_cadastral
Registration status with the Federal Revenue
data_situacao_cadastral_de
Registration Status Date (From this date) in YYYY-MM-DD format
data_situacao_cadastral_ate
Registration Status Date (Until this date) in YYYY-MM-DD format
porte_id
Company size ID
socio_nome
Partner's Name
data_inicio_atividade_de
Start Date of Activity (From this date) in YYYY-MM-DD format
data_inicio_atividade_ate
Start Date of Activity (Until this date) in YYYY-MM-DD format
It is crucial to highlight that the queries made in this endpoint are based on our database and not on the Federal Revenue database. Therefore, discrepancies may occur between the information, as our database may have a lag of up to 45 days compared to the updated data from the Federal Revenue. It is worth noting that, although we perform daily registrations due to CNPJ queries made in the API, the lag can still occur.
List of Registration Statuses:
Active
Closed
Inactive
Null
Suspended
List of Registered Sizes:
01
Not informed
02
Micro Enterprise
03
Small Business
05
Others
Request Examples
We have a package that can help you integrate with JavaScript:
More information about the package
Pagination
If the search returns more than 20 CNPJs, the API will divide the response into pages. You can check this in the API's JSON response, in the "pagination" property, which shows the current page, the total number of pages, and the total number of CNPJs:
To search for a specific page, simply provide the page number in the request:
It is also possible to change the number of CNPJs returned, the default is 20 but it can be up to 100:
Return Example
Below is an example of the JSON returned when searching by CNAE 6203100:
Last updated
Was this helpful?