Automate Brazil CVM Filings with n8n
Teams searching for n8n CVM filings automation usually want a scheduled workflow: watch tickers, list new documents, download PDFs into Drive/S3, optionally enqueue text extraction. apicvm is a plain REST API — use n8n HTTP Request nodes. There is no official apicvm n8n node.
The problem
Manual CVM portal downloads do not scale for a watchlist. Scrapers break when the portal UI changes. You need:
Cron / webhook → resolve → list → filter → download → notify
Auth in n8n
Store secrets in n8n credentials or environment variables:
| Name | Example |
|---|---|
APICVM_URL |
https://apicvm.dev |
APICVM_KEY |
apicvm_... |
On each HTTP Request node:
- Header
Authorization=Bearer {{$env.APICVM_KEY}} - Or header
X-API-Key={{$env.APICVM_KEY}}
See API authentication.
Workflow A — weekly FRE list for one ticker
- Cron — every Monday.
- HTTP Request —
GET {{$env.APICVM_URL}}/v1/companies/resolve?query=LREN3&by=ticker - HTTP Request —
GET {{$env.APICVM_URL}}/v1/documents?ticker=LREN3&type=FRE&year=2025&perPage=50 - Split Out —
dataarray. - IF — keep items where
namecontains a section you care about (e.g. contingencies). - HTTP Request —
GET {{$env.APICVM_URL}}/v1/documents/{{$json.id}}/file(response: file). - Write binary — Google Drive / S3 / local.
curl reference for the same calls:
export APICVM_KEY='apicvm_...'
export APICVM_URL='https://apicvm.dev'
curl -H "Authorization: Bearer $APICVM_KEY" \
"$APICVM_URL/v1/documents?ticker=LREN3&type=FRE&year=2025&perPage=20"
Workflow B — multi-ticker watchlist
Use a static list or Google Sheet of tickers (PETR4, VALE3, EMBR3). Loop:
For each ticker → GET /v1/documents?ticker=...&type=ITR&year=2025
→ compare ids to a datastore → download only new ids → Slack/email
apicvm does not push “new filing” webhooks today — you poll on a schedule and dedupe by document.id.
Extraction callbacks in n8n
POST /v1/document-text-extractions needs a public HTTPS callback_url (production). Pattern:
- n8n Webhook node (production URL).
- HTTP Request POST:
{
"callback_url": "https://your-n8n.example/webhook/apicvm-page",
"document": { "id": "<uuid>" }
}
- Webhook receives one POST per page (
status,page.markdown,is_last_page). - Append markdown to a database or Drive doc.
Pro plan + extraction credits required. Student keys get 403. Details: async callbacks.
Rate limits
Respect X-RateLimit-* headers and back off on 429. Student plans also have a daily request cap — see errors and rate limits and pricing.
Current limitations
- No native n8n community node from apicvm — HTTP only.
- No server-push for new filings — poll + dedupe.
- Extraction is async; do not expect a synchronous “get full text” response.
- Corpus lag vs the live CVM portal.
Next steps
Ready to integrate?
Get an API key and start querying Brazilian CVM filings programmatically.