Home Forums The XBRL API Using document.type-index to filter results

Viewing 3 reply threads
  • Author
    Posts
    • #201499
      Timur Mirzaev
      Participant

      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

    • #201522

      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.

      • #201523
        Timur Mirzaev
        Participant

        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?

    • #201524

      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

    • #201530
      Timur Mirzaev
      Participant

      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

Viewing 3 reply threads
  • You must be logged in to reply to this topic.

Upcoming XBRL US Events

Webinar: SEC Rule – Tailored Shareholder Reports for Mutual Funds and ETFs
Wednesday, May 15, 2024

Domain Steering Committee Meeting
Tuesday, May 21, 2024

Communications & Services Steering Committee Meeting
Tuesday, May 21, 2024

GovFin 2024: Municipal Reporting Workshop
Tuesday, July 30, 2024