Added api and search, scoring ogic