- This topic has 4 replies, 2 voices, and was last updated 2 years, 6 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Home › Forums › The XBRL API › Using document.type-index to filter results
Hello!
The problem I have is that for fiscal years 2019 and EARLIER when I pull Cash Flow statement data, I get only full year result, rather than, say 1H or 3QCUM.
Here’s an example of my query:
https://api.xbrl.us/api/v1/fact/search?&entity.cik=0000320193&period.fiscal-period=1Q,1H,3QCUM,Y&concept.local-name=PaymentsToAcquirePropertyPlantAndEquipment&fact.has-dimensions=false&fact.ultimus=true&report.document-index=1,2,3,4,5&fields=report.period-end,entity.name,period.fiscal-year.sort(DESC),concept.local-name,fact.numerical-value,period.fiscal-period.sort(DESC),report.id,report.sec-url,fact.offset(0)
This does not seem to be a query-related issue, I believe, as the initial fiscal periods DO show the required periodic data.
Would appreciate a help on that.
Regards,
Timur
Hi Timur – thanks for writing; the query is using report.document-index. Generally, this filter is paired with report.document-type so you can get the corresponding data (ie. report.document-type=10-K&report.document-index=1,2,3 will return the three most-recent 10-K reports without any amended filings).
Without specifying a report.document-type, the results may be inaccurate.
If you remove the report.document-index filter from your query, you should return all values for the entity and concept.
Hi, David
Thank you very much for your response. This definitely helps and does return all the values! Unfortunately for me, it retrieves even more data that I need (let alone if other concepts are added). Since I cannot use document-index, is there any other way I could limit how many years of data are being retrieved?
Hi Timur – seems like period.fiscal-year (comma-separated, like you were doing with document.type-index) might be a better option, since you’re looking by year.
The online documentation lists all available parameters for fact (and other endpoint) searches: https://xbrlus.github.io/xbrl-api/#/fact/getFactDetails
Hi, David
That resolves the issue (I also retrieve the latest fiscal year to dynamically adjust my period.fiscal-year series)!
Thank you very much indeed for your time and assistance.
Regards,
Timur
API Use 2024 || API Use 2023 || API Use 2022 || API Use 2021 || API Use 2020 || API Use 2019 || API Use 2018
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.