Skip to content
/ bbdb Public

Free open-source API for querying banks identification in Brazil.

License

Notifications You must be signed in to change notification settings

corenzan/bbdb

Repository files navigation

BBDb

Free open-source API for querying banks identification in Brazil.

About

Monetary transactions in Brazil, such as transfers and deposits, require a numeric code that identifies the financial institution that manages the destined account. This numeric code is assigned to each member of the STR (Sistema de Transferência de Reservas) by the country's central bank, Banco Central do Brasil.

BBDb is an open-source web service that provides this information up-to-date and free of charge.

Usage

At a glance, here's an example of filling a <select> element with options from the API.

<select></select>

<script>
  const select = document.querySelector("select");

  fetch("https://bbdb.crz.li/?compe=y")
    .then((resp) => resp.json())
    .then((data) => {
      data.forEach((entry) => {
        const opt = document.createElement("option");
        opt.value = entry.code;
        opt.textContent = entry.name;
        select.add(opt);
      });
    });
</script>

The compe parameter exclude records with a blank code field.

API

The public endpoint is https://bbdb.crz.li.

GET /
Get all the records.
GET /?q=...
Filter the records by partial match. Normalizes special characters.
GET /?compe=y|yes|t|true|1
Only show banks that participate in the payment system, Compe.

Development

You'll need Go 1.22+. Clone the repository, then run:

go mod download

To download dependencies. Then:

go run .

To start the server.

The data is read from data.csv.

Reference

License

The MIT License © 2014 Arthur Corenzan

About

Free open-source API for querying banks identification in Brazil.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published