Company list by city and state
Want a list of companies in a city or a state? With CNPJAPI you build the segment by state and city and export the list as Excel or CSV, from Receita Federal's official data. It is a self-service feature in the portal, not an API endpoint.
Feature overview: Segmented company lists.
Step by step
- Go to https://app.cnpjapi.com.br and open Segmentation (
/busca/segmentacao). Available on the Advanced and Business plans. - Select the state. Then, in the city filter, pick one or more cities in that state (the selection is paginated and respects the chosen state).
- Combine it with CNAE (line of business), company size, registration status (active only, for example) or contact availability to reach the cut you need.
- Hit Segment and check the preview: how many companies the segment has and how they are distributed. Adjust until it is the size and quality you want.
- Click Export, choose XLSX or CSV and the scope (everything or up to N rows). The portal shows the rows and the charge (allowance + credits) before generating.
- Download it under Exports (
/busca/exportacoes) once ready (file available for 7 days).
What the list contains
One row per company with the fields from the official record: CNPJ, legal name, trade name, status, CNAE, legal nature, company size, full address (street, district, ZIP, city and state), phone and e-mail (when present) and the Simples/MEI flag.
Tips
- City + CNAE is the most common cut for territory-based sales (for example, active restaurants in a given capital).
- For several cities in a region, select them all at once before exporting.
- Active only: filter registration status so you do not include closed companies.
- Charged per row: the preview is not charged; calibrate the segment before exporting.
Don't confuse it with CNPJ lookup
Here you start from a criterion (the location) to get the list. To get, from a CNPJ, that company's address and data, use the CNPJ lookup (REST API) and the per-language guides.
Responsible use
The company registry is public, but how you use the list is your responsibility: when using contacts, comply with the LGPD and communication rules. See the note in Segmented company lists.