Brasil Hub icon

Brasil Hub

Query Brazilian public data (CNPJ, CEP, CPF, Banks, Câmbio, DDD, Holidays, FIPE, IBGE, NCM, PIX, Taxas) with multi-provider fallback

Actions28

CEP → Query

AI-generated

Summary

Query CEP information by providing a Brazilian postal code (CEP), with flexible provider selection and optional raw API response inclusion.

Inputs

  • CEP (required) — The Brazilian postal code (CEP) to query or validate; may include formatting (e.g., '01001-000') or be unformatted.
  • Primary Provider — Selects the preferred CEP data provider to try first in the query sequence. Options are ApiCEP, BrasilAPI, OpenCEP, ViaCEP, or Auto (which tries BrasilAPI first). Defaults to 'auto'.
  • Include Raw Response — Boolean flag indicating whether to include the raw API response data alongside the normalized query results. Defaults to false.
  • Timeout (Ms) — Specifies the HTTP request timeout in milliseconds for each provider attempt, between 1000 and 60000 ms; defaults to 10000 ms.

Output shape

a single JSON object containing normalized CEP data corresponding to the queried postal code, optionally including the raw API response if requested.

If multiple providers are configured, the node attempts them in order based on the selected primary provider and fallback logic until successful or all fail. The normalized data format is provider-agnostic for easier integration. The raw response is included only if explicitly requested. Errors during querying are surfaced as workflow errors.

Examples

Example 1: Query CEP '01001-000' using the default Auto provider with raw response included.

Set CEP to '01001-000', Primary Provider to 'auto', Include Raw Response to true, and Timeout to 10000 ms.

Links

Discussion