Saturday, August 20, 2022 at 9:33 AM #202967Satish SahooParticipant
I am very new to XBRL. So this might be very basic. But I am struggling to find a way to request only tags/concepts containing a specific keyword. For example, how to get all the tags containing the word ‘goodwill’ even if I don’t know the exact tag names ? I am using the US XBRL API in python.
One way perhaps is to download all tags and then search for the word goodwill using python functions/tools. But that would download too many records. Is there a way to specify through the API that I am only interested in tags containing goodwill?
If it’s possible can it also be used to filter based on labels in the filing and not just the tags?
Monday, August 22, 2022 at 7:02 AM #202973David TaurielloKeymaster
Hi Satish – thanks for writing. You can get a company’s Goodwill elements by using a query like this, where the DTS ID is the company filing:
https://api.xbrl.us/api/v1/label/search?fields=concept.local-name.sort(ASC),label.text&label.role=http://www.xbrl.org/2003/role/label&label.text=goodwill&dts.id=583061&concept.is-abstract=false(this is available from the XBRL Filed Data extension on the fact and concept functions when you filter the form by a company DTS). The DTS ID for the 2022 US GAAP Taxonomy is 553038.
The Financial Accounting Standards Board (FASB) produces the US GAAP Taxonomy annually. See https://xbrl.us/2022-us-gaap for details, including:
- a link to the taxonomy in a viewer with a search feature – this shows the structure for presentation and other linkbases, and includes definitions and authoritative references for all elements
- a link to an Excel file with the 2022 US GAAP concepts
Companies can also create their own concepts (called extension concepts) for cases where a data point in the report does not fall within the definition of any concept in the US GAAP Taxonomy. Consider reviewing a company’s filing to see if any of the concepts in the filing are extension concepts (use concept.is-base on a fact query to see which elements are extensions).
Monday, August 22, 2022 at 3:29 PM #202977Satish SahooParticipant
Thanks a lot for your very detailed response. I could get what I was looking for adapting your query to my python script. Thanks.
- You must be logged in to reply to this topic.
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
- The XBRL API
- XBRL Data Community
- 2022 US GAAP Taxonomy Viewer
- Live support - Monday, 3:30 - 4:30 PM ET
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.