Home › Forums › The XBRL API › Income Statement data for a company
- This topic has 2 replies, 2 voices, and was last updated 6 months ago by David Tauriello.
-
AuthorPosts
-
-
Monday, June 9, 2025 at 4:46 PM #313210David TaurielloKeymaster
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.idNote – 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.
-
Tuesday, June 24, 2025 at 3:05 PM #325916Joe Wayne ByersParticipant
I get a formula parse error using googlesheets. What could the issue be?
Thanks
-
Wednesday, June 25, 2025 at 7:24 AM #326751David TaurielloKeymaster
Hi Joe – thanks for writing. I’m not able to replicate the issue you describe with either the template or query used in this post. Please note that the formula syntax is slightly different between Excel and GoogleSheets, although the functionality is identical, with only the first parameter (API URL) required:
Excel =XBRL.showData(API URL , “” , “” , “1”)
Googlesheets =showData(API URL , , , “TRUE”)
These are the parameters following the API URL:
- type [optional string] (blank|fields|name): Determines how the information will be returned blank: returns “data” without the metadata, fields: returns a tree of the fields in the data array, name: used with “fieldname” to return only the information related to the specified field
- fieldname [optional string]: The name of the field that should be returned. The different levels are separated by a “/”
- showheaders [optional boolean]: Determines if the headers are displayed in the output
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.
Search Forums
Recent Topics
- Income Statement data for a company by David Tauriello
- Normalized data presentation by David Tauriello
- Extract Director RSUs/Options Form 14A by Priyanka Goonetilleke
- Using the offset parameter by David Tauriello
- Spreadsheet Commands: Query Worksheet and Query Workbook Query Workbook by Liam Noailles
Recent Replies
-
Income Statement data for a company 6 months ago
-
Income Statement data for a company 6 months ago
-
Using the offset parameter 10 months ago
-
Using the offset parameter 10 months, 1 week ago
-
Using the offset parameter 10 months, 1 week ago
Documentation & Discussion
- Get started with Google Sheets OR
- Get started with Microsoft Excel OR
- Get access to as-filed data from us for other tools or your own app
- XBRL API Interactive Documentation
- Ten Tips & Techniques
- The XBRL API
- XBRL Data Community
- 2024 US GAAP Taxonomy Viewer
- Live support - Monday, 3:30 - 4:30 PM ET
Who's using this free data?
API Use 2024 || API Use 2023 || API Use 2022 || API Use 2021 || API Use 2020 || API Use 2019 || API Use 2018
Join XBRL US
- Individual Options - Basic, Power User & Sole Practitioner
- For Your Team - Startup, Non-Profit, Academic & Corporate options
- Member Benefits Comparison Table
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.





