An API for the BHL project databases