Hi Arelle team and community,
I'm working on parsing XBRL instance documents and I'm currently using Arelle to extract data. The output I'm getting (facts.json via --factListCols and factTable.json via --factTable) doesn't quite match the formats
I need for my application.
Current Arelle output
facts.json gives me nested tuples like:
[
"item",
{ "name": "ex-data:SomeMonetaryValue" },
{
"label": "SomeMonetaryValue",
"contextRef": "ctx_duration_01",
"lang": "en",
"value": "125000"
}
]
factTable.json gives me the presentation tree with empty value placeholders:
["facts", { "concept": "ex-data:SomeConceptName" }, {}]
What I need
Output 1 — Flat facts with fully resolved contexts:
Each fact as a self-contained object with context dimensions, period, entity, and unit resolved inline:
{
"concept": "ex-data:SomeMonetaryValue",
"localName": "SomeMonetaryValue",
"label": "Some monetary value",
"value": "125000",
"numericValue": 125000,
"isNumeric": true,
"unit": "EUR",
"decimals": "INF",
"contextId": "ctx_instant_01",
"entity": "12345678",
"periodType": "instant",
"periodDate": "2024-01-15",
"dimensions": []
}
For facts with dimensional contexts:
{
"concept": "ex-data:AnnualCashflow",
"value": "18500.75",
"numericValue": 18500.75,
"unit": "EUR",
"contextId": "ctx_method_year",
"periodType": "instant",
"periodDate": "2024-01-15",
"dimensions": [
{ "type": "typed", "axis": "ex-dim:MethodAxis", "value": "SomeMethod" },
{ "type": "typed", "axis": "ex-dim:YearAxis", "value": "1" }
]
}
For text facts with explicit dimension members:
{
"concept": "ex-data:OrganisationName",
"localName": "OrganisationName",
"label": "Organisation name",
"value": "Example Corp B.V.",
"numericValue": null,
"isNumeric": false,
"unit": null,
"contextId": "ctx_duration_party",
"entity": "12345678",
"periodType": "duration",
"periodStart": "2024-01-01",
"periodEnd": "2024-12-31",
"dimensions": [
{ "type": "explicit", "axis": "ex-dim:PartyAxis", "member": "ex-dom:ClientMember" }
]
}
Output 2 — Structured report grouped by business domain:
Facts organized into a business-domain model, with sections grouping related facts together (e.g., entity information, numeric results, dimensional tables with one row per member, narrative text fields, etc.), rather
than a flat list or a raw presentation tree.
My questions
- Is there an existing Arelle plugin, command-line option, or configuration that can produce fully resolved flat facts (with dimensions, units, and period inline)?
- Is there a way to combine the factTable presentation tree with actual fact values to produce a filled-in structured output?
- Would writing a custom Arelle plugin be the recommended approach, or would it be simpler to parse the XBRL instance directly for this use case?
- Are there any community plugins or examples for this kind of transformation?
Context
- XBRL instance files with ~50-100 contexts, ~500-800 facts, using typed and explicit dimensions
- Both instant and duration periods
- Units include monetary (EUR), area (sqm), and pure (ratios/percentages)
- Target platform: .NET (C#), so I'm evaluating whether to use Arelle web server as a preprocessor or build a custom parser
Thanks in advance for any suggestions!