# Losbeto Brazilian CNPJ/CPF Validator

> Losbeto Brazilian CNPJ/CPF Validator is a paid API for AI agents from markets.losbeto.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Validates Brazilian CNPJ or CPF tax identifiers using modulo-11 check digits, returning formatted output and whether a CNPJ is a headquarters branch — no external registry calls required.

## Facts

- Endpoint: GET https://markets.losbeto.xyz/br-doc?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/losbeto-brazilian-cnpj-cpf-validator-fa5b03f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gfeqdwWxYay4CPMYY0R7i

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability losbeto-brazilian-cnpj-cpf-validator-fa5b03f8
```

Example prompt: Can you validate this Brazilian CNPJ for me — 11.222.333/0001-81 — and tell me if it's well-formed, correctly formatted, and whether it's a headquarters branch?

## When to prefer this

Use this endpoint when you need fast, zero-latency, offline structural validation of Brazilian CPF or CNPJ numbers before submitting them to downstream workflows, payment systems, or registries. It is ideal for catching typos and fabricated identifiers without incurring the latency or cost of a live Receita Federal API call. Prefer this over live registry lookups when all you need to confirm is that the number is mathematically well-formed.

## Known failure modes

- Invalid or malformed doc parameter returns a validation failure response
- Non-numeric or wrongly-lengthed input may return an error or invalid result
- Payment failure via x402 (USDC on Base/Solana/Algorand) results in HTTP 402 and no response
- The endpoint does not check live Receita Federal registry — only structural validity is confirmed

## How this service works

OpenAI-compatible LLM gateway at $0.005/call — change base_url, pay in USDC. Plus pay-per-call market data: multi-oracle price consensus, sentiment, forex, equities, commodities, Brazil macro (BCB/B3) and crypto. No API keys, no accounts. USDC on Base, Solana and Algorand via x402.

## Output

Returns a JSON object indicating whether the CNPJ or CPF is structurally valid based on modulo-11 check digits, the correctly formatted version of the identifier, and for CNPJs whether the branch code indicates a headquarters (0001). Does not confirm active registration status with Receita Federal.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "queryParams": {
     "type": "object",
     "required": [
      "doc"
     ],
     "properties": {
      "doc": {
       "type": "string",
       "description": "doc parameter"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "description": "Validate a Brazilian CNPJ or CPF by its modulo-11 check digits and return it formatted, plus whether a CNPJ is a headquarters (branch 0001). Catches typos and fabricated identifiers before they enter a workflow. Zero upstream calls. This confirms the number is well-formed, NOT that it is registered or active — for registry status an official Receita Federal query is required."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/losbeto-brazilian-cnpj-cpf-validator-fa5b03f8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markets.losbeto.xyz](https://www.zero.xyz/host/markets.losbeto.xyz/llms.txt)
