Getting started

About

A simple way to look up Brazilian companies by CNPJ.

What it is for

CNPJ data is public, but it is not always easy to get to: it sits behind a CAPTCHA or is spread across many files. Here you send the CNPJ number and get the answer as JSON, with no key and no sign-up.

GET /06.990.590/0001-23

Just want to see it working? On the test page you type the CNPJ and get the registration certificate, a summary and the JSON.

How it works

This API keeps no database of its own. When you make a request, it checks that the CNPJ is valid and asks Minha Receita. If that does not answer, it tries ReceitaWS. You get what the provider returned, and the X-Source header tells you which one it was.

  • Works with numeric and alphanumeric CNPJ, with or without dots, slash and dash.
  • Invalid CNPJs are refused right away, without spending a provider request.
  • You can call it straight from the browser (CORS enabled).
  • Nothing you look up is stored.

Credits

This project is made by JUCA Soft and is a client of Minha Receita and of other providers of the same service. The data, the infrastructure and the work of keeping everything up to date are theirs, and this API exists thanks to that open work.

Want your own version?

If you need more control or guaranteed availability, the way to go is running your own CNPJ API. A good starting point is the base of the BrasilAPI project, which is open source. To host the full database, also see how to set up your own Minha Receita server.