fix a bug when rendering an api requests when the headers are nil
remove some warnings for unused variables
update Plug dependency
extract the search logic into a service
can count the number of results
give the pagination information in the search result