Creating app similar to, how does the search function work?

Hi Guys,

I am building app that would be essentially a list with dropdowns, just like, where should I start when building a search engine for such list?

Since the functionality is identical to the, would it be ethical if I were to somehow use GitHub code from that page for my personal project?

Thank you very much in advance!
Milos Nikolic