curl --request GET \
--url https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companiesimport requests
url = "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"_id": "11222333000181",
"document": "11222333000181",
"companyDocument": "11222333",
"branchNumber": "0001",
"branchType": "HEADQUARTERS",
"status": "ACTIVE",
"refDate": "2026-08",
"tradingName": "EXEMPLO MERCADO",
"statusDate": "2015-03-12T00:00:00.000Z",
"statusReason": "00",
"specialStatus": "RECUPERACAO JUDICIAL",
"specialStatusDate": "2022-06-01T00:00:00.000Z",
"foundingDate": "2015-03-12T00:00:00.000Z",
"mainActivity": "4712100",
"secondaryActivities": [
"4721102"
],
"email": "contato@exemplo.com.br",
"phoneNumber": "+551133334444",
"secondaryPhoneNumber": "+551155556666",
"fax": "+551177778888",
"address": {
"street": "AVENIDA PAULISTA",
"number": "1578",
"complement": "ANDAR 3",
"neighborhood": "BELA VISTA",
"city": "SAO PAULO",
"cityCode": "7107",
"state": "SP",
"postalCode": "01310200"
},
"foreignCity": "LISBOA",
"country": "PT",
"countryCode": "607",
"legalName": "EXEMPLO COMERCIO DE ALIMENTOS LTDA",
"legalNature": "2062",
"size": "SMALL",
"capital": 50000000,
"responsibleQualification": "49",
"federativeEntity": "UNIAO",
"shareholders": [
{
"documentType": "CPF",
"name": "MARIA DA SILVA",
"document": "***123456**",
"qualification": "49",
"joinedAt": "2015-03-12T00:00:00.000Z",
"country": "US",
"countryCode": "249",
"ageRange": "5",
"legalRepresentative": {
"document": "***123456**",
"name": "JOAO PEREIRA DA SILVA",
"qualification": "17"
}
}
],
"simples": {
"optIn": true,
"optInDate": "2016-01-01T00:00:00.000Z",
"optOutDate": "2020-12-31T00:00:00.000Z"
},
"mei": {
"optIn": true,
"optInDate": "2016-01-01T00:00:00.000Z",
"optOutDate": "2020-12-31T00:00:00.000Z"
},
"createdAt": "2026-07-14T09:00:00.000Z",
"updatedAt": "2026-08-18T09:00:00.000Z"
}
],
"next": "MTEyMjIzMzMwMDAxODE"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "REGISTRY",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "legalName",
"message": "Too big: expected string to have <=120 characters",
"code": "LEGALNAME_MAX"
}
]
}Search companies
Searches Brazil’s public company registry, one establishment (headquarters or branch) per result, in CNPJ order.
curl --request GET \
--url https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companiesimport requests
url = "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"_id": "11222333000181",
"document": "11222333000181",
"companyDocument": "11222333",
"branchNumber": "0001",
"branchType": "HEADQUARTERS",
"status": "ACTIVE",
"refDate": "2026-08",
"tradingName": "EXEMPLO MERCADO",
"statusDate": "2015-03-12T00:00:00.000Z",
"statusReason": "00",
"specialStatus": "RECUPERACAO JUDICIAL",
"specialStatusDate": "2022-06-01T00:00:00.000Z",
"foundingDate": "2015-03-12T00:00:00.000Z",
"mainActivity": "4712100",
"secondaryActivities": [
"4721102"
],
"email": "contato@exemplo.com.br",
"phoneNumber": "+551133334444",
"secondaryPhoneNumber": "+551155556666",
"fax": "+551177778888",
"address": {
"street": "AVENIDA PAULISTA",
"number": "1578",
"complement": "ANDAR 3",
"neighborhood": "BELA VISTA",
"city": "SAO PAULO",
"cityCode": "7107",
"state": "SP",
"postalCode": "01310200"
},
"foreignCity": "LISBOA",
"country": "PT",
"countryCode": "607",
"legalName": "EXEMPLO COMERCIO DE ALIMENTOS LTDA",
"legalNature": "2062",
"size": "SMALL",
"capital": 50000000,
"responsibleQualification": "49",
"federativeEntity": "UNIAO",
"shareholders": [
{
"documentType": "CPF",
"name": "MARIA DA SILVA",
"document": "***123456**",
"qualification": "49",
"joinedAt": "2015-03-12T00:00:00.000Z",
"country": "US",
"countryCode": "249",
"ageRange": "5",
"legalRepresentative": {
"document": "***123456**",
"name": "JOAO PEREIRA DA SILVA",
"qualification": "17"
}
}
],
"simples": {
"optIn": true,
"optInDate": "2016-01-01T00:00:00.000Z",
"optOutDate": "2020-12-31T00:00:00.000Z"
},
"mei": {
"optIn": true,
"optInDate": "2016-01-01T00:00:00.000Z",
"optOutDate": "2020-12-31T00:00:00.000Z"
},
"createdAt": "2026-07-14T09:00:00.000Z",
"updatedAt": "2026-08-18T09:00:00.000Z"
}
],
"next": "MTEyMjIzMzMwMDAxODE"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "REGISTRY",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "legalName",
"message": "Too big: expected string to have <=120 characters",
"code": "LEGALNAME_MAX"
}
]
}refDate is the month of the registry data it reflects. The search covers the stored records only — it never looks a company up. The data is the same for every organization — nothing in it belongs to yours.
Every filter is optional and they combine. legalName matches the beginning of the legal name only (at least 3 characters), never the middle. mainActivity is a CNAE code, matched exactly when it has 7 digits and as a prefix when shorter. companyDocument lists every establishment of one company. Page with limit (up to 100) and next: pass the next cursor of one page to get the following one; the last page answers next as null.
A result carries the registry’s codes (statusReason, legalNature, …); GET /realms/{realmId}/organizations/{organizationId}/companies/{document} adds their text.Path Parameters
ID of your realm.
Format: UUID
ID of the organization making the request.
Format: UUID
Query Parameters
Main economic activity (CNAE code). A 7-digit code matches that activity exactly; a shorter code, from 2 to 6 digits, matches every activity that starts with it (62 is the whole division).
^\d{2,7}$Only establishments in one of these registration statuses.
Example (comma-separated list): ?status=ACTIVE,SUSPENDED
ANNULLED, ACTIVE, ACTIVE_IRREGULAR, SUSPENDED, INAPT, CLOSED Only companies whose legal name starts with this text (case-insensitive, at least 3 characters). It matches the beginning of the name, never the middle.
3 - 120Only companies of one of these legal natures (4-digit codes of Receita Federal's table).
Example (comma-separated list): ?legalNature=2046,2062
20^\d{4}$The first 8 characters of a CNPJ, which identify one company: lists the headquarters and every branch of it.
^[A-Za-z0-9]{8}$Cursor returned as next by the previous page. Omit it to get the first page.
64Page size, from 1 to 100. Defaults to 15.
1 <= x <= 100