I'm currently assigned with creating a custom search page from scratch. Thus, I need a query that will go through all of our site and find me pages that contain key words on these pages. Does sharepoint have a method I can call to retrieve such result?
Are they publishing pages and when you say keywords are they going to be fields on pages from layout pages? You need to explain your architecture and requirements a bit more.
There are two ways to get your pages.
1 - you may write a webpart to directly get all the pages using the object model with a caml query. 2 - you can use the enterprise or fast search to crawl your pages and use the search service to return results which will require some settings on the search service like scopes and metadata properties. In this case you can either use the search object model or search web service to get results.
if you give some more details whether you have made any decisions on these or you have requiremeents to use one of these approaaches I can provide more detail on objects and methods with examples.