npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-brasil-hub

v1.0.0

Published

n8n community node for querying Brazilian public data (CNPJ, CEP, CPF, Banks, DDD, Feriados, FIPE, IBGE, NCM) with multi-provider fallback

Readme


Stable Release (v1.0) — 9 resources, 17 operations, 22 providers. The API is stable and follows semantic versioning.


Why Brasil Hub?

Most Brazilian public data APIs are free but unreliable. A single provider going down breaks your entire workflow. Brasil Hub solves this:

  • Up to 7 providers per resource — if one fails, the next kicks in automatically
  • Normalized output — same schema regardless of which provider responds
  • No credentials needed — all providers are public APIs
  • AI Agent ready — works as a tool in n8n AI Agent workflows

Installation

In your n8n instance: SettingsCommunity Nodes → search n8n-nodes-brasil-hubInstall

Or via CLI:

npm install n8n-nodes-brasil-hub

Operations

| Resource | Operation | Description | Providers | |----------|-----------|-------------|-----------| | Bank | Query | Fetch bank info by COMPE code | BrasilAPI → BancosBrasileiros | | Bank | List | List all Brazilian banks | BrasilAPI → BancosBrasileiros | | CEP | Query | Fetch address data by CEP number | BrasilAPI → ViaCEP → OpenCEP → ApiCEP | | CEP | Validate | Check if CEP format is valid (local, no API) | — | | CNPJ | Query | Fetch company data by CNPJ number | BrasilAPI → CNPJ.ws → ReceitaWS → MinhaReceita → OpenCNPJ.org → OpenCNPJ.com → CNPJA | | CNPJ | Validate | Check if CNPJ is valid (local checksum, no API) | — | | CPF | Validate | Check if CPF is valid (local checksum, no API) | — | | DDD | Query | Fetch state and cities by area code | BrasilAPI → municipios-brasileiros | | Feriado | Query | Fetch public holidays by year | BrasilAPI → Nager.Date | | FIPE | Brands | List vehicle brands by type | parallelum | | FIPE | Models | List models for a brand | parallelum | | FIPE | Years | List available years for a model | parallelum | | FIPE | Price | Get FIPE table price for a vehicle | parallelum | | IBGE | States | List all Brazilian states | BrasilAPI → IBGE API | | IBGE | Cities | List municipalities by state | BrasilAPI → IBGE API | | NCM | Query | Fetch tax classification by code | BrasilAPI | | NCM | Search | Search tax codes by description | BrasilAPI |

Example Output

{
  "cnpj": "00000000000191",
  "razao_social": "BANCO DO BRASIL SA",
  "nome_fantasia": "DIRECAO GERAL",
  "situacao": "ATIVA",
  "data_abertura": "1966-08-01",
  "porte": "DEMAIS",
  "natureza_juridica": "Sociedade de Economia Mista",
  "capital_social": 120000000000,
  "atividade_principal": {
    "codigo": "6422100",
    "descricao": "Bancos múltiplos, com carteira comercial"
  },
  "endereco": {
    "logradouro": "SAUN QUADRA 5 LOTE B",
    "numero": "S/N",
    "bairro": "ASA NORTE",
    "cep": "70040912",
    "municipio": "BRASILIA",
    "uf": "DF"
  },
  "contato": {
    "telefone": "6134934000",
    "email": ""
  },
  "socios": [
    {
      "nome": "TARCIANA PAULA GOMES MEDEIROS",
      "qualificacao": "Presidente"
    }
  ],
  "_meta": {
    "provider": "brasilapi",
    "strategy": "direct",
    "queried_at": "2026-03-10T12:00:00.000Z"
  }
}
{
  "cep": "01001000",
  "logradouro": "Praça da Sé",
  "bairro": "Sé",
  "cidade": "São Paulo",
  "uf": "SP",
  "_meta": {
    "provider": "brasilapi",
    "strategy": "direct",
    "queried_at": "2026-03-10T12:00:00.000Z"
  }
}

How Fallback Works

Request → Provider 1 (BrasilAPI)
              ├─ Success → Return normalized data
              └─ Fail → Provider 2 (CNPJ.ws / ViaCEP)
                            ├─ Success → Return normalized data
                            └─ Fail → Provider 3 (ReceitaWS / OpenCEP)
                                          ├─ Success → Return normalized data
                                          └─ Fail → Return error with all failures

Each provider has a configurable timeout (default: 10 seconds, range: 1–60s). The _meta.strategy field tells you if the response came from the primary provider (direct) or a fallback.

Compatibility

| | Version | |---|---------| | n8n | 1.0+ | | Node.js | 20, 22 |

Development

git clone https://github.com/luisbarcia/n8n-nodes-brasil-hub.git
cd n8n-nodes-brasil-hub
npm install
npm test          # 1174 tests, 99%+ coverage
npm run build
npm run lint

To test locally in n8n:

npm run build && npm link
# In your n8n directory:
npm link n8n-nodes-brasil-hub

See CONTRIBUTING.md for full development guidelines.

Project

| | | |---|---| | Roadmap | Planned features (Feriados, more providers) | | Changelog | Version history | | Contributing | How to contribute | | Security | Vulnerability reporting | | Governance | Decision-making process | | Code of Conduct | Community standards |

License

MIT — Luis Barcia