# Brazil Banks & Pix Directory (Bancos e ISPB) (`br_data_hub/br-bank-pix-directory`) Actor

Every Brazilian bank and payment institution from official Banco Central lists: ISPB, COMPE bank code, short and full name, CNPJ base, Pix participation and modality, start date. Search by name, code, ISPB or CNPJ.

- **URL**: https://apify.com/br_data_hub/br-bank-pix-directory.md
- **Developed by:** [br_data_hub](https://apify.com/br_data_hub) (community)
- **Categories:** AI, Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 institutions

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Banks & Pix Directory (Bancos e ISPB)

A clean directory of **every Brazilian bank and payment institution**, built from the official lists of **Banco Central do Brasil (BCB)**: COMPE bank code, ISPB, short and full name, CNPJ base, and whether the institution takes part in **Pix**, and how.

Use it to validate bank codes in payment forms, map an ISPB from a Pix transaction to a bank name, enrich a CRM with bank data, or give an AI agent a reliable bank lookup.

### What you get per institution

- `compeCode`: 3-digit bank code used in transfers and boletos (e.g. `001`, `260`, `341`); empty for institutions without one
- `ispb`: 8-digit ISPB identifier used by the Brazilian payment system and Pix
- `shortName`, `fullName`
- `cnpjBase` (first 8 digits of the CNPJ) and the full `cnpj` when BCB publishes it
- `institutionType` (multiple bank, payment institution, credit cooperative...)
- `inStr`, `participatesInCompe`, `strAccess` and `strStartDate` (start of operation in the STR)
- `pixParticipant`, `pixParticipationType` (direct or indirect in the SPI), `pixRole`, `pixModality` (mandatory or voluntary)
- `pixListDate`: date of the Pix list used

### Input

| Field | Description |
|---|---|
| `queries` | Any mix of bank names (accents and case ignored), COMPE codes (`1`, `001`, `260`), ISPBs (`00360305`) or CNPJs (`60.746.948/0001-12`). Empty = whole directory. |
| `pixOnly` | Only institutions in the current Pix participants list. |
| `maxItems` | Stop after this many institutions (default 100). |

How a query is read: 1 to 3 digits is a COMPE code, 4 to 8 digits is an ISPB or CNPJ base, 14 digits is a full CNPJ (only the base is compared), anything with letters is a name search. A run takes a few seconds.

### Output example

```json
{
  "ispb": "18236120",
  "compeCode": "260",
  "shortName": "NU PAGAMENTOS - IP",
  "fullName": "NU PAGAMENTOS S.A. - INSTITUIÇÃO DE PAGAMENTO",
  "cnpjBase": "18236120",
  "institutionType": "Instituição de Pagamento",
  "participatesInCompe": false,
  "strStartDate": "2019-11-11",
  "pixParticipant": true,
  "pixParticipationType": "Direto",
  "pixModality": "Obrigatória",
  "pixListDate": "2026-10-29"
}
```

Labels such as `pixModality` and `institutionType` are kept in Portuguese exactly as BCB publishes them.

### How much does it cost?

You pay only for institutions returned (`institution` event). Downloading and searching the official lists is free.

This Actor does one thing: the bank and Pix directory. Company registry data is in **Brazil CNPJ Lookup**, from the same publisher.

**$0.001 per institution** (`institution` event, pay per event). Charged once per bank or payment institution returned. Downloading and searching the Banco Central lists is free.

| You get | Free tier | Bronze tier (10% off) | Gold tier (30% off) |
|---|---|---|---|
| 100 institutions | $0.10 | $0.09 | $0.07 |
| 1,000 institutions | $1.00 | $0.90 | $0.70 |
| 10,000 institutions | $10.00 | $9.00 | $7.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 **5,000 institutions** 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 freshness

Both files are downloaded from Banco Central on every run, so the output is always as current as BCB:

| List | Exact source | Update |
|---|---|---|
| STR participants (ISPB, COMPE code, names, start date) | `https://www.bcb.gov.br/content/estabilidadefinanceira/str1/ParticipantesSTR.csv` (fallback: `https://www.bcb.gov.br/pom/spb/estatistica/port/ParticipantesSTRport.csv`) | Updated by BCB when institutions join or leave |
| Pix participants (CNPJ, type, SPI participation, Pix modality) | `https://www.bcb.gov.br/content/estabilidadefinanceira/participantes_pix/lista-participantes-instituicoes-em-adesao-pix-YYYYMMDD.csv` | Published by BCB with the date in the file name; the Actor takes the newest file of the last 20 days |

The exact URLs and the Pix list date of each run are saved in the `SOURCES` record of the run's key-value store, and every item carries `pixListDate`. Public pages: [STR participants](https://www.bcb.gov.br/estabilidadefinanceira/participantesstr) and [Pix participants](https://www.bcb.gov.br/estabilidadefinanceira/participantespix).

The two lists are joined by ISPB. Institutions that operate in Pix only through another bank (indirect participants without an STR account) appear with `inStr: false` and no COMPE code. When BCB does not publish the full CNPJ, `cnpjBase` is the ISPB, which by BCB rule is the CNPJ base of the institution.

### More questions

#### What is the difference between COMPE code and ISPB?

The COMPE code is the 3-digit bank number used in TED/DOC transfers and boletos (`001` Banco do Brasil, `341` Itaú, `260` Nubank). The ISPB is the 8-digit identifier of the institution in the Brazilian payment system (SPB) and in Pix; it equals the first 8 digits of the institution's CNPJ. Many Pix institutions have an ISPB but no COMPE code, so `compeCode` is `null` for them.

#### How do I find the bank behind a Pix transaction?

Pix receipts and the Pix APIs identify the institution by ISPB. Put the 8-digit ISPB in `queries` (for example `18236120`) and you get the name, COMPE code and Pix participation of that institution.

#### How does the Actor read each query?

1 to 3 digits is a COMPE code (`1` and `001` are the same), 4 to 8 digits is an ISPB or CNPJ base, 14 digits is a full CNPJ (only the first 8 digits are compared), and anything with letters is a name search ignoring accents and case (`itau` finds `ITAÚ UNIBANCO S.A.`). A name search can match several institutions; they are all returned up to `maxItems`.

#### How current is the list?

Both official files are downloaded from Banco Central on every run: the STR participants list and the newest Pix participants list of the last 20 days. `pixListDate` and the `SOURCES` record show exactly which files were used.

#### What does "direct" or "indirect" Pix participation mean?

A direct participant (`pixParticipationType: "Direto"`) has its own account in the Central Bank's instant payment system (SPI); an indirect one settles through another institution. `pixModality` says whether participation is mandatory (`Obrigatória`, large institutions) or voluntary (`Voluntária`). Labels are kept in Portuguese exactly as BCB publishes them.

#### Can I get the whole directory at once?

Yes. Leave `queries` empty and raise `maxItems` (default 100) to a value above the size of the directory, which has roughly 1,000 to 1,500 institutions. Turn on `pixOnly` to keep only current Pix participants.

#### What if Banco Central changes the file layout?

The Actor checks that both files were read correctly (enough rows, with codes and names) before returning anything. If the layout changes or BCB is down, the run fails with a clear message and nothing is charged, instead of returning half-empty rows.

### Use it via API

Run it from any language and get the results as JSON. Replace `<YOUR_API_TOKEN>` with your [Apify API token](https://console.apify.com/settings/integrations).

```bash
curl -X POST "https://api.apify.com/v2/acts/br_data_hub~br-bank-pix-directory/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"queries": ["001", "itau", "18236120"]}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("br_data_hub/br-bank-pix-directory").call(run_input={'queries': ['001', 'itau', '18236120']})
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](https://docs.apify.com/platform/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-bank-pix-directory` to 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?

Both files are downloaded from Banco Central on every run, so the output is always as current as BCB:

#### How much does it cost?

$0.001 per institution. 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 bank or payment institution returned. Downloading and searching the Banco Central lists is 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 CNPJ Lookup API (Consulta CNPJ)](https://apify.com/br_data_hub/br-cnpj-lookup) | Look up Brazilian companies by CNPJ: registration status, partners (masked CPF), activities, tax regime and sc |
| [Brazil Public Contracts API (PNCP Contratos)](https://apify.com/br_data_hub/br-pncp-contracts) | Get Brazilian government contracts from PNCP, the official national procurement portal: buyer, supplier, objec |
| [Brazil Open Tenders API (Licitações Abertas)](https://apify.com/br_data_hub/br-pncp-open-tenders) | Find Brazilian government tenders that are open for proposals right now, from PNCP, the official national proc |
| [Brazil Municipalities & IBGE Codes (Municípios)](https://apify.com/br_data_hub/br-ibge-localities) | List Brazilian municipalities, search them by name (accents and typos tolerated) or resolve IBGE codes |
| [Brazil Holidays & Business Days (Feriados)](https://apify.com/br_data_hub/br-holidays) | Brazilian national and state holidays for all 27 states, with the law behind each one |
| [Brazil Boleto Validator & Parser (Boleto)](https://apify.com/br_data_hub/br-boleto-parser) | Validate Brazilian boletos in bulk (digitable line or barcode, bank and utility/tax slips): check digits per f |

See all our Actors at [apify.com/br_data_hub](https://apify.com/br_data_hub).

### Usar em português

**Lista de bancos e participantes do Pix** a partir das listas oficiais do Banco Central: participantes do STR (código COMPE, ISPB, nome reduzido e completo, data de início) e participantes do Pix (CNPJ, tipo de instituição, participação direta ou indireta, modalidade obrigatória ou voluntária). As duas listas são baixadas do Banco Central em cada execução e unidas pelo ISPB.

**Para que serve:** validar o código do banco em formulários de pagamento, descobrir o banco de um ISPB que aparece num Pix, enriquecer cadastros e CRMs com dados bancários e dar a agentes de IA uma consulta confiável de bancos.

**Como usar em 3 passos:**

1. Clique em **Try for free** e escreva no campo **Search** nomes de bancos, códigos COMPE, ISPBs ou CNPJs, um por linha (vazio = diretório inteiro).
2. Se quiser, marque **Only Pix participants** e ajuste **Maximum institutions**.
3. Clique em **Start** e baixe na aba **Output** (JSON, CSV, Excel) ou leia pela API.

**Exemplo de entrada:**

```json
{ "queries": ["001", "itau", "18236120", "60.746.948/0001-12"], "pixOnly": false, "maxItems": 100 }
```

**Como a busca é lida:** 1 a 3 dígitos é código COMPE; 4 a 8 dígitos é ISPB ou raiz de CNPJ; 14 dígitos é CNPJ completo (só a raiz é comparada); texto com letras é busca por nome, sem acento e sem diferença de maiúsculas.

**Campos principais:** `ispb`, `compeCode` (código do banco), `shortName`, `fullName`, `cnpjBase`, `cnpj`, `institutionType`, `inStr`, `participatesInCompe`, `strAccess`, `strStartDate`, `pixParticipant`, `pixParticipationType` (direto ou indireto), `pixRole`, `pixModality` (obrigatória ou voluntária), `authorizedByBcb` e `pixListDate` (data da lista do Pix usada). As URLs exatas de cada execução ficam no registro `SOURCES`.

**O que é grátis:** baixar e pesquisar as listas não custa nada; você paga só pelas instituições entregues. Se o Banco Central estiver fora do ar ou mudar o formato dos arquivos, a execução falha com mensagem clara e sem cobrança.

**Quanto custa:** $0.001 por resultado (`institution`); 1.000 resultados saem por $1.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-bank-pix-directory`).

# Actor input Schema

## `queries` (type: `array`):

Enter bank names (accents and case ignored), COMPE codes (e.g. 001, 260), ISPB (e.g. 00360305) or CNPJs, one per line. An institution matching any item is returned. Leave empty to list every institution.

## `pixOnly` (type: `boolean`):

Turn on to return only institutions in Banco Central's current list of Pix participants.

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

Set the maximum number of institutions to return, e.g. 100. The full directory has roughly 1,000 to 1,500 entries.

## Actor input object example

```json
{
  "queries": [
    "001",
    "itau",
    "18236120"
  ],
  "pixOnly": false,
  "maxItems": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with all results

# 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 = {
    "queries": [
        "001",
        "itau",
        "18236120"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("br_data_hub/br-bank-pix-directory").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 = { "queries": [
        "001",
        "itau",
        "18236120",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("br_data_hub/br-bank-pix-directory").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 '{
  "queries": [
    "001",
    "itau",
    "18236120"
  ]
}' |
apify call br_data_hub/br-bank-pix-directory --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,br_data_hub/br-bank-pix-directory"
        }
    }
}
```

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/cAQPKQUM00d6NYfWC/builds/gqagTO803RxZxqGa3/openapi.json
