you will need to write a web service (whitelisted method) and pass the keyword to search the keyword in database. To seach through database you can either use the frappe.db.sql, frappe.db.get_values, frappe.get_list or frappe.get_all methods.
e.g.
@frappe.whitelist()
def search_keyword(keyword):
// code to search database
from the web page/form you will need to use the frappe.call to call the whitelisted method and get the result.