How to apply Search functionality for all the content types?

Yes, but please specify what I need to do if I want to create a custom API to achieve this. I know there are documents for Entity Service API and Query Engine API. But, if I want to use them, what need to be done from the starting step by step, if you could suggest so, I will be thankful.