Build Quarto Reports on Brazil CVM Filings
Need Quarto CVM filings for reproducible research? Call apicvm from a Quarto .qmd (Python or R engine), cite document UUIDs, and render HTML/PDF reports.
The problem
Ad-hoc portal downloads do not version. Quarto wants deterministic inputs. Stable /v1 document IDs beat scraped filenames.
Setup
export APICVM_URL='https://apicvm.dev'
export APICVM_KEY='apicvm_...'
Quarto Python chunk
import os, requests
BASE = os.environ["APICVM_URL"]
H = {"Authorization": f"Bearer {os.environ['APICVM_KEY']}"}
company = requests.get(
f"{BASE}/v1/companies/resolve",
headers=H,
params={"query": "PETR4", "by": "ticker"},
).json()
docs = requests.get(
f"{BASE}/v1/documents",
headers=H,
params={"ticker": "PETR4", "type": "DFP", "year": 2024, "perPage": 20},
).json()["data"]
for d in docs[:5]:
print(d["id"], d["name"])
curl for CI smoke tests
curl -H "Authorization: Bearer $APICVM_KEY" \
"$APICVM_URL/v1/documents?ticker=PETR4&type=FRE&year=2024&perPage=10"
Current limitations
- Quarto does not replace async text extraction — use
POST /v1/document-text-extractionswhen you need page markdown. perPagemax 50; paginate for large issuers.- Do not invent filing counts in prose; print what the API returns.
Next steps
Ready to integrate?
Get an API key and start querying Brazilian CVM filings programmatically.