# Banco Central do Brasil Time Series API

> Banco Central do Brasil SGS: Selic, CDI, IPCA, exchange rates and 20,000+ economic time series

- Vendor: `bancocentraldobrasiltimeseries` · version 1.0 · category Finance · tags bcb api, selic api, brazil interest rate api, ipca api, brl exchange rate api, brazil economic data api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/bancocentraldobrasiltimeseries
- This document: https://apiclay.com/docs/bancocentraldobrasiltimeseries.md
- OpenAPI 3.1: https://apiclay.com/api/bancocentraldobrasiltimeseries/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `bancocentraldobrasiltimeseries`
- Updated: 2026-11-18

## About

## Banco Central do Brasil Time Series API

The SGS time-series API of Banco Central do Brasil: any of its 20,000+ economic and financial series by code, such as the Selic target and daily rate, CDI, IPCA and IGP-M inflation, the dollar and PTAX exchange rates, credit, money supply and reserves, either the latest N values or a date range.

Data comes from **bcb.gov.br** (https://www.bcb.gov.br). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/latest?series=432&amp;count=5` (Selic target), then `/range?series=433&amp;dataInicial=01/01/2026&amp;dataFinal=31/10/2026` (IPCA).

### Routes

#### GET `/latest` - Latest values
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| series | path | number | yes | SGS code: `432` Selic target, `11` Selic daily, `12` CDI, `433` IPCA monthly, `189` IGP-M, `1` USD/BRL selling, `10813` PTAX selling. |
| count | path | number | yes | How many latest values, up to 20. |

Returns: Array: `data` (dd/MM/yyyy) and `valor` (string).

#### GET `/range` - Values in range
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| series | path | number | yes | SGS code, as above. |
| dataInicial | query | string | yes | Start date `dd/MM/yyyy`. |
| dataFinal | query | string | yes | End date `dd/MM/yyyy`; daily series allow up to 10 years per call. |

Returns: Array: `data` and `valor`.

### Caveats

- Values are strings with a dot decimal separator; series codes are listed on the bank's SGS site.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by bcb.gov.br.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /latest — Latest values
- Gateway: `GET https://api.apiclay.com/v1/api/bancocentraldobrasiltimeseries/latest`
- Public query params: `series` (string, required), `count` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /range — Values in range
- Gateway: `GET https://api.apiclay.com/v1/api/bancocentraldobrasiltimeseries/range`
- Public query params: `dataInicial` (string, required), `dataFinal` (string, required), `series` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/bancocentraldobrasiltimeseries/latest?series=<series>&count=<count>" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
