Retrieving XBRL filings

Is it possible to retrieve the XBRL or iXBRL filing for a given company through the API?
I know there is a zipped data dump - but would like to pull XBRL data on the fly through the API.

Thanks

If a company has filed in this format then you can get the filing via the Documents API. The normal way to do this is start at the Filing History List / Filing History Entry and follow the URIs in the links (links.document_metadata). Requesting the initial link will bring back the document Metadata resource which will tell you the (mime) types of data available. You can control which type you download by setting the appropriate type in the Accept http header.

More info on the download process in my post to this thread / linked posts: