Twitter API for data analyzing


I’m working on developing an application based on twitter, and it will use twitter APIs. A primary part of it is analyzing the tweets and finding the most recent and relevant tweet pertaining to a tag. Does the API provide any functionality of this sort?