Arelle’ web service API, based on REST, provides XBRL services to non-Python applications, such as Excel, Java, and C#.

The web services can operate as a stand-alone single-process web server, or can operate under another web server.  When operating stand-alone and in a single-process, Arelle can interact with multiple interfaces and requests without reloading its object model, such as QuickBooks XBRL-GL interfaces or separate API requests to perform subsequent operations on the same object model.  When operating under an independent web server (such as IIS or Apache) the examples below have each REST API request handled as an independent request in an independent process, using CGI, which is suitable for a production environment.  In each of these Arelle operates from its compiled binary application, without requiring installing of Python and python library packages within the web server.

To start as a simple stand-alone web server (where the Arelle executable handles the web service requests itself, e.g., without using IIS or Apache):

  • Windows:  Start menu->programs->Arelle->Start Web Server, scripts\startWebServer.bat, or ArelleCmdLine.exe –webserver locahost:8080
  • Mac/OS: double-click startWebServer.command

The default port is “localhost:8080″.  The windows port can be changed by editing properties of the “Start Web Server” menu shortcut, .bat/.command file, or command line parameter.  The web server is terminated by cntrl-C to the webserver’s window.

The simple stand-alone web server REST API starts with “/”, so REST APIs start with the path http://localhost:8080/rest/xbrl/..., or help is at http://localhost:8080/help

The next two options provide Arelle’s REST API using web servers like IIS or Apache, invoking Arelle from the compiled binary application distribution for each.
To start as a CGI process under IIS, where each request will run as an independent process:

  • Install the Windows executable.  arelleCmdLine.exe will detect when it is running as a CGI.
  • Install IIS features for CGI (if not yet present in IIS).
  • Add a web site for the CGI, with its own port number (such as 8080), an application pool, advanced settings physical path to C:\Program Files\Arelle (or your installation location).  Set permissions on that directory (such as Everyone or IIS processes, so they can write the web.config directory and any other files as needed).
  • Set application pool framework version at 2.0, and maximum worker processes at number of CPU cores available (under advanced properties).
  • Add handler mapping for Arelle, similar to this, using * so REST paths to go into Arelle:
    • Request path: *
    • Executable: “C:\Program Files\Arelle\arelleCmdLine.exe” %s
    • Name: Arelle
      Arelle’s cache directory for IIS defaults to C:\Windows\Temp\Arelle, and is created on initial startup for you. This can be confirmed by REST API /rest/configure?environment. If you copy into this directory be sure to set permissions, such as IUSR.

This IIS web server configuration REST API starts with “/”, so REST APIs start with the path http://localhost:8080/rest/xbrl/...

To start as a CGI installed under an Apache web server, where each request will run as a separate process:

  • Ensure that the web server has mod-cgi installed and a working cgi directory (such as /usr/lib/cgi-bin, as with Ubuntu).  Do not specify AcceptPathInfo (otherwise it will block the REST path following arelleCmdLine in the URL path).
  • Unzip the Linux executable within the mod-cgi directory (such as to a subdirectory arelle, so the path to arelleCmdLine is /usr/lib/cgi-bin/arelle/arelleCmdLine).  Ensure permissions will allow the web server to access the directory and execute.  The executable arelleCmdLine detects when it is running as a CGI instead of from a command script or shell.
  • Arelle needs a cache directory.  With Ubuntu this defaults to /var/www/.config/arelle.  Create those directories (probably needs sudo) and set their owners and groups (with Ubuntu user and group are set to www-data).

This Apache web server configuration REST API starts with /cgi-bin/arelle/arelleCmdLine, so REST APIs start with the path, or help is at

