BrasilAPI
App · 15 actions
Look up Brazilian public data: addresses by CEP, companies by CNPJ, banks, DDD area codes, holidays, FIPE vehicle prices, books by ISBN, NCM codes, PIX participants, .br domains, interest and exchange rates and CVM brokers.
Actions
| Action | What it does |
|---|---|
| Check a .br domain | Check on registro.br whether a .br domain is registered or free to register, and when a registered one expires. |
| Get a bank | Get a bank's names, ISPB identifier and headquarters address from its three-digit code, such as 341 for Itaú. |
| Get a vehicle's FIPE price | Get the average price of a vehicle in the FIPE table: pick the type, then the brand, model and year. |
| Get an exchange rate | Get the Central Bank's rate for a currency in reais on a date. |
| Get interest rates | Get Brazil's official rates: SELIC (the Central Bank's base rate), CDI (the interbank rate) and IPCA (inflation), in percent. |
| List banks | List Brazil's banks and payment institutions with their three-digit codes and ISPB identifiers, ordered by code. |
| List brokers | List the brokerage firms (corretoras) registered with the CVM, Brazil's securities regulator, with their CNPJ and contacts. |
| List holidays | List Brazil's national holidays for a year, moveable ones such as Carnaval included. |
| List PIX participants | List the banks and payment institutions taking part in PIX, Brazil's instant payment system, with their ISPB identifiers. |
| List vehicle brands | List the car, motorcycle or truck brands in the FIPE table, Brazil's reference for used vehicle prices, with their codes. |
| Look up a book by ISBN | Get a book's title, authors, publisher, synopsis and details from its ISBN. |
| Look up a CEP | Get the street, neighborhood, city and state of a CEP (Brazilian postal code), with map coordinates when known. |
| Look up a company by CNPJ | Get a company's public registration from its CNPJ (Brazilian company number): legal and trade names, status, activities, address, phone and partners. |
| Look up a DDD area code | Find the state and cities a DDD (the two-digit phone area code, such as 11 for São Paulo) covers. |
| Search NCM codes | Find NCM codes, the Mercosur product codes used on Brazilian invoices and customs forms, by code or by description. |
Check a .br domain
Check on registro.br whether a .br domain is registered or free to register, and when a registered one expires.
Inputs
- Domain
domaintextRequired - The domain, such as petrobras.com.br. A name without an ending is checked as .com.br.
Outputs
domaintext- The domain checked. A bare name is checked as .com.br.
expires_attext- When the registration expires, for a registered domain.
is_availabletrue/false- True when the domain can be registered.
is_registeredtrue/false- True when someone holds it.
name_serverslist- Its name servers, for a registered domain.
reasonslist- Why it cannot be registered, in Portuguese.
statustext- registro.br's status, such as AVAILABLE, REGISTERED or UNAVAILABLE.
suggestionslist- Other .br endings where the same name is free.
Example output
{
"domain": "petrobras.com.br",
"expires_at": "2030-06-14T00:00:00-03:00",
"is_available": false,
"is_registered": true,
"name_servers": [
"ns-187.awsdns-23.com",
"ns-1611.awsdns-09.co.uk"
],
"reasons": [],
"status": "REGISTERED",
"suggestions": []
}Get a bank
Get a bank's names, ISPB identifier and headquarters address from its three-digit code, such as 341 for Itaú.
Inputs
- Bank
codetextRequired - The bank, or its three-digit code, such as 341.
Outputs
codenumber- Three-digit bank code (COMPE), such as 341. Empty for institutions without one.
full_nametext- Full legal name.
headquartersobject- Headquarters address, as the Central Bank lists it.
ispbtext- 8-digit ISPB identifier used in transfers and PIX.
logo_urltext- Address of the bank's logo, when there is one.
nametext- Short name.
Example output
{
"code": 341,
"full_name": "ITA\u00da UNIBANCO S.A.",
"headquarters": {
"cep": "04344-902",
"city": "S\u00c3O PAULO",
"complement": "TORRE OLAVO SETUBAL",
"neighborhood": "PARQUE JABAQUARA",
"number": null,
"state": "SP",
"street": "PCA ALFREDO EGYDIO SOUZA ARANHA 100"
},
"ispb": "60701190",
"logo_url": "https://cdn.jsdelivr.net/npm/logos-bancos-br@0/logos/svg/60701190.svg",
"name": "ITA\u00da UNIBANCO S.A."
}Get a vehicle's FIPE price
Get the average price of a vehicle in the FIPE table: pick the type, then the brand, model and year. Also gives its FIPE code.
Inputs
- Vehicle type
vehicle_typetextRequired - Cars, motorcycles or trucks.One of:
carros(Cars),motos(Motorcycles),caminhoes(Trucks). Default:carros. - Brand
brandtextRequired - The brand, or its FIPE brand code, such as 21 for Fiat.
- Model
modeltextRequired - The model, or its FIPE model code.
- Year
yeartextRequired - The model year and fuel, or its code, such as 2020-1. 32000 is a brand-new (zero km) vehicle.
Outputs
brandtext- Brand.
fipe_codetext- FIPE code of the model, as 001004-9.
fueltext- Fuel, such as Gasolina, Álcool, Flex or Diesel.
modeltext- Model and version.
model_yearnumber- Model year. 32000 means a brand-new (zero km) vehicle.
pricenumber- Average price in reais.
price_texttext- The price as FIPE writes it, such as R$ 4.890,00.
reference_monthtext- The month the price is for, in Portuguese.
vehicle_typetext- car, motorcycle or truck.
Example output
{
"brand": "Fiat",
"fipe_code": "001124-0",
"fuel": "Gasolina",
"model": "147 C/ CL",
"model_year": 1985,
"price": 4890.0,
"price_text": "R$ 4.890,00",
"reference_month": "outubro de 2026",
"vehicle_type": "car"
}Get an exchange rate
Get the Central Bank's rate for a currency in reais on a date. For a weekend or holiday, the last business day before it is used.
Inputs
- Currency
currencytextRequired - The currency, such as USD or EUR.Default:
USD. - Date
datedateRequired - The day to get the rate for. It can't be in the future.
Outputs
bulletintext- Which bulletin buy_rate and sell_rate come from, such as PTAX closing.
buy_ratenumber- Reais per unit of the currency, buying, from the day's closing PTAX bulletin (or its last one).
currencytext- Currency code, such as USD.
datetext- The date the rates are from: the last business day on or before the date asked for.
quoted_attext- When that bulletin was published.
quoteslist- Every bulletin of the day, in order.
requested_datetext- The date asked for.
sell_ratenumber- Reais per unit of the currency, selling.
Example output
{
"bulletin": "PTAX closing",
"buy_rate": 4.9886,
"currency": "USD",
"date": "2026-10-09",
"quoted_at": "2026-10-09 13:07:30.746597",
"quotes": [
{
"bulletin": "opening",
"buy_parity": 1.0,
"buy_rate": 5.0012,
"sell_parity": 1.0,
"sell_rate": 5.0018,
"time": "2026-10-09 10:10:14.047225"
},
{
"bulletin": "PTAX closing",
"buy_parity": 1.0,
"buy_rate": 4.9886,
"sell_parity": 1.0,
"sell_rate": 4.9892,
"time": "2026-10-09 13:07:30.746597"
}
],
"requested_date": "2026-10-11",
"sell_rate": 4.9892
}Get interest rates
Get Brazil's official rates: SELIC (the Central Bank's base rate), CDI (the interbank rate) and IPCA (inflation), in percent.
Inputs
None.
Outputs
cdinumber- CDI, the interbank rate, in percent a year.
ipcanumber- IPCA, official inflation over the last 12 months, in percent.
rateslist- Every rate BrasilAPI publishes.
selicnumber- SELIC, the Central Bank's base rate, in percent a year.
Example output
{
"cdi": 13.65,
"ipca": 4.58,
"rates": [
{
"name": "SELIC",
"value": 13.75
},
{
"name": "CDI",
"value": 13.65
},
{
"name": "IPCA",
"value": 4.58
}
],
"selic": 13.75
}List banks
List Brazil's banks and payment institutions with their three-digit codes and ISPB identifiers, ordered by code.
Inputs
- Name contains
searchtext - Keep only entries whose name contains this. Leave empty for all.
Outputs
bankslist- Banks and payment institutions, by code.
countnumber- How many entries the list holds.
Example output
{
"banks": [
{
"code": 341,
"full_name": "ITA\u00da UNIBANCO S.A.",
"ispb": "60701190",
"name": "ITA\u00da UNIBANCO S.A."
},
{
"code": 479,
"full_name": "Banco ItauBank S.A.",
"ispb": "60394079",
"name": "BCO ITAUBANK S.A."
}
],
"count": 2
}List brokers
List the brokerage firms (corretoras) registered with the CVM, Brazil's securities regulator, with their CNPJ and contacts.
Inputs
- State
statetext - Only brokers based in this state. Leave empty for all.One of:
AC(AC - Acre),AL(AL - Alagoas),AP(AP - Amapá),AM(AM - Amazonas),BA(BA - Bahia),CE(CE - Ceará),DF(DF - Distrito Federal),ES(ES - Espírito Santo),GO(GO - Goiás),MA(MA - Maranhão), and 17 more. - Name contains
searchtext - Keep only entries whose name contains this. Leave empty for all.
- Operating only
active_onlytrue/false - Leave on to skip brokers whose registration was cancelled, which are most of the list.Default:
true.
Outputs
brokerslist- Brokers, A to Z.
countnumber- How many entries the list holds.
Example output
{
"brokers": [
{
"cep": "22250-911",
"city": "RIO DE JANEIRO",
"cnpj": "02.332.886/0001-04",
"complement": "BLOCO I, SAL\u00c3O 501",
"cvm_code": "3247",
"email": "fabricio.almeida@xpi.com.br",
"name": "XP INVESTIMENTOS CCTVM S.A.",
"neighborhood": "BOTAFOGO",
"net_worth": 7394627000.0,
"net_worth_date": "2025-12-31",
"phone": "40033710",
"registered_on": "1997-12-05",
"state": "RJ",
"status": "EM FUNCIONAMENTO NORMAL",
"street": "PRAIA BOTAFOGO, 501",
"trade_name": "XP INVESTIMENTOS"
}
],
"count": 1
}List holidays
List Brazil's national holidays for a year, moveable ones such as Carnaval included. Choose a state to add its own holidays.
Inputs
- Year
yearnumber - The year, from 1900 to 2199. Leave empty for this year.From 1900 to 2199.
- State
statetext - Add this state's holidays to the national ones. Leave empty for national holidays only.One of:
AC(AC - Acre),AL(AL - Alagoas),AP(AP - Amapá),AM(AM - Amazonas),BA(BA - Bahia),CE(CE - Ceará),DF(DF - Distrito Federal),ES(ES - Espírito Santo),GO(GO - Goiás),MA(MA - Maranhão), and 17 more.
Outputs
countnumber- How many entries the list holds.
holidayslist- Holidays, in date order.
statetext- The state whose holidays were added, when one was chosen.
yearnumber- The year.
Example output
{
"count": 3,
"holidays": [
{
"date": "2026-01-01",
"name": "Confraterniza\u00e7\u00e3o mundial",
"state": null,
"type": "national",
"weekday": "Thursday"
},
{
"date": "2026-01-25",
"name": "Anivers\u00e1rio da Cidade de S\u00e3o Paulo",
"state": "SP",
"type": "state",
"weekday": "Sunday"
},
{
"date": "2026-02-16",
"name": "Carnaval",
"state": null,
"type": "national",
"weekday": "Monday"
}
],
"state": "SP",
"year": 2026
}List PIX participants
List the banks and payment institutions taking part in PIX, Brazil's instant payment system, with their ISPB identifiers.
Inputs
- Name contains
searchtext - Keep only entries whose name contains this. Leave empty for all.
- Max results
limitnumber - Return at most this many participants.From 1 to 1000. Default:
100.
Outputs
countnumber- How many are listed here.
participantslist- Participants, A to Z.
total_matchingnumber- How many matched, before Max results.
Example output
{
"count": 1,
"participants": [
{
"ispb": "18236120",
"modality": "Provedor de Conta Transacional",
"name": "NU PAGAMENTOS - IP",
"participation": "Direta",
"short_name": "NU PAGAMENTOS - IP",
"started_on": null
}
],
"total_matching": 1
}List vehicle brands
List the car, motorcycle or truck brands in the FIPE table, Brazil's reference for used vehicle prices, with their codes.
Inputs
- Vehicle type
vehicle_typetextRequired - Cars, motorcycles or trucks.One of:
carros(Cars),motos(Motorcycles),caminhoes(Trucks). Default:carros.
Outputs
brandslist- Brands, A to Z.
countnumber- How many entries the list holds.
vehicle_typetext- carros, motos or caminhoes.
Example output
{
"brands": [
{
"code": "60",
"name": "ADLY"
},
{
"code": "61",
"name": "AGRALE"
},
{
"code": "62",
"name": "APRILIA"
}
],
"count": 3,
"vehicle_type": "motos"
}Look up a book by ISBN
Get a book's title, authors, publisher, synopsis and details from its ISBN. Best for books published in Brazil.
Inputs
- ISBN
isbntextRequired - The 10- or 13-digit ISBN, with or without hyphens, such as 978-85-359-1484-9.
Outputs
authorslist- Authors, translators and illustrators.
cover_urltext- Address of the cover image.
formattext- PHYSICAL or DIGITAL.
height_cmnumber- Height in centimetres.
isbntext- ISBN-13.
locationtext- Where it was published.
page_countnumber- Number of pages.
pricenumber- Retail price, when known.
price_currencytext- Currency of the retail price.
publishertext- Publisher.
sourcetext- The catalogue the book was found in, such as cbl.
subjectslist- Subjects.
subtitletext- Subtitle.
synopsistext- Synopsis, usually in Portuguese.
titletext- Title.
width_cmnumber- Width in centimetres.
yearnumber- Year published.
Example output
{
"authors": [
"George Orwell",
"Alexandre Hubner",
"Heloisa Jahn"
],
"cover_url": null,
"format": "PHYSICAL",
"height_cm": 21.0,
"isbn": "9788535914849",
"location": "S\u00e3o Paulo, SP",
"page_count": 416,
"price": null,
"price_currency": null,
"publisher": "Companhia das Letras",
"source": "cbl",
"subjects": [
"Literatura"
],
"subtitle": null,
"synopsis": "Publicada originalmente em 1949, a distopia futurista 1984 \u00e9 um dos romances mais influentes do s\u00e9culo XX.",
"title": "1984",
"width_cm": 13.0,
"year": 2009
}Look up a CEP
Get the street, neighborhood, city and state of a CEP (Brazilian postal code), with map coordinates when known. The coordinates are often the city's centre rather than the street's.
Inputs
- CEP
ceptextRequired - The 8-digit postal code, with or without the hyphen, such as 01001-000.
Outputs
ceptext- The CEP (postal code), as 01001-000.
citytext- City.
city_ibge_codetext- The city's 7-digit IBGE code.
has_coordinatestrue/false- Whether latitude and longitude are filled in.
latitudenumber- Latitude, when BrasilAPI knows where the CEP is.
longitudenumber- Longitude, when BrasilAPI knows where the CEP is.
neighborhoodtext- Neighborhood (bairro).
sourcetext- The service BrasilAPI found the address in.
statetext- Two-letter state code, such as SP.
streettext- Street name. Empty for a CEP that covers a whole town.
Example output
{
"cep": "01001-000",
"city": "S\u00e3o Paulo",
"city_ibge_code": "3550308",
"has_coordinates": true,
"latitude": -23.5475,
"longitude": -46.63611,
"neighborhood": "S\u00e9",
"source": "open-cep",
"state": "SP",
"street": "Pra\u00e7a da S\u00e9"
}Look up a company by CNPJ
Get a company's public registration from its CNPJ (Brazilian company number): legal and trade names, status, activities, address, phone and partners.
Inputs
- CNPJ
cnpjtextRequired - The 14-digit company number, with or without punctuation, such as 33.000.167/0001-01.
Outputs
ceptext- CEP (postal code), as 20031-170.
citytext- City.
cnpjtext- The CNPJ, as 33.000.167/0001-01.
company_sizetext- Size class: MICRO EMPRESA, EMPRESA DE PEQUENO PORTE or DEMAIS.
complementtext- Address complement.
emailtext- Contact email, when registered.
is_activetrue/false- True when the status is ATIVA.
is_headquarterstrue/false- True for the head office (matriz), false for a branch (filial).
legal_nametext- Registered legal name (razão social).
legal_naturetext- Legal form, such as Sociedade Anônima Aberta.
main_activitytext- Main activity's description.
main_activity_codetext- Main activity's CNAE code.
meitrue/false- Whether it is an MEI (individual micro-entrepreneur); empty when unknown.
neighborhoodtext- Neighborhood (bairro).
numbertext- Street number.
opened_ontext- Date the company started (YYYY-MM-DD).
partnerslist- Partners and directors (quadro societário).
phonetext- Phone number with its DDD (area code).
secondary_activitieslist- Other registered activities.
share_capitalnumber- Share capital in reais.
simples_nacionaltrue/false- Whether the company is in the Simples Nacional tax regime; empty when unknown.
statetext- Two-letter state code.
statustext- Registration status as the Receita Federal gives it, such as ATIVA (active) or BAIXADA (closed).
status_datetext- Date the status took effect (YYYY-MM-DD).
streettext- Street, with its type (AVENIDA, RUA...).
trade_nametext- Trade name (nome fantasia), when there is one.
Example output
{
"cep": "20031-170",
"city": "RIO DE JANEIRO",
"cnpj": "33.000.167/0001-01",
"company_size": "DEMAIS",
"complement": null,
"email": null,
"is_active": true,
"is_headquarters": true,
"legal_name": "PETROLEO BRASILEIRO S A PETROBRAS",
"legal_nature": "Sociedade de Economia Mista",
"main_activity": "Extra\u00e7\u00e3o de petr\u00f3leo e g\u00e1s natural",
"main_activity_code": "0600001",
"mei": null,
"neighborhood": "CENTRO",
"number": "65",
"opened_on": "1966-09-28",
"partners": [
{
"age_range": "Entre 61 a 70 anos",
"joined_on": "2023-04-17",
"name": "CLARICE COPPETTI",
"role": "Diretor"
},
{
"age_range": "Entre 51 a 60 anos",
"joined_on": "2024-07-17",
"name": "FERNANDO SABBI MELGAREJO",
"role": "Diretor"
}
],
"phone": "2121660000",
"secondary_activities": [
{
"code": "1921700",
"description": "Fabrica\u00e7\u00e3o de produtos do refino de petr\u00f3leo"
},
{
"code": "3520401",
"description": "Produ\u00e7\u00e3o de g\u00e1s; processamento de g\u00e1s natural"
}
],
"share_capital": 205431960000.0,
"simples_nacional": null,
"state": "RJ",
"status": "ATIVA",
"status_date": "2005-11-03",
"street": "AVENIDA REPUBLICA DO CHILE",
"trade_name": "PETROBRAS - EDISE"
}Look up a DDD area code
Find the state and cities a DDD (the two-digit phone area code, such as 11 for São Paulo) covers.
Inputs
- DDD
dddnumberRequired - The two-digit area code, such as 21.From 11 to 99.
Outputs
citieslist- Cities that use it, A to Z.
city_countnumber- How many cities use it.
dddtext- The DDD (area code).
statetext- Two-letter code of the state it is in.
Example output
{
"cities": [
"BELFORD ROXO",
"NITER\u00d3I",
"RIO DE JANEIRO"
],
"city_count": 3,
"ddd": "21",
"state": "RJ"
}Search NCM codes
Find NCM codes, the Mercosur product codes used on Brazilian invoices and customs forms, by code or by description.
Inputs
- Search
querytextRequired - A code such as 0901.11.10, or words from the description in Portuguese, such as café torrado.
Outputs
countnumber- How many entries the list holds.
querytext- What was searched for.
resultslist- Matching codes.
Example output
{
"count": 1,
"query": "caf\u00e9 torrado",
"results": [
{
"code": "0901.2",
"description": "- Caf\u00e9 torrado:",
"legal_act": "Res Gecex 272 2021",
"valid_from": "2022-04-01",
"valid_until": "9999-12-31"
}
]
}