Twitter search api for using in my application



I am in need of using twitter search in my application. Like if i enter a search term in a text box or a term with a hash tag, it should connect to the twitter database and retrieve the locations may be the lat, long where the users had tweeted using the same term given in the textbox. I could see something here that matches my requirement Can any of you could help in giving example codes with the above link? or any other suggestions?