Buenas, necesito ayuda con el API

Intento crear un sistema sencillo el cual al colocar un código salga información especifica de un cliente: (ejemplo foto)
Pero no se como conectar el buscador con la base de datos para que cuando el cliente coloque el código se busque. Si podéis ayudarme me haríais un favor. (Discord: Mauro#6704)

ENGLISH
I try to create a simple system which, when placing a code, leaves specific information about a client: (example photo) But I don’t know how to connect the search engine to the database so that when the client places the code it will search for itself. If you can help me, you would do me a favor. (Discord: Mauro # 6704)

FOTO: https://gyazo.com/117695d3315fae7861a46b29fcc112e6