> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Banco Central do Brasil (SGS)

> Keyless time series from the Central Bank of Brazil's SGS system (Selic, IPCA, exchange rates, credit and thousands more) by series code.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/bcb.webp?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=1ec7b19f44c16763434677a2356a2715)

[Web Catalog · Finance](https://docs.webrouter.net/data-apis.md?category=finance)

No key needed

Endpoints

2

Auth

None

[Vendor docs](https://dadosabertos.bcb.gov.br/)

## Notes

* Keyless. Each series has a numeric code listed on its dadosabertos.bcb.gov.br dataset page.
* Dates are dd/MM/yyyy.
* Pass formato=json; the series path is bcdata.sgs.\{code}.

## Endpoints

GET

Get a series over a date range

Date and value pairs of one SGS series between two dates.

[Open](#bcb-series-get)

GET

Get the latest values of a series

The last N date and value pairs of one SGS series.

[Open](#bcb-series-latest)

### Get a series over a date range

GET

`/bcdata.sgs.{code}/dados`

`bcb.series.get`

Date and value pairs of one SGS series between two dates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`code` required</td><td>integer</td><td>path</td><td>SGS series code. Example `20542`</td></tr>
    <tr><td>`formato`</td><td>string</td><td>query</td><td>Response format. One of `json` Example `json`</td></tr>
    <tr><td>`dataInicial`</td><td>string</td><td>query</td><td>Start date, dd/MM/yyyy. Example `01/01/2020`</td></tr>
    <tr><td>`dataFinal`</td><td>string</td><td>query</td><td>End date, dd/MM/yyyy. Example `31/12/2020`</td></tr>
  </tbody>
</table>

[Vendor docs](https://dadosabertos.bcb.gov.br/dataset/20542-saldo-da-carteira-de-credito-com-recursos-livres---total/resource/6e2b0c97-afab-4790-b8aa-b9542923cf88) · Same job: [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-regional-data), [Statistics Canada Web Data Service](https://docs.webrouter.net/data-apis/statcan.md#statcan-series-latest), [US Treasury Fiscal Data](https://docs.webrouter.net/data-apis/treasury-fiscal-data.md#treasury-fiscal-data-debt-to-penny), [UNESCO Institute for Statistics Data API](https://docs.webrouter.net/data-apis/unesco-uis.md#unesco-uis-indicators-data), [WHO Global Health Observatory](https://docs.webrouter.net/data-apis/who-gho.md#who-gho-indicator-data)

```python Python theme={null}
router.call_data_api("bcb.series.get", {'code': 20542, 'formato': 'json', 'dataInicial': '01/01/2020', 'dataFinal': '31/12/2020'})
```

```text MCP theme={null}
call_data_api(endpoint="bcb.series.get", params={"code": 20542, "formato": "json", "dataInicial": "01/01/2020", "dataFinal": "31/12/2020"})
```

### Get the latest values of a series

GET

`/bcdata.sgs.{code}/dados/ultimos/{count}`

`bcb.series.latest`

The last N date and value pairs of one SGS series.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`code` required</td><td>integer</td><td>path</td><td>SGS series code. Example `20542`</td></tr>
    <tr><td>`count` required</td><td>integer</td><td>path</td><td>How many of the most recent values. Example `10`</td></tr>
    <tr><td>`formato`</td><td>string</td><td>query</td><td>Response format. One of `json` Example `json`</td></tr>
  </tbody>
</table>

[Vendor docs](https://dadosabertos.bcb.gov.br/dataset/20542-saldo-da-carteira-de-credito-com-recursos-livres---total/resource/6e2b0c97-afab-4790-b8aa-b9542923cf88) · Same job: [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-regional-data), [Statistics Canada Web Data Service](https://docs.webrouter.net/data-apis/statcan.md#statcan-series-latest), [US Treasury Fiscal Data](https://docs.webrouter.net/data-apis/treasury-fiscal-data.md#treasury-fiscal-data-debt-to-penny), [UNESCO Institute for Statistics Data API](https://docs.webrouter.net/data-apis/unesco-uis.md#unesco-uis-indicators-data), [WHO Global Health Observatory](https://docs.webrouter.net/data-apis/who-gho.md#who-gho-indicator-data)

```python Python theme={null}
router.call_data_api("bcb.series.latest", {'code': 20542, 'count': 10, 'formato': 'json'})
```

```text MCP theme={null}
call_data_api(endpoint="bcb.series.latest", params={"code": 20542, "count": 10, "formato": "json"})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.