A lot of my engagement programming for clients has involved finding good leads for them to build relationships with and gain as followers. Obviously, the search API is a good place to start, but just searching for keywords that match your engagement interests is not the best approach. For example, if I wanted to find high quality accounts that talk about food, I could run a search for keywords like food, restaurant, or cooking. Try this search and see how poor the quality of the tweets are. All you can really tell is that these users are probably hungry when they tweeted.
You can get much better results by using the leading accounts for your subject as the search keyword. Compare the results of the previous search with this search based on @FoodNetwork. Now we get people tweeting recipes, discussing cooking shows, and a good mix of celebrity chef accounts. The difference in quality is obvious. The rule is that people who tweet with the screen name of a leading account have a serious and informed interest in the subject. This group should be your starting point for an engagement campaign.
You can do your engagement directly from the search results, but if you want to store the results in a database for later analysis, you can start coding with this source code from my engagement programming book.