Added pagination support for search results

Current implementation only returns the first page of the results. Updated code to obtain subsequent pages until an empty page is received.