Altova RaptorXML Server 2024

RaptorXML Server supports multiple Python API versions. Any previous Python API version is also supported by the current version of RaptorXML Server. The Python API version is selected by the --script-api-version=MAJOR_VERSION command line flag. The default of the MAJOR_VERSION argument is always the current version. A new RaptorXML Server Python API MAJOR_VERSION is introduced when incompatible changes or major enhancements are introduced. Users of the API do not need to upgrade their existing scripts when a new major version is released.


It is recommended that:


You use the --script-api-version=MAJOR_VERSION flag to invoke utility scripts from the RaptorXML Server command-line (or Web-API). This ensures that scripts still work as expected after RaptorXML Server updates—even if a new API MAJOR_VERSION has been released.

You use the latest version of the API for new projects, even though previous versions will be supported by future RaptorXML Server releases.


The Python API versions listed below are currently available. The documentation of the different APIs are available online at the locations given below.


Example files

For examples of scripts that use Raptor's Python APIs, go to


Python API version 1

Introduced with RaptorXML Server v2014


Command line flag: --script-api-version=1

Documentation: Python API Version 1 Reference



This is the original RaptorXML Server Python API. It covers support to access the internal model of RaptorXML Server for:


XML 1.0 and XML 1.1 (API module xml)

XMLSchema 1.0 and XMLSchema 1.1 (API module xsd)

XBRL 2.1 (API module xbrl)


The API can be used through callback functions which are implemented in a Python script file.







A script is specified with the --script option on the command line. The callback functions are invoked only if the validation succeeds. Details about the callback functions and the API are described in the RaptorXML Server Python API version 1 reference.


Note:Raptor's Python API v1 is deprecated. Please use Python API v2.


Python API version 2

Introduced with RaptorXML Server v2015r3. The latest API version is 2.9.0.


Command line flag



v 2015r3


v 2015r4


v 2016


v 2016r2


v 2017


v 2018


v 2018r2


v 2019



















Documentation: Python API Version 2 Reference



This API version introduces over 300 new classes and reorganizes the modules from the RaptorXML Server Python API version 1 in such a way that frequently used information (for example, PSVI data) can be accessed more simply and related APIs are grouped logically together (fr example, xbrl.taxonomy, xbrl.formula, xbrl.table). In this version, the callback functions are invoked not only if validation succeeds, but also if validation fails. To reflect this behavior, the name of the callback functions are changed to:







To enable modularization, RaptorXML Server now supports multiple --script options. The callbacks implemented in these Python script files are executed in the order specified on the command line.


© 2018-2024 Altova GmbH