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 → Validate

AI-generated

Summary

Validate a Brazilian CEP (postal code) by querying multiple providers to confirm its existence and correctness.

Inputs

  • CEP (required) — The CEP number to query or validate, with or without formatting (e.g., 01001-000).
  • Timeout (Ms) — HTTP request timeout in milliseconds for each provider attempt, between 1000 and 60000 (default 10000).

Output shape

A single record containing validation results from one or more CEP providers, including validity status and possibly normalized CEP data.

The operation attempts to validate the CEP by querying multiple external provider APIs sequentially with a fallback mechanism. The response includes metadata about which provider responded, any errors encountered, and the normalized CEP data if valid. Includes the original raw response if configured.

Examples

Example 1: Validate a formatted CEP with a custom timeout

User inputs '01001-000' as the CEP and sets the timeout to 15000 ms to increase the HTTP request wait time per provider attempt.

Links

Discussion