Home › Forums › The XBRL API › Retrieving Market Cap as a concept.local-name item from a report.id
- This topic has 9 replies, 2 voices, and was last updated 4 years, 11 months ago by David Tauriello.
-
AuthorPosts
-
-
Tuesday, October 15, 2019 at 9:04 AM #153442Jason MelloneParticipant
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
-
Friday, October 18, 2019 at 4:50 PM #153801David TaurielloKeymaster
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
-
Wednesday, January 8, 2020 at 9:15 AM #162538Jason MelloneParticipant
David,
I am experimenting with this a bit.
Using
CIK='0000789019'
as an example anddts.id=346047
, I get the following URL: https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/0001564590-19-037549-index.htmWhich xml file should I look in to find the various fields that I should try to pull via your API?
For MSFT it is easy, but what about a company that reports less robustly:
https://www.sec.gov/Archives/edgar/data/1117171/000121390019024078/0001213900-19-024078-index.htmThank you for any input.
- This reply was modified 4 years, 11 months ago by Jason Mellone.
-
Thursday, January 9, 2020 at 12:56 PM #162644David TaurielloKeymaster
Hi Jason – thanks for writing. In short, all of the files noted as ‘XBRL’ in the Data Files section of the SEC URLs you sent make up the fields you’re pulling via the XBRL API – it depends on which endpoint you’re using. The data for the company is in its XBRL INSTANCE.
Each company filing with the SEC submits its own taxonomy (referencing US GAAP and other standard taxonomies, and including any extensions for the entity) and instance (the data points defined by the taxonomy). The Public Filings Database is structured to conform to the XBRL 2.1 specification.
In 2019, the SEC began requiring companies to submit inline XBRL – the Microsoft URL is an example of this (see the first link in the Document Format Files section of the page). The HTML is a complete filing – if you view the source code for the page, you’ll see XBRL integrated in the HTML (https://xbrl.us/about-inline-xbrl). The inline requirement is being phased in across the next couple of years.
-
Friday, January 10, 2020 at 9:00 AM #162726Jason MelloneParticipant
the way your website is coded makes the overflow of your response hidden by the right panel. Can you update your wrapping logic? It’s a bit challenging to work with. I am using Chrome Version 79.0.3945.88 (Official Build) (64-bit).
-
Friday, January 10, 2020 at 10:29 AM #162735David TaurielloKeymaster
this is fixed; you might need to dump your browser cache of temp files. Let me know if you still have an issue.
-
Friday, January 10, 2020 at 9:09 AM #162727Jason MelloneParticipant
David, I searched the following docs:
https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/msft-20190930.xsd
https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/msft-20190930_cal.xml
https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/msft-20190930_def.xml
https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/msft-20190930_lab.xml
https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/msft-20190930_pre.xml
https://www.sec.gov/Archives/edgar/data/789019/000156459019037549/msft-10q_20190930_htm.xmlFor “EntityPublicFloat”. I then searched just for “float” (assuming maybe some naming transformation may have been done) but did not find it.
Are you deriving this field? How would I go about understanding where you are ingesting this file from?
-
Friday, January 10, 2020 at 10:28 AM #162734David TaurielloKeymaster
Jason –
EntityPublicFloat
is not required to be reported on a 10-Q (see the concept endpoint in my first reply above).Structurally, this is a standard US GAAP element in the DEI (Document and Entity Information) taxonomy, imported as
<xsd:import schemaLocation="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd" namespace="http://xbrl.sec.gov/dei/2019-01-31"/>
by the company’s .xsd file.If you look at the .xsd for Microsoft, you can see several other base taxonomies imported here – elements in an instance noted as dei:, us-gaap: and others defined in the schema are imported this way. Elements the company has defined that are not in the base taxonomies are listed in the schema file; these extension elements are prepended as msft: (ticker:) in the Microsoft example.
-
Thursday, January 9, 2020 at 9:09 AM #162623Jason MelloneParticipant
The point being that next I’d like to find something like
BookValue
. Yet, when exploring the field I can see, I do not findBookValue
.Eg: Executing a query like:
execute_query( 'concept/search?dts.id={dts_arg}&fields=concept.local-name.sort(ASC),concept.*,label.*,concept.limit({limit_arg}),concept.offset({offset_arg})'.format( dts_arg=dts, limit_arg=limit_item, offset_arg=offset_item))
-
Thursday, January 9, 2020 at 1:02 PM #162645David TaurielloKeymaster
Is BookValue a term you’ve seen in a specific filing or filings? Asking because its not a term I’m familiar with, in terms of US GAAP.
What happens if you use US GAAP terms like
AssetsNet
orLiabilitiesAndStockholdersEquity
?
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.
Search Forums
Recent Topics
Recent Replies
-
Spreadsheet Commands: Query Worksheet and Query Workbook Query Workbook 1 month, 4 weeks ago
-
Query for multiple dimensions 3 months, 3 weeks ago
-
Query for multiple dimensions 4 months ago
-
Showdata function 6 months, 2 weeks ago
-
Showdata function 6 months, 2 weeks 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.