An XBRL API user writes –
What I would like to do is to get income statements and balance sheets from 10-K and 10-Q reports of particular companies – just that. Could you advise what parameters to enter into the API, please?
If you’re not familiar with depth and breadth of data available in the XBRL model and/or working with an application programming interface (API), try the ESEF/SEC Report with Dimensions Template posted on the XBRL Data Community – https://xbrl.us/xbrl-api-community. Several queries grouped on the left side of the Report tab of this file work together to display face financial data for a single report in a familiar context.
Another option is to use the cube endpoint for more recent filings from most larger companies (last 5 years) – here’s an example you can drop into the A1 cell of an Excel spreadsheet, then login to the XBRL Filed Data add-in and put =XBRL.showData(A1,””,””,”1″) in cell A2 to get data Q3 2025 quarterly data from Microsoft’s income statement.
https://api.xbrl.us/api/v1/cube/search?report.source-name=sec&report.id=837808&period.fiscal-year=2025&cube.description=Statement - Income&fields=cube.description,cube.drs-role-uri,cube.primary-local-name,cube.tree-sequence.sort(ASC),dimension-pair,fact.value,period.fiscal-period,period.fiscal-year.sort(DESC),report.id
Note – non-Members will get up to 100 rows for the query. The cube.offset() parameter can be used in Excel with the CONCATENATE formula starting on row 102 to return the next 100 rows, up to 1,000 for the query. See this post for details on using offset.