I would like to use the XBRL API to import 2 facts (the operating income loss for the past quarter and YTD) from the 10-Qs of about 600 CIKs into a google sheet or excel spreadsheet. Is there a way to do this without exceeding the limits associated with a basic individual membership?
You can probably do this by splitting queries for the CIKs into at least six groups of ~100. You’ll also need to include the report.document-type with report.document-index set at 1 to get the most recent 10-Q:
We recently updated a Python script (Jupyter Notebook) on our Data Community page – https://xbrl.us/xbrl-api-community – that might be more effective for this – it will loop the account’s paging limit with the fact.offset() field and collect results up to the user’s account limit (https://xbrl.us/access-token). The last step in the script saves the data frame to a .csv if you run it on a local computer (free software like VS Code makes it pretty easy to set up Python and/or even the Jupyter .ipynb file).
For Power User Individuals and Organizational Members, the loop will return everything we have that matches your query, so use care in building filters to specify what you need, or you might be waiting a while as terabytes are pushed back to you.
If you stick with Excel, you’ll need to manually manage the offset field to get past limits we set for each user (consider multiple versions of the two CIK groups for the incremented offset). Our XBRL API Documentation https://xbrlus.github.io/xbrl-api and a couple of Discussion Forum threads explain how to use the endpoint.offset() field.
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.