Socket
Socket
Sign inDemoInstall

xbrl-filings-api

Package Overview
Dependencies
1
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xbrl-filings-api

Python API for filings.xbrl.org XBRL report repository.


Maintainers
1

Readme

XBRL Filings API

Python API for filings.xbrl.org XBRL report repository.

This library provides:

  1. Python-friendly access to the public API in filings.xbrl.org
  2. Parallel downloading of associated files (ZIP, XHTML and JSON)
  3. Integration to pandas
  4. Integration to SQLite database, incl. SQLite views (accounting reliability)
  5. A few useful derived attributes
  6. Possibility to strip redundant language versions/corrected filings

As of March 2024, all the filings in the database are Inline XBRL reports. They are prepared in accordance to the European Single Electronic Format (ESEF), the United Kingdom Single Electronic Format (UKSEF), or the Ukraine Financial Reporting System. The first reports are from financial year 2020 for all reporting formats.

In the case of ESEF, the reporters have issued securities on European regulated markets in European Union member states. In most of the cases these securities are shares. Issuers on alternative stock exchanges in the EU such as the Nordic exchange First North are exempted from the ESEF mandate and are thus not available.

This library is independent of XBRL International.

See documentation for XBRL Filings API. The library is available on PyPI.

Table of Contents

License

xbrl-filings-api is distributed under the terms of the MIT license.

Installation

Install the library using pip.

python -m pip install xbrl-filings-api

Data objects

Filing

Access to entity requires flag GET_ENTITY and to validation_messages flag GET_VALIDATION_MESSAGES.

Data attributes:

Attribute nameTypeDescriptionQueryJSON:API field name
api_idstrJSON:API identifierXResource id
countrystrCountry of entityXcountry
filing_indexstrDatabase identifierXfxo_id
languagestrLanguage from package_url, xhtml_urlderived
last_end_datedateLast reported data dateXperiod_end
reporting_datedateFinancial period end from package_urlderived
error_countintCount of validation errorserror_count
inconsistency_countintCount of validation inconsistenciesinconsistency_count
warning_countintCount of validation warningswarning_count
added_timedatetimeTime when added to the databaseXdate_added
processed_timedatetimeTime when processed for the databaseXprocessed
entity_api_idstrSame as entity.api_idEntity resource id
json_urlstrxBRL-JSON download URLjson_url
package_urlstrESEF report package download URLpackage_url
viewer_urlstrInline XBRL viewer URLviewer_url
xhtml_urlstrInline XBRL report download URLreport_url
query_timedatetimeTime when query function was called-
request_urlstrURL of the API request-
json_download_pathstrPath where json_url was downloaded-
package_download_pathstrPath where package_url was downloaded-
xhtml_download_pathstrPath where xhtml_url was downloaded-
package_sha256strSHA-256 checksum of package_url fileXsha256

As of April 2024, attributes ending with _count and _url could not be used for filtering or sorting queries. This might change in future.

Object references:

Attribute nameTypeRequired flag for access
entityEntityGET_ENTITY
validation_messagesset of ValidationMessageGET_VALIDATION_MESSAGES

Entity

Data attributes:

Attribute nameTypeDescriptionJSON:API field name
api_idstrJSON:API identifierResource id
identifierstrXBRL identifier (e.g. LEI code)identifier
namestrNamename
api_entity_filings_urlstrJSON:API query for its filings-
query_timedatetimeTime when query function was called-
request_urlstrURL of the API request-

Object references:

Attribute nameType
filingsset of Filing

ValidationMessage

Data attributes:

Attribute nameTypeDescriptionJSON:API field name
api_idstrJSON:API identifierResource id
severitystrSeverity of the issueseverity
textstrText of the messagetext
codestrCode of the breached rulecode
filing_api_idstrSame as filing.api_idFiling resource id
calc_computed_sumfloatComputed sum of calcInconsistencyderived
calc_reported_sumfloatReported sum of calcInconsistencyderived
calc_context_idstrContext ID of calcInconsistencyderived
calc_line_itemstrLine item of calcInconsistencyderived
calc_short_rolestrShort role of calcInconsistencyderived
calc_unreported_itemsstrUnreported contributing items of calcInconsistencyderived
duplicate_greaterfloatGreater one of duplicated factsderived
duplicate_lesserfloatLesser one of duplicated factsderived
query_timedatetimeTime when query function was called-
request_urlstrURL of the API request-

Derived attributes beginning "calc_" are only available for validation messages with code "xbrl.5.2.5.2:calcInconsistency". The ones beginning "duplicate_" are available for code 'message:tech_duplicated_facts1' if the values are numeric. They are parsed out from the text of the message.

Object references:

Attribute nameType
filingFiling

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc