Friday 6 November 2020

Returning Tagged As Reported XBRL using an API

This is where you can see how a Company Reported their financial data but with tags to allow standardization, comparison and aggregation.

This is available to see in the Beryl Section Sheet. The API call brings back data as seperate records for each year but this is obviously more difficult to read and not how you would see it an report so the Power Query in the example sheet flips the years up onto the y axis of the Table as Columns. This can have the unwanted effect of inserting new columns into the sheet with each new call, as potentially each new column has different name depending on the dates of the years in question coming back from the filing.

To counteract that and to stop it getting messy basically!, we moved the Input Boxes from the top row to the first column. You can have the boxes wherever you want really. This sheet is an example, a starting point. As long as they build valid Queries, they can go wherever makes sense to you. You might want to create a separate opening sheet with all the parameters in for example.


This Call uses the items/section Endpoint to return an As Reported Filing Section.


By choosing the Relative option "123", it will bring back all the primary periods for Report and so will the results will come back looking like the face of the Income Statement if you say choose that Section.



Which section gets returned is determined by which Section you choose. A drop down in the example Section sheet shows you the sections you can choose as denoted by their codes but you can actually view any section that has XBRL Values in the report by selecting it by number. Just visit the Filing Sections sheet see which Sections are available for a filing.







Using an API Call to get an Overview of the XBRL contained in Filing

We have a very simple call that enables you to quickly see which sections of data are available as XBRL in a filing. This is particularly helpful when used in conjunction with items/sections Endpoint. That Endpoint brings back all the XBRL values disclosed in a chosen section along with all the presentational data to display it as it was reported (e.g. show me in the Income Statement for 2019. What you are looking at here when you do that is all the same XBRL used by the SEC to construct their Interactive Data pages for a filing.


Use the Endpoint sections as shown, choose a company in the Co Box and select a Date for the filing. You can also choose further along the row in the Annual? and Quarter Boxes whether you want to see the Annual Filing (e.g. 10-K or 20-F - just select "yr", otherwise "q") or choose which quarter you wish to see the filing for. By default it will bring back the annual filing.


The results, as shown above, give you a list of all the Sections by name and by Tag. Unlike (in theory!), XBRL Values, Sections returned from the SEC data are not tagged, very bizarrely, with a set of standard tags. So we have stepped in to supply our own Standard Section Tags and to make things even easier, especially when summoning a section, we've turned these into a series of short codes. You can see these displayed in the Code column when you a return list of Sections. Each Section is also numbered according to its display order (No). This is useful when summoning a more obscure Section that does not have a Code. Line_Total next to it will give you a handle on whether a Section is likely to contain any useful XBRL (Total lines of XBRL contained in a Section). You can also quickly verify that the data returned for a Section is as it should be by following the "Link" to the same page shown in SEC Interactive Data for a filing. It should be as the data source is the same - the XBRL filed at the SEC.

Thursday 5 November 2020

Getting Tickers and Other Company Details Back with an XBRL API Data Call

 



There are three relevant Endpoints when trying to find a company to download.

1. cos/try (as shown above) enables you to search on a company name. Input at least five letters into the Company Box and it will return a list if matching companies when you refresh the query (Alt F5) as shown below.

2. cos/ will search by Ticker or CIK to return an exact match. In the case of a Ticker, it may return more than one result as it will show all the different companies that have used that Ticker since Companies have filed XBRL. The most common reason why two companies may have used the same Ticker would be where a company has morphed into a different legal entity so two companies, two CIK's. Don't worry when bringing back results we handle this by mapping the same Ticker to both companies to bring back a seamless series of results. Note: CIK's never change whereas Tickers for a company can.

3. cos/industry. You can use a SIC code with this Endpoint to bring back all companies with the same SIC. You could copy then SIC code for a target company into the industry box, select this Endpoint and the query will return all the companies operating in the same industry.