# Brazil Loan Interest Rates by Bank (BCB) - Ranking & Changes (`kman-br/bcb-juros-por-banco`) Actor

Interest rates charged by each Brazilian bank, by credit product (credit card revolving, overdraft, personal loan, payroll loan, working capital, mortgage…) from Banco Central's official open data. Ranking, median, percentile, gap to median and change vs the previous week or month.

- **URL**: https://apify.com/kman-br/bcb-juros-por-banco.md
- **Developed by:** [Kman](https://apify.com/kman-br) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Brazil Loan Interest Rates by Bank (Banco Central) – Ranking & Changes

**EN** · [PT-BR abaixo](#pt-br)

Banco Central do Brasil publishes, every week and every month, the average interest rate **each bank** charges on each credit product. This Actor turns that official API into a ready-to-use ranking with context:

- **Rate per bank and product**: monthly and annual %, BCB ranking position, CNPJ8.
- **Market context**: number of banks, median rate, gap to the median (p.p.), percentile.
- **Change**: rate and position in the previous non-overlapping week (or month), change in p.p., "new in ranking" flag.
- Weekly base split by individuals (PF) and companies (PJ); monthly base for long products such as mortgages.
- Filters: product name (accent-insensitive), bank name or CNPJ8, top N cheapest per product, how many periods, reference date.

Use it for comparison sites, credit fintech pricing, bank competitive intelligence, journalism and consumer-finance content.

### Input

```json
{ "base": "semanal", "segmento": "PF", "modalidades": ["cartão de crédito - rotativo", "crédito pessoal não consignado"], "periodos": 1, "compararAnterior": true }
```

### Output

```json
{ "periodo_inicio": "2026-10-22", "periodo_fim": "2026-10-28", "segmento": "PF", "modalidade": "Cartão de crédito - rotativo total - Prefixado", "instituicao": "BCO INDUSTRIAL DO BRASIL S.A.", "cnpj8": "31895683", "posicao": 1, "taxa_mes": 4.56, "taxa_ano": 70.71, "total_instituicoes": 61, "mediana_taxa_mes": 16.13, "diferenca_mediana_pp": -11.57, "percentil": 0, "taxa_mes_anterior": 4.26, "variacao_taxa_mes_pp": 0.3, "posicao_anterior": 4 }
```

`RUN_SUMMARY` adds median, min and max per product and period.

### Pricing (pay per event)

- US$ 0.01 per run
- US$ 0.001 per rate returned (1,000 rates = US$ 1)

### Source and licence

Banco Central do Brasil – *Taxas de juros de operações de crédito* (Olinda API `taxaJuros` v2), https://dadosabertos.bcb.gov.br/dataset/taxas-de-juros-de-operacoes-de-credito, **ODbL**. Only institutions (companies) appear; no personal data.

***

### PT-BR

Taxas de juros cobradas por **cada banco** em cada modalidade de crédito, direto da API oficial do Banco Central: cartão rotativo, cheque especial, crédito pessoal, consignado, capital de giro, financiamento imobiliário e outras.

- Ranking, mediana, percentil, distância da mediana e **variação contra a semana ou o mês anterior**.
- Base semanal (PF e PJ) ou mensal; filtros por modalidade, banco (nome ou CNPJ8), top N e data de referência.
- Preço: US$ 0,01 por execução + US$ 0,001 por taxa.
- Fonte: Banco Central do Brasil, licença ODbL. Sem dado pessoal.

# Actor input Schema

## `base` (type: `string`):

Janela publicada pelo Banco Central.

## `segmento` (type: `string`):

Só na base semanal.

## `modalidades` (type: `array`):

Ex.: cartão de crédito - rotativo, cheque especial, consignado INSS, capital de giro, imobiliário. Vazio = todas.

## `instituicoes` (type: `array`):

Filtra a saída; mediana e percentil continuam calculados sobre todos os bancos.

## `topNPorModalidade` (type: `integer`):

Só as N menores taxas de cada modalidade.

## `periodos` (type: `integer`):

Períodos mais recentes, sem sobreposição (semanas ou meses).

## `compararAnterior` (type: `boolean`):

Variação em pontos percentuais e posição anterior.

## `dataReferencia` (type: `string`):

AAAA-MM-DD. Usa o último período que começa até essa data.

## `maxItems` (type: `integer`):

Teto de itens cobrados.

## Actor input object example

```json
{
  "base": "semanal",
  "segmento": "todos",
  "modalidades": [
    "cheque especial"
  ],
  "periodos": 1,
  "compararAnterior": true,
  "maxItems": 2000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

RUN_SUMMARY: status, periods, medians per product, charged events.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "modalidades": [
        "cheque especial"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kman-br/bcb-juros-por-banco").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "modalidades": ["cheque especial"] }

# Run the Actor and wait for it to finish
run = client.actor("kman-br/bcb-juros-por-banco").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "modalidades": [
    "cheque especial"
  ]
}' |
apify call kman-br/bcb-juros-por-banco --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kman-br/bcb-juros-por-banco"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fSQ7Vc1cbRqxcGoSj/builds/IDGbcxpXADM4aSMgw/openapi.json
