DEV Community

rodrigo da silva
rodrigo da silva

Posted on

Automating Brazilian company verification for accountants and finance teams

If you work with Brazilian companies — as an accountant, credit analyst, or anyone processing PJ clients at scale — here's a practical automation approach using free public data.

What you can verify automatically

For any CNPJ, public data gives you:

  • Situação cadastral: ATIVA, BAIXADA, INAPTA, SUSPENSA — critical for invoice validation
  • Razão social: legal name for contract matching
  • CNAE: is this company allowed to do what they claim?
  • QSA: who are the actual partners/directors?
  • Data abertura: how old is the company?

The data

65M+ CNPJs from Receita Federal, indexed and searchable at Jurídico Online. Free.

Also available as a Python package:

pip install juridico-online
Enter fullscreen mode Exit fullscreen mode
from juridico_online import empresa_url, buscar_url

# Get company page URL for a CNPJ
url = empresa_url("00.000.000/0001-91")
print(url)  # https://juridicoonline.com.br/empresa/00000000000191

# Search by company or partner name
search = buscar_url("Magazine Luiza")
print(search)
Enter fullscreen mode Exit fullscreen mode

Checks worth automating

1. Situação ATIVA before accepting any invoice
INAPTA or BAIXADA companies cannot legally issue NF-e.

2. CNAE vs service being billed
A company with CNAE "comércio de alimentos" billing for software development is a red flag.

3. Company age vs contract value
A 3-month-old company offering a R$500k contract deserves extra scrutiny.

4. Shared partners across suppliers
If two suppliers share directors, that's a conflict of interest. Search partner names at juridicoonline.com.br to see all companies they control.

Integration patterns

  • ERP/AP: validate CNPJ status before releasing payment
  • Onboarding: auto-fill razão social when client enters CNPJ
  • Batch audit: cross-check your vendor list quarterly
  • Monitoring: alert if a key supplier's CNPJ changes status

The data is public, free, and updated regularly. No excuse to check manually at scale.

Top comments (0)