The MultiChain Explorer is build a separate database of all of the transactions on the blockchain, by querying the data in the memory pool and blocks. You can do something similar using a combination of the following APIs: getrawmempool, getblockhash, getblock and getrawtransaction.