Home Forums The XBRL API Income Statement data for a company

Viewing 1 reply thread
  • Author
    Posts
    • #313210
      David Tauriello
      Keymaster

      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.

    • #325916
      Joe Wayne Byers
      Participant

      I get a formula parse error using googlesheets. What could the issue be?

      Thanks

      • #326751
        David Tauriello
        Keymaster

        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
Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Upcoming XBRL US Events

Domain Steering Committee Meeting
Tuesday, July 15, 2025

Communications & Services Steering Committee Meeting
Tuesday, July 15, 2025

SEC Filing Fee Disclosure Requirements – Phase 1 Lessons Learned
Wednesday, July 16, 2025

EDGAR Next Enrollment – Lessons Learned & Special Situations
Wednesday, July 23, 2025

GovFin 2025: Designing a Digital Future
Thursday, July 31, 2025