https://github.com/defer-/my-projects/blob/master/surf-0.6-searchengine.diff
I wrote patch which adds search engine integration. If you dont provide any arguments surf loads homepage. If you provide url which is not valid then surf passes it to search engine. You can configure homepage and searchengine values in config.h. I see this as better approach than the searchengines patch from surf.suckless.org.