SharePoint 2019 E-discovery and Rest Search API

My scenario is,i am in need to create a .net app that will allow the user for example to look for a particular text in all the files that are in SharePoint.It should be able to look for the text in the file content and return that particular paragraph where that text was found and when clicking on the latter it opens that file.

I have been looking at e-discovery search that already crawls the files and index them.Can you point me how to use the rest API or other any other way to do this search ?.I am using SharePoint 2019 and SQL server 2017 standard edition.

Note: The default search bar in SharePoint does exactly what i want to build.