get_brazil_cnpj {BrazilDataAPI}R Documentation

Get Company Information by CNPJ (Brazil)

Description

This function retrieves public company registration data in Brazil by querying the BrasilAPI endpoint.

Usage

get_brazil_cnpj(cnpj)

Arguments

cnpj

A valid CNPJ number as a string (only digits, no punctuation).

Details

Example URL format: https://brasilapi.com.br/api/cnpj/v1/19131243000197

Replace 19131243000197 with any valid Brazilian CNPJ number.

It returns a tibble with essential information such as the company's legal name, trade name, address, primary activity, and registration status.

The function makes an HTTP GET request to the BrasilAPI CNPJ endpoint and processes the JSON response into a structured tibble. It only returns fields that are essential and informative for the user.

Value

A tibble with selected essential fields:

Note

Requires internet connection. The function returns NULL if the CNPJ is invalid or not found.

See Also

GET, fromJSON, as_tibble

Examples

## Not run: 
get_brazil_cnpj("19131243000197")

## End(Not run)


[Package BrazilDataAPI version 0.1.0 Index]