Home Forums The XBRL API Using Tickers

Tagged: 

This topic contains 2 replies, has 3 voices, and was last updated by  Peter Guldberg 1 month, 2 weeks ago.

  • Author
    Posts
  • #114392

    Jim Truscott
    Participant

    Having double-checked the documentation (and run some never ending queries!), am I right in thinking that you cannot retrieve fact values directly with a ticker?

    That you need to query the entity or report first to get an id to use in your fact request?

    I guess confirming this?, I notice the google sheet exclusively uses CIK’s and where a ticker can be used as an input in BSCompare, a look up is made to a different url – https://csuite.xbrl.us (another API?).

    Is this a better source of ticker/CIK mappings? If so, should we use this?

  • #114719

    David Tauriello
    Keymaster

    you can search on entity.ticker to return facts, see
    https://xbrl.us/forums/topic/reports-and-periods/#post-113100

    That said, I wouldn’t advise it for heavy lifting as it can be a bit slow, which is why we’re returning tickers with the legacy API in the BScompare template. When the other endpoints are sunset in December, this one will likely remain available for several months into 2019.

  • #114754

    Peter Guldberg
    Participant

    I am not sure it will work much quicker, but you could also use:

    =left(ImportXML("https://www.sec.gov/cgi-bin/browse-edgar?ticker="&D2&"&action=getcompany","//div/span/a[1]"),10)

    in Google Sheets where cell D2 contains your ticker.

You must be logged in to reply to this topic.

Comment