(There are other alternatives to running Arelle as a stand-alone single-process web server or running from compiled binary application distribution.  The single-process mode can use other servers supported by Python Bottle, some of which, like CherryPy, have multi-processing support.  The source code supports use as an WSGI application (automatically detected on start up of, which can be deployed in a web server which has managed Python support and source code integration expertise.  The Python 2.7 version of Arelle has been installed on Google App Engine (GAE), such as for

Below is a table of the API from Arelle’s web service.  API implemented by the installed version of Arelle is obtained by starting Arelle’s web services and clicking (or entering this link to your browser – it assumes use of the default port, 8080): http://localhost:8080/help.

Web Service API


Arelle web API
/help This web page.
/about About web page, copyrights, etc.
/rest/xbrl/​{file}/​validation/​xbrl Validate document at {file}.
{file} may be local or web url, and may have “/” characters replaced by “;” characters (but that is not
Example: /rest/​xbrl/​c:/a/b/c.xbrl/​validation/​xbrl?​media=xml: Validate entry instance
document at c:/a/b/c.xbrl (on local drive) and return structured xml results.
/rest/xbrl/​validation (Alternative syntax) Validate document, file is provided as a parameter (see below).
Example: /rest/​xbrl/​validation​?file=c:/a/b/c.xbrl&​media=xml: Validate entry instance
document at c:/a/b/c.xbrl (on local drive) and return structured xml results.
Parameters are optional after “?” character, and are separated by “&” characters,
as follows:
flavor standard: XBRL 2.1 and XDT validation. (default){sec*|edgar*}: SEC Edgar Filer Manual validation.
media html or xhtml: Html text results. (default)xml: XML structured results. json: JSON results.text: Plain text results (no markup).
file Alternate way to specify file name or url by a parameter.
import A list of files to import to the DTS, such as additional formula
or label linkbases. Multiple file names are separated by a ‘|’ character.
calcDecimals Specify calculation linkbase validation inferring decimals.
calcPrecision Specify calculation linkbase validation inferring precision.
efm-* Select Edgar Filer Manual (U.S. SEC) disclosure system validation. (Alternative to flavor parameter.):
efm-pragmatic: SEC-required rules, currently-allowed years
efm-strict: SEC-semantic additional rules, currently-allowed years
efm-pragmatic-all-years: SEC-required rules, all years
efm-strict-all-years: SEC-semantic additional rules, all years
ifrs Specify IFRS Global Filer Manual validation.
hmrc Specify HMRC validation.
sbr-nl Specify SBR-NL taxonomy validation.
utr Select validation with respect to Unit Type Registry.
formulaAsserResultCounts Report formula assertion counts.
formulaVarSetExprResult Trace variable set formula value, assertion test results.
formulaVarFilterWinnowing Trace variable set filter winnowing.
{other} Other detailed formula trace parameters:formulaParamExprResult, formulaParamInputValue, formulaCallExprSource, formulaCallExprCode, formulaCallExprEval,
formulaCallExprResult, formulaVarSetExprEval, formulaFormulaRules, formulaVarsOrder,
formulaVarExpressionSource, formulaVarExpressionCode, formulaVarExpressionEvaluation, formulaVarExpressionResult, and formulaVarFiltersResult.
Versioning Report (diff of two DTSes)
/rest/xbrl/​diff Diff two DTSes, producing an XBRL versioning report relative to report directory.
Parameters are requred “?” character, and are separated by “&” characters,
as follows:
fromDTS File name or url of from DTS.
toDTS File name or url of to DTS.
report File name or url of to report (to for relative path construction). The report is not written out, but its contents are returned by the web request to be saved by the requestor.
Example: /rest/​diff?​fromDTS=c:/a/prev/old.xsd&​toDTS=c:/a/next/new.xsd&​report=c:/a/report/report.xml: Diff two DTSes and produce versioning report.
/rest/xbrl/​{file}/​{view} View document at {file}.
{file} may be local or web url, and may have “/” characters replaced by “;” characters (but that is not necessary).
{view} may be DTS, concepts, pre, cal, dim, facts, factTable, or formulae.
Example: /rest/​xbrl/​c:/a/b/c.xbrl/​dim?​media=html: View dimensions of
document at c:/a/b/c.xbrl (on local drive) and return html result.
/rest/xbrl/​view (Alternative syntax) View document, file and view are provided as parameters (see below).
Example: /rest/​xbrl/​view​?file=c:/a/b/c.xbrl&​view=dim​&media=xml: Validate entry instance
document at c:/a/b/c.xbrl (on local drive) and return structured xml results.
Parameters are optional after “?” character, and are separated by “&” characters,
as follows:
media html or xhtml: Html text results. (default)xml: XML structured results. json: JSON results. csv: CSV text results (no markup).
file Alternate way to specify file name or url by a parameter.
view Alternate way to specify view by a parameter.
import A list of files to import to the DTS, such as additional formula
or label linkbases. Multiple file names are separated by a ‘|’ character.
factListCols A list of column names for facts list. Multiple names are separated by a space or comma characters.
Example: factListCols=​Label,unitRef,Dec,​Value,EntityScheme,​EntityIdentifier,​Period,Dimensions
Excel interface
GUI operation: Select data tab.
Click Get External Data From Web.New Web Query dialog, enter rest URI to Address (example, for instance with indicated fact columns:
http://localhost:8080/rest/xbrl/C:/Users/​John Doe/​Documents/eu/​instance.xbrl/facts​?media=xhtml&factListCols=​Label,unitRef,Dec,​Value,EntityScheme,​EntityIdentifier,​Period,DimensionsBefore clicking Go, click Options, on Options dialog select Full HTML Formatting, then Ok to Options dialog.Click Go.Click arrow to select table.Click Import button.Review insertion cell, click ok on Import Data dialog.
VBA macro: With ActiveSheet.QueryTables.Add(Connection:= _"URL;http://localhost:8080/rest/xbrl/C:/Users/​John Doe/​Documents/eu/​instance.xbrl/facts​?media=xhtml&factListCols=​Label,unitRef,Dec,Value,​EntityScheme,EntityIdentifier,​Period,Dimensions" _
, Destination:=Range("$A$1"))
.Name = "facts"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
QuickBooks interface
Setup: Install QuickBooks Web Connector by clicking here.Click on QuickBooks.qwc in the Program Files Arelle directory, to install web connector for Arelle. (It specifies localhost:8080 in it.)Open your QuickBooks and desired companyFrom start menu, programs, QuickBooks, start Web Connector 

Start Arelle web server (if it wasn’t already running)

To request xbrl-gl, select report type (generalLedger, journal, or trialBalance) and specify file name for xbrl-gl output instance:

Example: http://localhost:8080/rest/quickbooks/generalLedger/xbrl-gl/C:/mystuff/xbrlGeneralLedger.xbrl/view?fromDate=2011-01-01&toDate=2011-12-31
(You may omit /view.)
Parameters follow “?” character, and are separated by “&” characters,
as follows:
media html or xhtml: Html text results. (default)xml: XML structured results.json: JSON results.text: Plain text results (no markup).
fromDate, toDate From & to dates for GL transactions
/rest/configure Configure settings:
Parameters are required following “?” character, and are separated by “&” characters,
as follows:
proxy Show or modify and re-save proxy settings: 

Enter ‘show’ to view current setting, ‘system’ to configure to use system proxy setting, ‘none’ to configure for no proxy, or ‘http://[user[:password]@]host[:port]‘ (e.g.,,,” ))

plugins Show or modify and re-save plug-ins configuration: 

Enter ‘show’ to view plug-ins configuration, , or ‘|’ separated modules:
+url to add plug-in by its url or filename (relative to plug-in directory else absolute), ~name to reload a plug-in by its name, -name to remove a plug-in by its name,
(e.g., ‘+’, ‘+C:\Program Files\Arelle\examples\plugin\’ to load,
~Hello Dolly to reload, -Hello Dolly to remove). (Note that plug-ins are transient on Google App Engine, specify with &plugins to other rest commands.)

packages Show or modify and re-save taxonomy packages configuration: 

Enter ‘show’ to view packages configuration, , or ‘|’ separated package URLs:
+url to add package by its full url or filename, ~name to reload a package by its name, -name to remove a package by its name.
(Note that packages are transient on Google App Engine, specify with &packages to other rest commands.)

environment Show host environment (config and cache directories).

Java integration sample (load and validate)

public class LoadValidate {
 public static void main(String[] args) throws IOException {
  String restAPIstr =
   "http://localhost:8080/rest/xbrl/" +
   "C:/Users/John%20Doe/Samples/instance0010000.xbrl" +
  URL url = new URL(restAPIstr);
  HttpURLConnection conn =
        (HttpURLConnection) url.openConnection();
  if (conn.getResponseCode() != 200) {
      throw new IOException(conn.getResponseMessage());
  // Buffer the result into a string
  BufferedReader rd = new BufferedReader(
        new InputStreamReader(conn.getInputStream()));
  StringBuilder sb = new StringBuilder();
  String line;
  while ((line = rd.readLine()) != null) {

C# integration sample (load and validate)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Diagnostics;
namespace ArelleCsharpProject
    class LoadValidate
        static void Main(string[] args)
      string restAPIstr =
       "http://localhost:8080/rest/xbrl/" +
       "C:/Users/John%20Doe/Samples/instance0010000.xbrl" +
            HttpWebRequest req = WebRequest.Create(restAPIstr) as HttpWebRequest;
            string line;
            using (HttpWebResponse resp = req.GetResponse() as HttpWebResponse)
                StreamReader reader = new StreamReader(resp.GetResponseStream());
                while ((line = reader.ReadLine()) != null)

24 Responses to API, Web Services

  1. Mikey says:

    Hello, when I call “URL;http://localhost:8080/rest/xbrl/C:\a.xbrl/facts?media=xml&labelLang=name&factListCols=Label,contextRef,unitRef,Dec,Value,EntityScheme,EntityIdentifier,Period,Dimensions”, I get following error:
    [] [Exception] Failed to complete request:
    Invalid tag name ‘end/Instant’
    [' File "C:\\Users\\Herm Fischer\\Documents\\mvsl\\projects\\Arelle\\ArelleProject\\src\\arelle\\", line 274, in run\n', ' File "C:\\Users\\Herm Fischer\\Documents\\mvsl\\projects\\Arelle\\ArelleProject\\src\\arelle\\", line 13, in viewFacts\n', ' File "C:\\Users\\Herm Fischer\\Documents\\mvsl\\projects\\Arelle\\ArelleProject\\src\\arelle\\", line 50, in view\n', ' File "C:\\Users\\Herm Fischer\\Documents\\mvsl\\projects\\Arelle\\ArelleProject\\src\\arelle\\", line 100, in viewFacts\n', ' File "C:\\Users\\Herm Fischer\\Documents\\mvsl\\projects\\Arelle\\ArelleProject\\src\\arelle\\", line 178, in addRow\n', ' File "lxml.etree.pyx", line 2659, in lxml.etree.SubElement (src/lxml\\lxml.etree.c:53668)\n', ' File "apihelpers.pxi", line 204, in lxml.etree._makeSubElement (src/lxml\\lxml.etree.c:12230)\n', ' File "apihelpers.pxi", line 1542, in lxml.etree._tagValidOrRaise (src/lxml\\lxml.etree.c:23956)\n'] -

    When I call the same thing with only one column, it will work just fine.

  2. nimi says:

    i wish to parse xbrl file using java.i hav xbrl file as i can do this ? .What r steps i need to follow?.Is this java program is helpful for me?

    • admin says:

      This project is Python (not Java). There is an example of a Java interface, using the web service, in the example folder of the github source code. If you want to know if it is helpful please be specific and clear about your requirements and goals.

  3. nimi says:

    Thank you sir
    i tried that one.But i got error shown below.
    soumya@soumya-K52Jc:~/Downloads/Arelle-Arelle-da0c9c7/arelle/examples$ sudo javac
    [sudo] password for soumya:
    soumya@soumya-K52Jc:~/Downloads/Arelle-Arelle-da0c9c7/arelle/examples$ sudo java LoadValidate
    2012-03-12 13:55:48,110 [IOerror] pre_example1_2011-03-25.xml: file error: [Errno 13] Permission denied: ‘/home/soumya/.config/arelle/cache’ – example1_2011-03-25.xsd 6

    i wish to know how this web interface works.i mean what’s step must follow to get output.?

  4. nimi says:

    Sorry Sir,
    My goal is to parse xbrl file using java program and extract the data from file.I thought, in your java program the line (string variable ) what you printed is output for me .so i choose this way to parse xbrl.but i’m stuck with the error mentioned above.

  5. Hi, I wanted to know if this webservice is hosted at any web server and is available for consumption for client applications online?

  6. Satish says:


    I have setup the web service API on my local. written a .Net wrapper around it. so far so good. when we Validate how do we get specific error codes, sometimes these codes will decide a go or no go further into the actual extraction of the xbrl. for instance if the Arelle is not able to load a taxanomy it returns a bunch of text. but would be helpful if it throws an exception or an error code so that the developer will decide if we need to proceed further.


    • admin says:

      The logger output via plain text is difficult to automate. I suggest instead that you try the xml (or json) logger output (&media=xml). These other output forms provide the error code, the severity level, messages not only in text but the arguments to the text string (so you can customize the messages), and provide filtering for severity level, hrefs to each error cause, and property descriptions of the objects causing errors.

      • Satish says:

        Thanks, I like this product. I was able to extract a cash dividend using the Web service and I changed my output for validation to xml. when I get facts I get the first line:

        Question 1:
        why I am getting an empty ,, after Label.
        Question 2:
        how do I relate the facts I got from facts and the concepts. I see contextRef in facts but it is not returned in concepts.

        Please let me know is there a way I can relate these two.

        • admin says:

          Q1: The extra ,, looks like an error in determining tuple depth in CSV output (will fix for next build). If there were tuples, extra columns are needed to show the indentation under tuples. (Bugs can be reported via

          Q2: contextRef is only in instance documents, so it is shown on fact output, but contexts are not part of the taxonomy (so they are not shown on concept listing). The facts can be related by their label (if unique) or their qname (&labelRole=XBRL-concept-name would specify that the facts list should show the QName instead of standard label)

          • Satish says:

            Thanks for the quick info, I was searching through the documentation for different combinations of parameters. is there any location that has full documented list.

            I will log the bug for Tuples. is it not possible to return same number of columns incase of fact and tuple. otherwise the mapping would be difficult we load the data into a relational.


  7. sheetal says:

    i am using web service to extract information../FactTable works fine.. but how can i combine FactListCol along with FactTable.. so i can get all hierarchical data with values..
    also /FactTable displays instead i want how can i do that ?

  8. Satish says:

    we are planning to automate the launching of Arelle web server and closing the command window end of day. right now we can only launch the console by invoking

    “C:\Program Files\Arelle\arelleCmdLine.exe” –webserver localhost:8080

    How can we pass a command to close or stop the web service console instead of manually preccing crtl-c. please let me know if there is a way or you want to incorporate

    • admin says:

      There’s a command /rest/stopWebServer. I’m not able to get it to work correctly on Windows. I suggest adding an issue to if you need this feature debugged. Also let us know the platform you are using.

  9. sheetal says:

    Thanks for response.. one more question.. so FactTable gives which is the link… but what if i want the description from Schema XSD file..something like 001 …? also is there a way to filter out all disclosures that come in SEC company fillings, from actual result…

  10. Satish says:

    Hello Admin, I have been evaluating this product since couple of months. like the product and the performance in parsing the instance documents.

    I have a question, how do we get the foot notes from an Instance, is it retrived in the fact list itself? or we need to pass in an extra parameter.

  11. Nils Wilhelm says:


    i’m testing the web service for some time now. Receiving all concepts, the presentation linkbase and the calculation linkbase works just fine for any given taxonomy! What i need is to get all information available for concepts that resides in the lable and reference linkbases. Is there any way to achieve this? It would be great if you could help me with that!

    Another question is, would it be possible to run the server using Linux?

    Best regards,

    Nils Wilhelm

  12. Jeroen says:

    Is there a possibility to run the webservice on a dedicated windows server as a windows service?

    • admin says:

      Yes, I think so, there are several articles you can find by Google on python as a windows service, they would involve some serious source code level work. The webservice uses Python Bottle, which is pretty general (for example it runs fine on Google App Engine). However interfacing the python language environment as a Windows Service may need more in-depth Python and Windows experiences. It may also be possible to interface the command line interface to a windows service (vs. the webservice under Python Bottle).

      If you need professional support on this topic to assist in source code level integration, please contact

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>