take a close look at the links of the item descriptions on the various pages out there: (allakhazam, thotbott, buffed,...) most of them use the item link as the page link, ie http://www.thottbot.com/?i=40513 will show you thunderfury and the number at the end is the Item ID ^^. Ingame you won't see them unless you find a mod that shows em to you.
Hope that helps you.
Do not trust Thottbot when it comes to this. It is extremely inaccurate, as shown in your example. The correct itemID for Thunderfury is 19019 (http://www.wowhead.com/?item=19019), not 40513. This is due to a horrendous amount of false and duplicate data taking up IDs on the Thottbot site. Allakhazam and Wowhead have the correct ones in URL though.