I wanted to try to build a template that pulled historical financial statements once I entered a ticker symbol. How easy or hard is that to do…?
Here’s a query that uses the report endpoint to with stock ticker values to return date/time accepted, entity name, document type and report.id for General Motors: https://api.xbrl.us/api/v1/report/search?entity.ticker=GM&fields=report.accepted-timestamp.sort(DESC),report.entity-name,report.document-type,report.id. From this point, it’s possible to use any report.id in subsequent queries for XBRL facts stored in our Public Filings Database or EDGAR entries.
In terms of a template, this is a possible variation to how our ESEF/SEC template starts – creating a ticker-based lookup instead of the entity name lookup that uses the add-in taskpane.
Using the XBRL API with the Public Filings Database
Unless otherwise agreed to in writing, any and all use of the XBRL API to authenticate and retrieve data from the XBRL US Database of Public Filings implies user consent and agreement with the XBRL US API Agreement. If you are unable to agree to these terms, do not use the XBRL API.
To use the XBRL API outside of Google Sheets, your account needs to be provisioned for OAuth2 access.
The national consortium for the business reporting standard
XBRL US is a not-for-profit organization supporting the implementation of digital business reporting standards through the development of taxonomies for use by U.S. public and private sectors, with a goal of interoperability between sectors, and by promoting XBRL adoption through marketplace collaboration.