How to retrieve all relevant hashtags associated with the page?


we know there are many websites which gives us relevant hashtags for a particular search of any game or program. for example fifa 2014 has hashtags such as #worldcup2014, #worldcup etc. how that could be achieved ? how do they retrieve relevant hashtags ?