Integration Guides

Practical, task-oriented guides for looking up CNPJ with the CNPJAPI API in your language. Each guide shows a real call to the GET https://api.cnpjapi.com.br/{cnpj} endpoint, API key authentication and how to read the JSON response.

For the full reference (fields, limits, errors), see the API documentation.

Choose your language

  • Python - with the requests library.
  • Node.js - with native fetch.
  • C# / .NET - with HttpClient.
  • PHP - with cURL.
  • Go - with net/http.
  • Java - with java.net.http.HttpClient.

Many CNPJs?

  • Batch lookup - up to 20 CNPJs in a single call (paid plan). Without a paid plan, the default is one call per CNPJ, respecting the rate limit.

Beyond CNPJ lookup

Code on GitHub

Complete, runnable examples for every language live in the official repository: https://github.com/guidi-sistemas/cnpjapi-examples.

Before you start

You will need an API key. Create your free account at https://app.cnpjapi.com.br, generate the key and send it in the Authorization: Bearer header of every request (see Authentication).