If most of your searches are happening on a browser, I would recommend something like Selenium http://docs.seleniumhq.org/ . Its a browser testing tool, but it can automate some of the things that you are looking to do. Selenium can also be extended if you want to.