Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Credits (₪): an online CNPJ lookup costs 1, a cached one 0; add-ons (simples, suframa, geocoding, registrations) add 1 each. Company, person-by-id and postal-code lookups are free. Searches cost 1 per 10 records.
  • strategy=CACHE never charges; it returns 404 when nothing is cached. sync=true makes the response carry the charge in the cnpja-request-cost header.
  • CNPJ and CPF values are digits only. A company id is the first 8 digits of the CNPJ (the root); an establishment is the full 14-digit CNPJ.
  • Searches page with the token returned by the previous page; a token excludes every other filter. Filter names are dotted (names.in, address.state.in) and lists are comma-separated.
  • Docs and field descriptions are in Portuguese. The keyless public API at open.cnpja.com is a separate, rate-limited service not in this entry.

Endpoints

Look up a CNPJ

  • 1 credit online, 0 from cache, plus add-ons.
  • 1 credit per 10 records returned.

Get a company

  • Free; served from cache, refreshed every 30 days.
  • 1 credit per 10 records returned.

Get a person

  • Free.

Get the Receita Federal record

  • 1 credit online, 0 from cache.

Get Simples Nacional status

  • 1 credit online, 0 from cache.

Look up a postal code

  • Free.

Get credit balance