Skip to main content

schema_files

A tool for navigating the directory of SEC XML schema files by year.

Example​

from openbb import obb
data = obb.regulators.sec.schema_files()
data.files[0]
https://xbrl.fasb.org/us-gaap/
#### The directory structure can be navigated by constructing a URL from the 'results' list. ####
url = data.files[0]+data.files[-1]
#### The URL base will always be the 0 position in the list, feed the URL back in as a parameter. ####
obb.regulators.sec.schema_files(url=url).results.files
['https://xbrl.fasb.org/us-gaap/2024/'
'USGAAP2024FileList.xml'
'dis/'
'dqcrules/'
'ebp/'
'elts/'
'entire/'
'meta/'
'stm/'
'us-gaap-2024.zip']

Parameters​

NameTypeDescriptionDefaultOptional
querystrSearch query.True
use_cacheboolWhether or not to use cache. If True, cache will store for seven days.TrueTrue
providerLiteral['sec']The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'sec' if there is no default.secTrue

Returns​

OBBject
results : List[SchemaFiles]
Serializable results.

provider : Optional[Literal['sec']]
Provider name.

warnings : Optional[List[Warning_]]
List of warnings.

chart : Optional[Chart]
Chart object.

extra : Dict[str, Any]
Extra info.

Data​

NameTypeDescription