Load Brazil CVM Filings Metadata into Apache Superset
Want Apache Superset CVM filings charts? apicvm is not a native Superset connector. Load document metadata into Postgres/BigQuery, then point Superset at the table. Do not expect PDF rendering inside Superset.
The problem
Analysts ask: "Which tickers have 2024 DFP in our corpus?" Spreadsheet paste from the CVM portal does not scale. You need UUID-stable rows and refreshable coverage marts.
Pattern
apicvm list → staging table → dbt mart → Superset dataset
import os, requests
BASE = os.environ["APICVM_URL"]
H = {"Authorization": f"Bearer {os.environ['APICVM_KEY']}"}
r = requests.get(
f"{BASE}/v1/documents",
headers=H,
params={"ticker": "EGIE3", "type": "DFP", "year": 2024, "perPage": 50},
)
r.raise_for_status()
# upsert r.json()["data"] into raw.cvm_documents
Useful charts
- Coverage heatmap: ticker × type × year
- Freshness:
max(listed_at)by sector watchlist - FRE section hits when you land
name-filtered lists
Current limitations
- Superset does not call apicvm directly in this pattern
- PDF download and text extraction stay outside the BI layer
- Empty API pages are valid corpus gaps — do not hard-code counts in dashboards
Next steps
Ready to integrate?
Get an API key and start querying Brazilian CVM filings programmatically.