简体   繁体   中英

How many official xbrl concepts in its term?

A taxonomy element that provides the meaning for a fact. For example, "Profit", "Turnover", and "Assets" would be typical concepts.
https://www.xbrl.org/guidance/xbrl-glossary/
How many xbrl concepts in the specified company?Call it in a company with sec's api.
https://data.sec.gov/api/xbrl/companyfacts/CIK0001318605.json

def number_concept_used(cik):
    import requests
    url = 'https://data.sec.gov/api/xbrl/companyfacts/CIK{:>010s}.json'.format(cik)
    headers = {
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"
              }
    #call sec's RESTful api
    res = requests.get(url=url,headers=headers)
    result = res.json()
    data = result['facts']['us-gaap']
    concepts = data.keys()
    return len(concepts)

Now call the function written in python:

number_concept_used('1318605')
552 
number_concept_used('320193')
486

There are 552 official xbrl concepts in tesla 's financial statements,486 official xbrl concepts in apple 's financial statements.Different company use different official xbrl concepts in their financial statement.I have find the webpage where we can search xbrl concept:

https://xbrlview.fasb.org/yeti/resources/yeti-gwt/Yeti.jsp#tax~(id~174*v~7350)!net~(a~3474*l~832)!lang~(code~en-us)!rg~(rg~32*p~12)    

It does not tell the total numbers.How many offical xbrl concepts in all listed companies?Or say,how many xbrl concepts shared by all listed companies exclude customized concept by company itself?

Maybe it is 7300 or more,i am a bit sure,downloaded financial statement data set on 2020,create a database and num table to store num.txt file,extract the downloaded file and write num.txt into num table.

https://www.sec.gov/dera/data/financial-statement-data-sets.html

Enter the database:

select distinct(tag) from num where version='us-gaap/2020';
7300

I want to get the official handbook which listing all these concepts,where is it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM