updated search.js
updated API