Metadata-Version: 2.4
Name: brazilayer
Version: 0.1.0
Summary: Brazilian public data for AI agents — company registry (CNPJ), sanctions screening and public contracts, paid per call via the x402 protocol. LangChain and CrewAI tools included.
Project-URL: Homepage, https://www.brazilayer.com
Project-URL: Repository, https://github.com/brazilayer/tools
Project-URL: Documentation, https://api.brazilayer.com/docs
Author-email: Brazilayer <contato@brazilayer.com>
License: MIT
License-File: LICENSE
Keywords: ai-agents,brazil,cnpj,crewai,due-diligence,kyb,langchain,sanctions,x402
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.10
Requires-Dist: eth-account>=0.13
Requires-Dist: requests>=2.31
Requires-Dist: x402[all]>=2.16
Provides-Extra: crewai
Requires-Dist: crewai-tools>=0.4; extra == 'crewai'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2; extra == 'langchain'
Description-Content-Type: text/markdown

# brazilayer

**Brazilian public data for AI agents — paid per call, no signup, no API keys.**

Query the full Brazilian company registry (69M companies), screen against every
official sanction list, and pull government contracts — from official sources
(Receita Federal, CGU, MTE, PNCP), as clean JSON. Your agent pays per request
($0.005–$0.02) in USDC on Base via the [x402 protocol](https://www.x402.org/).

Ideal for **KYB, AML and counterparty due diligence** on Brazilian entities —
including crypto exchanges, OTC desks and fintechs onboarding Brazilian companies.

```bash
pip install brazilayer
```

## Quick start

```python
from brazilayer import Brazilayer

bl = Brazilayer()          # no wallet: free samples only
bl.amostra_cnpj()          # learn the response format, free

bl = Brazilayer(private_key="0x...")   # wallet with a few USD of USDC on Base
bl.empresa("00.000.000/0001-91")       # registration card         $0.005
bl.integridade("00000000000191")       # sanctions screening       $0.01
bl.contratos_fornecedor("00000000000191")  # public contracts won  $0.01
bl.buscar_empresas(nome="padaria", uf="RJ")  # company search      $0.01
```

Payment is automatic: on `HTTP 402` the client signs a USDC authorization
(EIP-3009, gasless for you) and retries. One call ≈ 2 seconds end to end.

⚠️ Use a **dedicated wallet with a small budget** — a few dollars covers
hundreds of calls. Never your main wallet.

## LangChain

```python
from brazilayer.langchain import get_tools   # pip install 'brazilayer[langchain]'
tools = get_tools(private_key="0x...")       # 9 StructuredTools, agent-ready
```

## CrewAI

```python
from brazilayer.crewai import get_tools      # pip install 'brazilayer[crewai]'
tools = get_tools(private_key="0x...")
```

## MCP (Claude Desktop / Claude Code / Cursor)

Prefer MCP? Use our MCP server: [github.com/brazilayer/mcp](https://github.com/brazilayer/mcp)
(one-click `.mcpb` install available).

## What's inside

| Method | Data | Price |
|--------|------|-------|
| `empresa(cnpj)` | Registration card from Receita Federal | $0.005 |
| `socios(cnpj)` | Partners/shareholders | $0.005 |
| `empresa_completa(cnpj)` | Full profile + branches | $0.01 |
| `buscar_empresas(**f)` | Full-text company search | $0.01 |
| `buscar_por_socio(nome)` | Reverse partner lookup | $0.02 |
| `integridade(cnpj)` | 5 official sanction lists, one call | $0.01 |
| `contratos_fornecedor(cnpj)` | Public contracts won + totals | $0.01 |
| `licitacoes_abertas(**f)` | Open tenders, live | $0.01 |
| `amostra_*()` / `health()` | Samples & status | free |

Docs: [api.brazilayer.com/docs](https://api.brazilayer.com/docs) ·
OpenAPI: [/openapi.yaml](https://api.brazilayer.com/openapi.yaml) ·
Terms: [/termos](https://api.brazilayer.com/termos) ·
Contact: contato@brazilayer.com

Also listed on the [x402 Bazaar](https://docs.cdp.coinbase.com/x402/bazaar) and the
[MCP Registry](https://registry.modelcontextprotocol.io) (`io.github.brazilayer/mcp`).
