Home Forums The XBRL API Retrieving Market Cap as a concept.local-name item from a report.id

Viewing 1 reply thread
  • Author
    Posts
    • #153442
      Jason Mellone
      Participant

      Assuming I know some report.id, I can retrieve stuff like CommonStockSharesOutstanding using something like:

      def fields_from_report_id(report_id, fields):
          return execute_query('fact/search?report.id=' + str(
              report_id) + '&fact.has-dimensions=false&concept.local-name=' + fields + '&fields=concept.local-name.sort(ASC),fact.value,fact.decimals,period.fiscal-year,period.fiscal-period')

      execute_query just executes the query using my credentials – you can assume this works.

      Now, assuming I want to retrieve Market Cap as a concept.local-name, is this possible?

      Right now, I am calc’ing Market Cap using an external vendor for price, but would rather use the xbrl feed directly, if possible

    • #153801
      David Tauriello
      Keymaster

      Hi Jason – take a look at EntityPublicFloat – it might be helpful to you.

      Here’s a sample of Microsoft’s fact.value history for the concept:

      /report/fact/search?entity.id=6930&concept.local-name=EntityPublicFloat&fields=fact.value,report.document-type,report.period-end.sort(DESC),report.restated-index,dts.id

      Here’s the definition of the concept across all US GAAP Taxonomies:

      /concept/search?dts.id=257581,257584,257585,257586,257587,257588,257589,
      257590,292503,322998&concept.local-name=EntityPublicFloat&fields=
      dts.id.sort(DESC),concept.namespace,concept.local-name,label.text
Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Upcoming XBRL US Events

Standard Government Reporting Work Group Meeting
Tuesday, May 26, 2026

2026 Data Summit
Thursday, June 4, 2026

Reporting Modernization Work Group Meeting
Tuesday, June 9, 2026

Domain Steering Committee Meeting
Tuesday, June 16, 2026

Structured Data Case Studies: Unlocking the Power of XBRL for Next-Generation Financial Analysis
Wednesday, June 17, 2026

Public Review for Version 30 of DQC Rules
Saturday, June 20, 2026

Center for Data Quality Committee Meeting
Thursday, June 25, 2026