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?
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).
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.
The national consortium for the business reporting standard
XBRL US is a not-for-profit organization supporting the implementation of digital business reporting standards through the development of taxonomies for use by U.S. public and private sectors, with a goal of interoperability between sectors, and by promoting XBRL adoption through marketplace collaboration.