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
requestslibrary. - 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
- Migrate from ReceitaWS - already on ReceitaWS? Swap only the host; the response comes back in the same format, field by field.
- Look up State Registration (IE) - a CNPJ's IE from the official SEFAZ source, by state or nationwide.
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).