XBRL US¶
- class xbrl_us.XBRL(client_id: str | None = None, client_secret: str | None = None, username: str | None = None, password: str | None = None, grant_type: Literal['password', 'refresh_token'] | None = 'password', platform: str | None = 'xbrl-us-api-cl', store: Literal['y', 'n'] | None = 'n')[source]¶
XBRL US API client. Initializes an instance of XBRL authorized connection.
- Parameters:
client_id (str) – Unique identifier agreed upon by XBRL US and the 3rd party client.
client_secret (str) – Base64 key used to authenticate the 3rd party client.
username (str) – Unique identifier for a given user.
password (str) – Password used to authenticate the 3rd party user.
grant_type (str) – Used to identify which credentials the authorization server needs to check
client_credentials - Requires a client_id and client_secret only
password - Requires a username and password as well as client_id and client_secret
default - “password”
- assertion(endpoint: Literal['/assertion/search'], fields: List[Literal['assertion.code', 'assertion.detail', 'assertion.effective-date', 'assertion.rule-focus', 'assertion.run-date', 'assertion.severity', 'assertion.source', 'assertion.type', 'entity.cik', 'entity.code', 'entity.name', 'entity.scheme', 'report.accepted-timestamp', 'report.accession', 'report.base-taxonomy', 'report.creation-software', 'report.document-type', 'report.entry-url', 'report.filing-date', 'report.filing-year', 'report.form-type', 'report.id', 'report.period-focus', 'report.sec-url', 'report.sic-code', 'report.year-focus', 'report.zip-url']] | None = None, parameters: AssertionParameters | None = None, limit: int | all | None = None, sort: AssertionSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/assertion/search”.
fields (AssertionFields, required) – The fields to include in the query.
parameters (AssertionParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (AssertionSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- concept(endpoint: Literal['/concept/search', '/concept/{concept.local-name}/search'], fields: List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-abstract', 'concept.is-monetary', 'concept.is-nillable', 'concept.is-numeric', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'concept.substitution', 'dts.entry-point', 'dts.hash', 'dts.id', 'dts.target-namespace', 'label.id', 'label.lang', 'label.role', 'label.role-short', 'label.text', 'parts.local-name', 'parts.namespace', 'parts.order', 'parts.part-value', 'reference.id', 'reference.role', 'reference.role-definition', 'reference.role-short']] | None = None, parameters: ConceptParameters | None = None, limit: int | all | None = None, sort: ConceptSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/concept/{concept.local-name}/search” or “/concept/search”.
fields (ConceptFields, required) – The fields to include in the query.
parameters (ConceptParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (ConceptSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- cube(endpoint: Literal['/cube/search'], fields: List[Literal['concept.balance-type', 'cube.description', 'cube.drs-role-uri', 'cube.id', 'cube.member-value', 'cube.primary-local-name', 'cube.primary-namespace', 'cube.table-local-name', 'cube.table-namespace', 'cube.tree-depth', 'cube.tree-sequence', 'dimension-pair', 'dimensions', 'dimensions.count', 'dts.id', 'entity.code', 'fact.accuracy-index', 'fact.decimals', 'fact.id', 'fact.inline-display-value', 'fact.inline-negated', 'fact.is-extended', 'fact.numerical-value', 'fact.ultimus', 'fact.value', 'period.calendar-period', 'period.fiscal-period', 'period.fiscal-year', 'period.year', 'report.accession', 'report.base-taxonomy', 'report.document-type', 'report.entity-name', 'report.id', 'report.source-id', 'report.source-name', 'unit']] | None = None, parameters: CubeParameters | None = None, limit: int | all | None = None, sort: CubeSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/cube/search”.
fields (CubeFields, required) – The fields to include in the query.
parameters (CubeParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (CubeSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- document(endpoint: Literal['/document/search'], fields: List[Literal['document.content', 'document.documentset', 'document.id', 'document.text-search', 'document.top-level', 'document.tree-level', 'document.tree-order', 'document.type', 'document.uri', 'dts.content', 'dts.id', 'entity.cik', 'entity.code', 'entity.name', 'entity.scheme', 'report.filing-date', 'report.hash', 'report.id', 'report.source-id', 'report.source-name']] | None = None, parameters: DocumentParameters | None = None, limit: int | all | None = None, sort: DocumentSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/document/search”.
fields (DocumentFields, required) – The fields to include in the query.
parameters (DocumentParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (DocumentSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- dts(endpoint: Literal['/dts/search'], fields: List[Literal['dts.entity-name', 'dts.entry-point', 'dts.hash', 'dts.id', 'dts.taxonomy', 'dts.taxonomy-name', 'dts.version', 'report.accession', 'report.hash', 'report.id']] | None = None, parameters: DtsParameters | None = None, limit: int | all | None = None, sort: DtsSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/dts/search”.
fields (DtsFields, required) – The fields to include in the query.
parameters (DtsParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (DtsSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- dts_concept(endpoint: Literal['/dts/{dts-id}/concept/{concept.local-name}', '/dts/{dts.id}/concept/search', '/dts/{dts.id}/concept/{concept.local-name}/label', '/dts/{dts.id}/concept/{concept.local-name}/reference'], fields: List[Literal['dts.entity-name', 'dts.entry-point', 'dts.hash', 'dts.id', 'dts.taxonomy', 'dts.taxonomy-name', 'dts.version', 'report.accession', 'report.hash', 'report.id']] | None = None, parameters: DtsConceptParameters | None = None, limit: int | all | None = None, sort: DtsConceptSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/dts/{dts.id}/concept/search”, “/dts/{dts-id}/concept/{concept.local-name}”, “/dts/{dts.id}/concept/{concept.local-name}/label”, “/dts/{dts.id}/concept/{concept.local-name}/reference”.
fields (DtsConceptFields, required) – The fields to include in the query.
parameters (DtsConceptParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (DtsConceptSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- dts_network(endpoint: Literal['/dts/{dts.id}/network', '/dts/{dts.id}/network/search'], fields: List[Literal['dts.entity-name', 'dts.entry-point', 'dts.hash', 'dts.id', 'dts.taxonomy', 'dts.taxonomy-name', 'dts.version', 'report.accession', 'report.hash', 'report.id']] | None = None, parameters: DtsNetworkParameters | None = None, limit: int | all | None = None, sort: DtsNetworkSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/dts/{dts.id}/network”, “/dts/{dts.id}/network/search”.
fields (DtsNetworkFields, required) – The fields to include in the query.
parameters (DtsNetworkParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (DtsNetworkSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- entity(endpoint: Literal['/entity/search', '/entity/{entity.id}'], fields: List[Literal['entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'entity.ticker', 'entity.ticker2']] | None = None, parameters: EntityParameters | None = None, limit: int | all | None = None, sort: EntitySorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/entity/{entity.id}” or “/entity/search”.
fields (EntityFields, required) – The fields to include in the query.
parameters (EntityParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (EntitySorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- entity_report(endpoint: Literal['/entity/report/search', '/entity/{entity.id}/report/search'], fields: List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-base', 'concept.is-monetary', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'dimension-pair', 'dimension.is-base', 'dimension.local-name', 'dimension.namespace', 'dimensions', 'dimensions.count', 'dimensions.id', 'dts.entry-point', 'dts.id', 'dts.target-namespace', 'entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'fact.accuracy-index', 'fact.decimals', 'fact.has-dimensions', 'fact.hash', 'fact.id', 'fact.inline-display-value', 'fact.inline-is-hidden', 'fact.inline-negated', 'fact.inline-scale', 'fact.is-extended', 'fact.numerical-value', 'fact.text-search', 'fact.ultimus', 'fact.ultimus-index', 'fact.value', 'fact.value-link', 'fact.xml-id', 'footnote.id', 'footnote.lang', 'footnote.role', 'footnote.text', 'member.is-base', 'member.local-name', 'member.member-value', 'member.namespace', 'member.typed-value', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'period.calendar-period', 'period.end', 'period.fiscal-id', 'period.fiscal-period', 'period.fiscal-year', 'period.id', 'period.instant', 'period.start', 'period.year', 'relationship.id', 'relationship.order', 'relationship.preferred-label', 'relationship.source-concept-id', 'relationship.source-is-abstract', 'relationship.source-name', 'relationship.source-namespace', 'relationship.target-concept-id', 'relationship.target-datatype', 'relationship.target-is-abstract', 'relationship.target-label', 'relationship.target-name', 'relationship.target-namespace', 'relationship.tree-depth', 'relationship.tree-sequence', 'relationship.weight', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.type', 'report.year-focus', 'report.zip-url', 'unit', 'unit.denominator', 'unit.numerator', 'unit.qname']] | None = None, parameters: EntityReportParameters | None = None, limit: int | all | None = None, sort: EntityReportSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/entity/{entity.id}/report/search” or “/entity/report/search”.
fields (EntityReportFields, required) – The fields to include in the query.
parameters (EntityReportParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (EntityReportSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- fact(endpoint: Literal['/fact/oim/search', '/fact/search', '/fact/{fact.id}'], fields: List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-base', 'concept.is-monetary', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'dimension-pair', 'dimension.is-base', 'dimension.local-name', 'dimension.namespace', 'dimensions', 'dimensions.count', 'dimensions.id', 'dts.entry-point', 'dts.id', 'dts.target-namespace', 'entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'fact.accuracy-index', 'fact.decimals', 'fact.has-dimensions', 'fact.hash', 'fact.id', 'fact.inline-display-value', 'fact.inline-is-hidden', 'fact.inline-negated', 'fact.inline-scale', 'fact.is-extended', 'fact.numerical-value', 'fact.text-search', 'fact.ultimus', 'fact.ultimus-index', 'fact.value', 'fact.value-link', 'fact.xml-id', 'footnote.id', 'footnote.lang', 'footnote.role', 'footnote.text', 'member.is-base', 'member.local-name', 'member.member-value', 'member.namespace', 'member.typed-value', 'period.calendar-period', 'period.end', 'period.fiscal-id', 'period.fiscal-period', 'period.fiscal-year', 'period.id', 'period.instant', 'period.start', 'period.year', 'report.accession', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entry-url', 'report.event-items', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.submission-type', 'report.type', 'report.year-focus', 'unit', 'unit.denominator', 'unit.numerator', 'unit.qname']] | None = None, parameters: FactParameters | None = None, limit: int | all | None = None, sort: FactSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/fact/search”, “/fact/{fact.id}”, or “/fact/search/oim”.
fields (FactFields, required) – The fields to include in the query.
parameters (FactParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (FactSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- label(endpoint: Literal['/label/search', '/label/{label.id}/search'], fields: List[Literal['concept.id', 'concept.is-abstract', 'concept.local-name', 'concept.namespace', 'dts.entry-point', 'dts.id', 'label.id', 'label.lang', 'label.role', 'label.role-short', 'label.text']] | None = None, parameters: LabelParameters | None = None, limit: int | all | None = None, sort: LabelSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/label/search” or “/label/{label.id}/search”.
fields (LabelFields, required) – The fields to include in the query.
parameters (LabelParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (LabelSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- network(endpoint: Literal['/network/{network.id}'], fields: List[Literal['dts.entry-point', 'dts.id', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri']] | None = None, parameters: NetworkParameters | None = None, limit: int | all | None = None, sort: NetworkSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/network/{network.id}”.
fields (NetworkFields, required) – The fields to include in the query.
parameters (NetworkParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (NetworkSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- network_relationship(endpoint: Literal['/network/relationship/search', '/network/{network.id}/relationship/search'], fields: List[Literal['dts.entry-point', 'dts.id', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'relationship.id', 'relationship.order', 'relationship.preferred-label', 'relationship.source-concept-id', 'relationship.source-is-abstract', 'relationship.source-name', 'relationship.source-namespace', 'relationship.target-concept-id', 'relationship.target-datatype', 'relationship.target-is-abstract', 'relationship.target-label', 'relationship.target-name', 'relationship.target-namespace', 'relationship.tree-depth', 'relationship.tree-sequence', 'relationship.weight']] | None = None, parameters: NetworkRelationshipParameters | None = None, limit: int | all | None = None, sort: NetworkRelationshipSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/network/{network.id}/relationship/search” or “/network/relationship/search”.
fields (NetworkRelationshipFields, required) – The fields to include in the query.
parameters (NetworkRelationshipParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (NetworkRelationshipSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- query(endpoint: Literal['/assertion/search', '/concept/search', '/concept/{concept.local-name}/search', '/cube/search', '/document/search', '/dts/{dts-id}/concept/{concept.local-name}', '/dts/{dts.id}/concept/search', '/dts/{dts.id}/concept/{concept.local-name}/label', '/dts/{dts.id}/concept/{concept.local-name}/reference', '/dts/search', '/dts/{dts.id}/network', '/dts/{dts.id}/network/search', '/entity/search', '/entity/{entity.id}', '/entity/report/search', '/entity/{entity.id}/report/search', '/fact/oim/search', '/fact/search', '/fact/{fact.id}', '/label/search', '/label/{label.id}/search', '/network/{network.id}', '/network/relationship/search', '/network/{network.id}/relationship/search', '/relationship/search', '/relationship/tree/search', '/report/search', '/report/{report.id}', '/report/fact/search', '/report/{report.id}/fact/search', '/report/network/search'], fields: List[Literal['assertion.code', 'assertion.detail', 'assertion.effective-date', 'assertion.rule-focus', 'assertion.run-date', 'assertion.severity', 'assertion.source', 'assertion.type', 'entity.cik', 'entity.code', 'entity.name', 'entity.scheme', 'report.accepted-timestamp', 'report.accession', 'report.base-taxonomy', 'report.creation-software', 'report.document-type', 'report.entry-url', 'report.filing-date', 'report.filing-year', 'report.form-type', 'report.id', 'report.period-focus', 'report.sec-url', 'report.sic-code', 'report.year-focus', 'report.zip-url']] | List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-abstract', 'concept.is-monetary', 'concept.is-nillable', 'concept.is-numeric', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'concept.substitution', 'dts.entry-point', 'dts.hash', 'dts.id', 'dts.target-namespace', 'label.id', 'label.lang', 'label.role', 'label.role-short', 'label.text', 'parts.local-name', 'parts.namespace', 'parts.order', 'parts.part-value', 'reference.id', 'reference.role', 'reference.role-definition', 'reference.role-short']] | List[Literal['concept.balance-type', 'cube.description', 'cube.drs-role-uri', 'cube.id', 'cube.member-value', 'cube.primary-local-name', 'cube.primary-namespace', 'cube.table-local-name', 'cube.table-namespace', 'cube.tree-depth', 'cube.tree-sequence', 'dimension-pair', 'dimensions', 'dimensions.count', 'dts.id', 'entity.code', 'fact.accuracy-index', 'fact.decimals', 'fact.id', 'fact.inline-display-value', 'fact.inline-negated', 'fact.is-extended', 'fact.numerical-value', 'fact.ultimus', 'fact.value', 'period.calendar-period', 'period.fiscal-period', 'period.fiscal-year', 'period.year', 'report.accession', 'report.base-taxonomy', 'report.document-type', 'report.entity-name', 'report.id', 'report.source-id', 'report.source-name', 'unit']] | List[Literal['document.content', 'document.documentset', 'document.id', 'document.text-search', 'document.top-level', 'document.tree-level', 'document.tree-order', 'document.type', 'document.uri', 'dts.content', 'dts.id', 'entity.cik', 'entity.code', 'entity.name', 'entity.scheme', 'report.filing-date', 'report.hash', 'report.id', 'report.source-id', 'report.source-name']] | List[Literal['dts.entity-name', 'dts.entry-point', 'dts.hash', 'dts.id', 'dts.taxonomy', 'dts.taxonomy-name', 'dts.version', 'report.accession', 'report.hash', 'report.id']] | List[Literal['entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'entity.ticker', 'entity.ticker2']] | List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-base', 'concept.is-monetary', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'dimension-pair', 'dimension.is-base', 'dimension.local-name', 'dimension.namespace', 'dimensions', 'dimensions.count', 'dimensions.id', 'dts.entry-point', 'dts.id', 'dts.target-namespace', 'entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'fact.accuracy-index', 'fact.decimals', 'fact.has-dimensions', 'fact.hash', 'fact.id', 'fact.inline-display-value', 'fact.inline-is-hidden', 'fact.inline-negated', 'fact.inline-scale', 'fact.is-extended', 'fact.numerical-value', 'fact.text-search', 'fact.ultimus', 'fact.ultimus-index', 'fact.value', 'fact.value-link', 'fact.xml-id', 'footnote.id', 'footnote.lang', 'footnote.role', 'footnote.text', 'member.is-base', 'member.local-name', 'member.member-value', 'member.namespace', 'member.typed-value', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'period.calendar-period', 'period.end', 'period.fiscal-id', 'period.fiscal-period', 'period.fiscal-year', 'period.id', 'period.instant', 'period.start', 'period.year', 'relationship.id', 'relationship.order', 'relationship.preferred-label', 'relationship.source-concept-id', 'relationship.source-is-abstract', 'relationship.source-name', 'relationship.source-namespace', 'relationship.target-concept-id', 'relationship.target-datatype', 'relationship.target-is-abstract', 'relationship.target-label', 'relationship.target-name', 'relationship.target-namespace', 'relationship.tree-depth', 'relationship.tree-sequence', 'relationship.weight', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.type', 'report.year-focus', 'report.zip-url', 'unit', 'unit.denominator', 'unit.numerator', 'unit.qname']] | List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-base', 'concept.is-monetary', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'dimension-pair', 'dimension.is-base', 'dimension.local-name', 'dimension.namespace', 'dimensions', 'dimensions.count', 'dimensions.id', 'dts.entry-point', 'dts.id', 'dts.target-namespace', 'entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'fact.accuracy-index', 'fact.decimals', 'fact.has-dimensions', 'fact.hash', 'fact.id', 'fact.inline-display-value', 'fact.inline-is-hidden', 'fact.inline-negated', 'fact.inline-scale', 'fact.is-extended', 'fact.numerical-value', 'fact.text-search', 'fact.ultimus', 'fact.ultimus-index', 'fact.value', 'fact.value-link', 'fact.xml-id', 'footnote.id', 'footnote.lang', 'footnote.role', 'footnote.text', 'member.is-base', 'member.local-name', 'member.member-value', 'member.namespace', 'member.typed-value', 'period.calendar-period', 'period.end', 'period.fiscal-id', 'period.fiscal-period', 'period.fiscal-year', 'period.id', 'period.instant', 'period.start', 'period.year', 'report.accession', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entry-url', 'report.event-items', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.submission-type', 'report.type', 'report.year-focus', 'unit', 'unit.denominator', 'unit.numerator', 'unit.qname']] | List[Literal['concept.id', 'concept.is-abstract', 'concept.local-name', 'concept.namespace', 'dts.entry-point', 'dts.id', 'label.id', 'label.lang', 'label.role', 'label.role-short', 'label.text']] | List[Literal['dts.entry-point', 'dts.id', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri']] | List[Literal['dts.entry-point', 'dts.id', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'relationship.id', 'relationship.order', 'relationship.preferred-label', 'relationship.source-concept-id', 'relationship.source-is-abstract', 'relationship.source-name', 'relationship.source-namespace', 'relationship.target-concept-id', 'relationship.target-datatype', 'relationship.target-is-abstract', 'relationship.target-label', 'relationship.target-name', 'relationship.target-namespace', 'relationship.tree-depth', 'relationship.tree-sequence', 'relationship.weight']] | List[Literal['dts.id', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'relationship.id', 'relationship.order', 'relationship.preferred-label', 'relationship.source-concept-id', 'relationship.source-is-abstract', 'relationship.source-name', 'relationship.source-namespace', 'relationship.target-concept-id', 'relationship.target-datatype', 'relationship.target-is-abstract', 'relationship.target-label', 'relationship.target-name', 'relationship.target-namespace', 'relationship.tree-depth', 'relationship.tree-sequence', 'relationship.weight']] | List[Literal['dts.id', 'entity.cik', 'entity.code', 'entity.id', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.year-focus', 'report.zip-url']] | List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-base', 'concept.is-monetary', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'dimension-pair', 'dimension.is-base', 'dimension.local-name', 'dimension.namespace', 'dimensions', 'dimensions.count', 'dimensions.id', 'dts.entry-point', 'dts.id', 'dts.target-namespace', 'entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'fact.accuracy-index', 'fact.decimals', 'fact.has-dimensions', 'fact.hash', 'fact.id', 'fact.inline-display-value', 'fact.inline-is-hidden', 'fact.inline-negated', 'fact.inline-scale', 'fact.is-extended', 'fact.numerical-value', 'fact.text-search', 'fact.ultimus', 'fact.ultimus-index', 'fact.value', 'fact.value-link', 'fact.xml-id', 'footnote.id', 'footnote.lang', 'footnote.role', 'footnote.text', 'member.is-base', 'member.local-name', 'member.member-value', 'member.namespace', 'member.typed-value', 'period.calendar-period', 'period.end', 'period.fiscal-id', 'period.fiscal-period', 'period.fiscal-year', 'period.id', 'period.instant', 'period.start', 'period.year', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.type', 'report.year-focus', 'report.zip-url', 'unit', 'unit.denominator', 'unit.numerator', 'unit.qname']] | List[Literal['dts.entry-point', 'dts.id', 'entity.cik', 'entity.code', 'entity.id', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.year-focus', 'report.zip-url']] | None = None, parameters: AssertionParameters | ConceptParameters | CubeParameters | DocumentParameters | DtsConceptParameters | DtsParameters | DtsNetworkParameters | EntityParameters | EntityReportParameters | FactParameters | LabelParameters | NetworkParameters | NetworkRelationshipParameters | RelationshipParameters | ReportParameters | ReportFactParameters | ReportNetworkParameters | None = None, limit: int | all | None = None, sort: AssertionSorts | ConceptSorts | CubeSorts | DocumentSorts | DtsConceptSorts | DtsSorts | DtsNetworkSorts | EntitySorts | EntityReportSorts | FactSorts | LabelSorts | NetworkSorts | NetworkRelationshipSorts | RelationshipSorts | ReportSorts | ReportFactSorts | ReportNetworkSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = None, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
Query the XBRL US API for data.
- Parameters:
endpoint (AnyEndpoint) – The name of the endpoint to query.
fields (Optional[AnyFields]) – The fields query parameter establishes the details of the data to return for the specific query.
parameters (Optional[AnyParameters]) – The search parameters for the query.
limit (Optional[Union[int, “all”]]) – A limit restricts the number of results returned by the query. For example, in a “fact search”
limit=10would return 10 observations. You can also uselimit="all"to return all results (which is not recommended unless you know what you are doing!). The default is None which returns one response with up to your account limit. For example, if your account limit is 5000, then the default will return the smallest of 5000 or the number of results.sort (Optional[AnySorts]) – Any returned value can be sorted in ascending or descending order, using ASC or DESC (i.e.
{"report.document-type": "DESC"}). Multiple sort criteria can be defined and the sort sequence is determined by the order of the items in the dictionary.unique (Optional[bool]) – If True returns only unique values. Default is False.
as_dataframe (bool) – If True returns the results as a DataFrame else returns the data as json. The default is False which returns the results in json format.
print_query (Optional[bool]) – Whether to print the query text. Default is False.
timeout (Optional[int]) – The number of seconds to wait for a response from the server. If None will wait indefinitely.
async_mode (Optional[bool]) – If True runs the query in async mode. Default is False.
**kwargs – Additional keyword arguments to pass to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- relationship(endpoint: Literal['/relationship/search', '/relationship/tree/search'], fields: List[Literal['dts.id', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'relationship.id', 'relationship.order', 'relationship.preferred-label', 'relationship.source-concept-id', 'relationship.source-is-abstract', 'relationship.source-name', 'relationship.source-namespace', 'relationship.target-concept-id', 'relationship.target-datatype', 'relationship.target-is-abstract', 'relationship.target-label', 'relationship.target-name', 'relationship.target-namespace', 'relationship.tree-depth', 'relationship.tree-sequence', 'relationship.weight']] | None = None, parameters: RelationshipParameters | None = None, limit: int | all | None = None, sort: RelationshipSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/relationship/search” or “/relationship/tree/search”.
fields (RelationshipFields, required) – The fields to include in the query.
parameters (RelationshipParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (RelationshipSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- report(endpoint: Literal['/report/search', '/report/{report.id}'], fields: List[Literal['dts.id', 'entity.cik', 'entity.code', 'entity.id', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.year-focus', 'report.zip-url']] | None = None, parameters: ReportParameters | None = None, limit: int | all | None = None, sort: ReportSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/report/search” or “/report/{report.id}”.
fields (ReportFields, required) – The fields to include in the query.
parameters (ReportParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (ReportSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- report_fact(endpoint: Literal['/report/fact/search', '/report/{report.id}/fact/search'], fields: List[Literal['concept.balance-type', 'concept.datatype', 'concept.id', 'concept.is-base', 'concept.is-monetary', 'concept.local-name', 'concept.namespace', 'concept.period-type', 'dimension-pair', 'dimension.is-base', 'dimension.local-name', 'dimension.namespace', 'dimensions', 'dimensions.count', 'dimensions.id', 'dts.entry-point', 'dts.id', 'dts.target-namespace', 'entity.cik', 'entity.code', 'entity.id', 'entity.name', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'fact.accuracy-index', 'fact.decimals', 'fact.has-dimensions', 'fact.hash', 'fact.id', 'fact.inline-display-value', 'fact.inline-is-hidden', 'fact.inline-negated', 'fact.inline-scale', 'fact.is-extended', 'fact.numerical-value', 'fact.text-search', 'fact.ultimus', 'fact.ultimus-index', 'fact.value', 'fact.value-link', 'fact.xml-id', 'footnote.id', 'footnote.lang', 'footnote.role', 'footnote.text', 'member.is-base', 'member.local-name', 'member.member-value', 'member.namespace', 'member.typed-value', 'period.calendar-period', 'period.end', 'period.fiscal-id', 'period.fiscal-period', 'period.fiscal-year', 'period.id', 'period.instant', 'period.start', 'period.year', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.type', 'report.year-focus', 'report.zip-url', 'unit', 'unit.denominator', 'unit.numerator', 'unit.qname']] | None = None, parameters: ReportFactParameters | None = None, limit: int | all | None = None, sort: ReportFactSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/report/{report.id}/fact/search” or “/report/fact/search”.
fields (ReportFactFields, required) – The fields to include in the query.
parameters (ReportFactParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (ReportFactSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.
- report_network(endpoint: Literal['/report/network/search'], fields: List[Literal['dts.entry-point', 'dts.id', 'entity.cik', 'entity.code', 'entity.id', 'entity.scheme', 'entity.ticker', 'entity.ticker2', 'network.arcrole-uri', 'network.id', 'network.link-name', 'network.role-description', 'network.role-description-like', 'network.role-uri', 'report.accepted-timestamp', 'report.accession', 'report.address', 'report.base-taxonomy', 'report.checks-run', 'report.creation-software', 'report.document-index', 'report.document-type', 'report.documentset-num', 'report.entity-name', 'report.entry-type', 'report.entry-url', 'report.event-items', 'report.filer-category', 'report.filing-date', 'report.form-type', 'report.hash', 'report.html-url', 'report.id', 'report.is-most-current', 'report.period-end', 'report.period-focus', 'report.period-index', 'report.phone', 'report.restated', 'report.restated-index', 'report.sec-url', 'report.sic-code', 'report.source-id', 'report.source-name', 'report.state-of-incorporation', 'report.submission-type', 'report.year-focus', 'report.zip-url']] | None = None, parameters: ReportNetworkParameters | None = None, limit: int | all | None = None, sort: ReportNetworkSorts | None = None, unique: bool | None = False, as_dataframe: bool = False, print_query: bool | None = False, timeout: int | None = 100, async_mode: bool | None = False, **kwargs) dict | DataFrame[source]¶
- Parameters:
endpoint (str, required) – The API endpoint to query. Options are “/report/{report.id}/network/search” or “/report/network/search”.
fields (ReportNetworkFields, required) – The fields to include in the query.
parameters (ReportNetworkParameters, optional) – The search parameters for the query. Default is None.
limit (Union[int, “all”], optional) – The maximum number of results to return. If None, the account limit is used. Default is None.
sort (ReportNetworkSorts, optional) – The sort parameters for the query. Example: {“report_document_type”: “desc”}. Default is None.
unique (bool, optional) – If True, returns only unique values. Default is False.
as_dataframe (bool, optional) – If True, returns the results as a DataFrame. Default is False, which returns the results as JSON.
print_query (bool, optional) – If True, prints the query text. Default is False.
timeout (int, optional) – The number of seconds to wait for a response from the server. Default is 100 seconds. If None, waits indefinitely until kicked off by the server.
async_mode (bool, optional) – If True, uses the asynchronous query method. This can reduce the time taken for large queries. Use with caution. Default is False.
**kwargs – Additional keyword arguments to be passed to the request.
- Returns:
Union[dict, DataFrame] – The results of the query.