Home Forums The XBRL API Getting statements and searching on network.role-description

Viewing 2 reply threads
  • Author
    Posts
    • #184734
      Arthur Olevskiy
      Participant

      Hi,

      Sorry if it was asked already.
      I use this endpoint to get concept.local-name and fact.value data:

      https://api.xbrl.us/api/v1/report/11572/fact/search?fields=period.calendar-period,concept.local-name,fact.value

      Unfortunately, I didn’t figure out with following issues:
      1. How I can get only facts from cash flow/income/balance sheet statement?
      1.1 By the way, what parameters I can use for network.role-description= …
      2. Can I get both facts base taxonomy and company specific taxonomy?

      Thank you so much.

    • #184753

      Hi Arthur – please see https://xbrl.us/forums/topic/extracting-data-from-a-particular-financial-statement for how to get statement data. There’s also a Google Sheet template – https://xbrl.us/xbrl-api-explorer with queries that might be helpful.

      The network.role-description parameter is a text field. It can be manipulated with a stringmatch parameter using a couple of options (this needs to be added to our documentation):

      • use like to find the string – https://api.xbrl.us/api/v1/relationship/search?dts.id=306447&network.link-name=presentationLink&network.role-description=consolidate income&stringmatch=network.role-description(like)&fields=network.role-description,relationship.id.sort(ASC),relationship.tree-sequence.sort(ASC),relationship.target-name

        returns nothing because the string consolidate income doesn’t exist in this network.role-descriptionremove one of the terms and you get results.

      • use ts to find when each word in the string exists – https://api.xbrl.us/api/v1/relationship/search?dts.id=306447&network.link-name=presentationLink&network.role-description=consolidate income&stringmatch=network.role-description(ts)&fields=network.role-description,relationship.id.sort(ASC),relationship.tree-sequence.sort(ASC),relationship.target-name

      Last, unless you’re using the ‘concept.is-base’ parameter to filter facts, the query will return both base and extension concepts (see documentation https://xbrl.us/xbrl-api-documentation).

    • #184795
      Arthur Olevskiy
      Participant

      Thank you David. It clarifies a lot.

      By the way, using “stringmatch” can I exclude Disclosures and etc?

      And I think last question. If I want to get fact of particular statement, can I put following values for “network.role-description”: consolidate income, cash flow and balance sheet, and it will be valid?

      • #185238

        Arthur – sorry for the slow response. The stringmatch parameter is simple text only – no regex or wildcards are currently possible, so excluding results can be complex, especially given that the network.role-description is a user-defined field, with each company permitted to describe statements and disclosures as they see fit.

        I hope by now you tried the query with multiple statements – IMO, you might get a closer approximation to face financials if you use (ts) with something like ‘statement balance cash income’ – ?

Viewing 2 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