Consult companies by CNPJ for Brazilian companies.
Brazil Receita WS API is a free Government API that requires no API key, is served over HTTPS and has unconfirmed CORS support.
Details from receitaws.com.br.

Unified API suite · now live
Geocode an address, validate an email, track a flight or pull stock data with one account, one dashboard and one API key.
Provides legislative information in Apis XML and JSON, as well as files in various formats
Official Spanish State Gazette open data: laws, summaries and XML/JSON APIs
The Brazil Receita WS API is provided by Receita WS (receitaws.com.br).
Yes. The Brazil Receita WS API is listed in the Government category of the public-apis directory, which only includes APIs that are free or have a free tier. Check its documentation for rate limits and paid plans.
No. The Brazil Receita WS API requires no authentication, so you can start making requests without signing up.
CORS support for the Brazil Receita WS API is unknown. Test a request from the browser, and fall back to a server-side call if it is blocked.
Yes. The Brazil Receita WS API is served over HTTPS, so it's safe to use in production.