The part where it says free to play would be replaced with the cost of the game. The problem with the Steam website, is that games are sorted according to their proprietary APPID. This means Dota 2 is located at http://store.steampowered.com/app/570
and Team Fortress 2 is at http://store.steampowered.com/app/440
. We could attempt to translate the name of the game into the ID, but the Steam API
doesn't look like it has a function to deal with that.
To answer your second question, we will have to parse the webpage of the game, once the default duckduckgo search finds it. I can probably devise a regex script to find that. Here it is:
Then we would go to http://store.steampowered.com/app/$1
and search for whatever would be in the picture. Price is at the regex "\Q<div class="game_purchase_price price">\E\n\t\t\t\t\t\t(+)\t\t\t\t\t\Q</div>\E"