So can google. Supposedly Sergey even suggested to start a Hedge fund, but it would probably be insider trading if they would do their decisions based on the user data.
Companies that have non-public information about companies that they trade with are barred from using that information to trade stocks. For example if company B which manufactures bullets orders gunpowder from company G, and company B starts ordering a lot more gunpowder, employees from company G can't buy more stock of company B due to that knowledge. It seems like Google could fall into the category of company G since it has non-public search terms from other companies.