Brazil Exchange Rates API (Cotação PTAX)
Pricing
from $1.40 / 1,000 exchange rates
Brazil Exchange Rates API (Cotação PTAX)
Get official PTAX exchange rates from Banco Central do Brasil: buy and sell rates in BRL, parities and bulletin time for USD, EUR and other currencies, for one day or a period.
Pricing
from $1.40 / 1,000 exchange rates
Rating
0.0
(0)
Developer
br_data_hub
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Get the official Brazilian exchange rates (PTAX) published by Banco Central do Brasil: buy and sell rates in BRL for USD, EUR and other currencies, for one day or a whole period.
PTAX is the reference rate used in contracts, invoices, customs, taxes and accounting in Brazil. Use this Actor to convert prices, keep a daily rate history, feed spreadsheets and ERPs, or give an AI agent the official rate.
What you get per rate
- Currency code and name, plus BCB currency type (A or B, which tells how the parity is quoted)
- Date and bulletin: closing PTAX (the official rate), opening or intermediate
- Buy and sell rate in BRL
- Buy and sell parity against USD
- Exact bulletin time (Brasília time, ISO 8601)
Input
| Field | Description |
|---|---|
currencies | ISO codes, e.g. ["USD", "EUR", "GBP"]. Default ["USD"]. |
dateFrom, dateTo | Quote date range (YYYY-MM-DD, max 366 days). Both empty = the last business day with published rates. Only dateFrom = that single day. |
bulletinType | closing (default, the official PTAX), opening, intermediate or all. |
Weekends and holidays
The Central Bank publishes no rates on weekends and national holidays. Those days are simply left out of the results. A range that holds only such days ends successfully with no rows and you pay nothing. With no dates, the Actor looks back up to 10 days and returns the most recent day that has rates. Before about 13:00 Brasília time that is the previous business day, since the closing PTAX is not out yet.
Output example
{"currency": "USD","currencyName": "Dólar dos Estados Unidos","currencyType": "A","date": "2026-10-23","bulletinType": "closing","bulletinTypePt": "Fechamento PTAX","buyRateBrl": 5.4002,"sellRateBrl": 5.4008,"buyParity": 1,"sellParity": 1,"quotedAt": "2026-10-23T13:06:30.325-03:00"}
How much does it cost?
Pay per event: one rate event (US$ 0.002) per row returned, that is one currency, date and bulletin. A month of daily closing USD rates is about 22 rows (US$ 0.044). Days without rates, input errors and failed runs cost nothing. If you set a maximum charge per run, the Actor stops when it is reached.
This Actor does one thing: PTAX exchange rates. Other Brazilian public data (company registry, public contracts) is available from the same publisher.
$0.002 per exchange rate (rate event, pay per event). Charged once per rate returned: one currency, date and bulletin. Days without rates are free.
| You get | Free tier | Bronze tier (10% off) | Gold tier (30% off) |
|---|---|---|---|
| 100 exchange rates | $0.20 | $0.18 | $0.14 |
| 1,000 exchange rates | $2.00 | $1.80 | $1.40 |
| 10,000 exchange rates | $20.00 | $18.00 | $14.00 |
Discounts follow your Apify subscription tier: Bronze 10%, Silver 20%, Gold and above 30%. No subscription to this Actor and no charge for platform usage: you pay only for results. The Apify Free plan includes $5 of monthly credit, enough for about 2,500 exchange rates at the list price. You can cap the cost of any run with Maximum cost per run; the Actor stops when it is reached.
Data source and limits
Official open data API of Banco Central do Brasil (Olinda, PTAX service, olinda.bcb.gov.br), published as open data under Brazil's open data policy (Decree 8,777/2016). Source: Banco Central do Brasil. This Actor is not affiliated with or endorsed by the Central Bank. Rates are exactly as published by the BCB. A run covers up to 366 days, so split longer histories into several runs.
More questions
Which rate should I use for contracts, invoices and taxes?
The closing PTAX (bulletinType: "closing", the default). It is the rate the Central Bank publishes as the official PTAX of the day. The opening and intermediate bulletins come out earlier in the day and are available with opening, intermediate or all.
Why do I get yesterday's rate when I run it in the morning?
With no dates, the Actor returns the most recent day that has the bulletin you asked for. The closing PTAX comes out around 13:00 Brasília time, so before that the latest closing rate is the previous business day's. Ask for opening or intermediate to get today's earlier bulletins.
Which currencies are available?
The ones the Central Bank quotes in PTAX, read live from its currency list on every run (USD, EUR, GBP, JPY, CHF, CAD and others). Use three-letter ISO codes; case and duplicates do not matter. If you ask for a currency the Central Bank does not quote, the run fails with a message listing the available codes, and nothing is charged.
How far back can I go, and how long can a range be?
A run covers up to 366 days. For longer histories, split the period into several runs (one per year, for example). A start date in the future is rejected; an end date after today is cut to today.
What happens on weekends, holidays and Carnival?
The Central Bank publishes no rates on those days, so they are simply missing from the results. A range with only such days ends successfully with no rows and costs nothing. With no dates, the Actor looks back up to 10 days, which covers long breaks such as Carnival.
What are the parity fields and the currency type?
buyParity and sellParity are the rates against the US dollar, as published by the Central Bank. currencyType (A or B) is the Central Bank's flag for how that parity is quoted for each currency. For USD both parities are 1.
Why not call the Central Bank API directly?
You can: it is free. This Actor saves the work of building OData URLs, converting MM-DD-YYYY dates, picking the closing bulletin, finding the last business day and retrying when the API is unstable (up to 5 attempts on server and network errors). It returns English field names and ISO timestamps with the Brasília offset, ready for spreadsheets, ERPs and AI agents.
Use it via API
Run it from any language and get the results as JSON. Replace <YOUR_API_TOKEN> with your Apify API token.
curl -X POST "https://api.apify.com/v2/acts/br_data_hub~br-exchange-rates/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \-H "Content-Type: application/json" \-d '{"currencies": ["USD"]}'
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("br_data_hub/br-exchange-rates").call(run_input={'currencies': ['USD']})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
You can also schedule runs, send results to webhooks, or connect the Actor to Make, Zapier, n8n, Google Sheets and other integrations.
Use it with AI agents (MCP)
This Actor is ready for AI agents: typed input and output schemas, pay-per-event pricing, limited permissions and short runs.
- Apify MCP server: add
https://mcp.apify.com/?tools=br_data_hub/br-exchange-ratesto Claude, ChatGPT, Cursor, VS Code or any MCP client, and the agent can call this Actor as a tool. - Agent frameworks: call it from LangChain, LlamaIndex, CrewAI or the OpenAI Agents SDK through the Apify integrations, or with the API call above.
- Results come as structured JSON with stable field names, documented in the Output tab.
FAQ
Where does the data come from?
Official open data API of Banco Central do Brasil (Olinda, PTAX service, olinda.bcb.gov.br), published as open data under Brazil's open data policy (Decree 8,777/2016). Source: Banco Central do Brasil. This Actor is not affiliated with or endorsed by the Central Bank. Rates are exactly as published by the BCB. A run covers up to 366 days, so split longer histories into several runs.
How much does it cost?
$0.002 per exchange rate. Discounts follow your Apify subscription tier: Bronze 10%, Silver 20%, Gold and above 30%. See How much does it cost? above for examples.
Do I pay for errors or empty results?
No. Charged once per rate returned: one currency, date and bulletin. Days without rates are free.
Can I run it on a schedule or connect it to other tools?
Yes. Use Apify schedules to run it daily or weekly, webhooks to get notified, and integrations such as Make, Zapier, n8n and Google Sheets. Everything also works through the API.
Can AI agents use it?
Yes. It works as a tool in the Apify MCP server and in agent frameworks, and AI agents can pay per event. See Use it with AI agents (MCP).
Is it legal to use this data?
The Actor reads only public, official sources and keeps personal data masked as the source publishes it. You are responsible for how you use the data, including LGPD compliance.
I found a bug or need a feature. What should I do?
Open an issue in the Issues tab. We answer within 14 days, usually much sooner.
More Actors from BR Data Hub
| Actor | What it does |
|---|---|
| Brazil Treasury Bonds API (Tesouro Direto) | Daily rates and unit prices of Brazilian Treasury bonds (Tesouro Direto: Selic, Prefixado, IPCA+, Renda+, Educ |
| Brazil Inflation Calculator (IPCA, IGP-M, Selic) | Correct BRL amounts in bulk by IPCA, INPC, IGP-M, IGP-DI, IPC-Fipe, Selic, CDI, TR or savings (poupança) using |
| Brazil Company Financials (CVM DFP/ITR, B3) | Standardized financial statements of Brazilian listed companies from CVM open data (DFP annual, ITR quarterly) |
| Brazil Investment Fund Returns (Fundos CVM) | Ready-made performance metrics for Brazilian investment funds from CVM open data: period, YTD and 12-month ret |
| Brazil Fuel Prices by City (ANP Combustíveis) | Weekly fuel prices in Brazil from the ANP open data survey (not affiliated with the ANP): average, minimum, ma |
See all our Actors at apify.com/br_data_hub.
Usar em português
Cotações oficiais PTAX do Banco Central do Brasil: taxa de compra e de venda em reais, paridades com o dólar e horário exato do boletim, para USD, EUR e as demais moedas que o Banco Central cota, num dia ou num período.
Para que serve: converter valores em contratos, notas fiscais, importação e exportação, contabilidade e impostos; manter um histórico diário do câmbio numa planilha ou ERP; dar a um agente de IA a cotação oficial do dia.
Como usar em 3 passos:
- Em
currencies, informe os códigos ISO das moedas (padrão["USD"]). - Deixe as datas vazias para receber o último dia útil com cotação, ou preencha
dateFromedateTo(AAAA-MM-DD, até 366 dias por execução). - Escolha o boletim em
bulletinType:closing(Fechamento PTAX, a taxa oficial, padrão),opening(abertura),intermediate(intermediários) ouall. Rode e baixe o resultado em JSON, CSV ou Excel.
Exemplo de entrada:
{"currencies": ["USD", "EUR"], "dateFrom": "2026-10-01", "dateTo": "2026-10-31", "bulletinType": "closing"}
Campos principais: currency, currencyName, date, bulletinType e bulletinTypePt (o nome do boletim em português), buyRateBrl (compra), sellRateBrl (venda), buyParity e sellParity (paridade com o dólar), currencyType (tipo A ou B do Banco Central) e quotedAt (horário do boletim, com fuso de Brasília).
Bom saber:
- O Fechamento PTAX sai por volta das 13h de Brasília. Antes disso, sem datas, você recebe o fechamento do dia útil anterior.
- Fins de semana, feriados nacionais e Carnaval não têm cotação: ficam fora do resultado, sem erro.
- Moeda que o Banco Central não cota gera erro com a lista das moedas disponíveis.
O que é grátis: dias sem cotação, erros de entrada (moeda inválida, data no futuro, período maior que 366 dias) e execuções que falham. Você paga só por cotação entregue. Fonte: Banco Central do Brasil (dados abertos). Ferramenta independente, sem vínculo com o Banco Central.
Quanto custa: $0.002 por resultado (rate); 1.000 resultados saem por $2.00. Desconto pelo nível da assinatura Apify: Bronze 10%, Silver 20%, Gold ou acima 30%. Erros e consultas sem resultado não são cobrados. Use também pela API ou por agentes de IA no servidor MCP da Apify (https://mcp.apify.com/?tools=br_data_hub/br-exchange-rates).