Câmara dos Deputados
Research Brazil's Chamber of Deputies using its official open-data API. Use for federal deputies, Chamber bills, votes, events, committees, parliamentary fronts, and CEAP expenses; use senado-federal for Senate-only records.
Câmara dos Deputados
Use official Chamber data to answer factual legislative questions and build reproducible queries.
- API:
https://dadosabertos.camara.leg.br/api/v2 - Swagger:
https://dadosabertos.camara.leg.br/swagger/api.html - Authentication: none
- Response envelope: normally
{ "dados": ..., "links": [...] }
Route the task
- Read references/api-endpoints.md to select endpoints and parameters.
- Read references/response-shapes.md when implementing pagination, dates, status filters, or error handling.
- Read references/cross-house.md when a proposition moved between the Chamber and Senate.
- For a quick inspection, run
python3 scripts/camara.py <command>. - For reusable Python code, import
CamaraClientfromcamara_client.py.
Core workflow
- Identify the entity before making detail requests. Search deputies by name and propositions by type, number, and year; retain the official numeric ID returned by the API.
- Query reference endpoints for codes instead of guessing or relying on remembered dictionaries.
- Follow the response link whose
relisnext. Stop when it is absent or the requested page limit is reached. - Preserve official field names and distinguish an empty successful response from an upstream error.
- For current-day queries, interpret “today” in
America/Sao_Pauloand state the retrieval date when freshness matters. - Cite or return the exact API URL used when the answer needs to be auditable.
Important contracts
- Proposition topic filters use
codTema, nottema. - Proposition status filters use
codSituacao. There is no single stable code meaning every possible “in progress” state; resolve the intended status from/referencias/proposicoes/codSituacao. - Working groups use
/grupos,/grupos/{id},/grupos/{id}/historico, and/grupos/{id}/membros. - Proposition references use
/referencias/proposicoes/codSituacaoand/referencias/proposicoes/codTema. - Deputy speeches use
dataInicioanddataFiminYYYY-MM-DD. - The API has no direct
/deputados/{id}/presencaresource. Do not infer formal attendance solely from event participant lists. - Plenary is currently organization ID
180, but verify it through/orgaos/180before embedding it in long-lived code.
Python client
from datetime import date
from camara_client import CamaraClient
client = CamaraClient()
try:
deputados = await client.buscar_deputado_por_nome("nome")
proposicoes = await client.pesquisar_proposicoes(
sigla_tipo="PL",
ano=2026,
cod_tema=40,
)
discursos = await client.get_discursos_deputado(
deputados[0]["id"],
date(2026, 1, 1),
date(2026, 12, 31),
)
finally:
await client.close()
Use an explicit cod_situacao when filtering status. The legacy tramitando=True option raises a validation error because its former mapping was incomplete.
Output discipline
- Separate data reported by the Chamber from interpretation.
- Include proposition type, number, year, ID, current status, and last relevant movement when available.
- Do not describe a proposition as approved, enacted, archived, or pending from a numeric code that was not resolved against the reference endpoint.
- For CEAP totals, state the period, currency treatment, and whether cancelled or refunded documents were included.
Related skills
- Downloads
- 1.5kAll time
- Security audit
- Review
- Last updated
- 3mo ago
- Current version
- v1.1.1
- License
- MIT-0
