An XBRL API user writes:
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.