But the cost-per-click dropped by roughly 7 percent on Google's sites. The cost dropped by 13 percent on outside sites. The drop could be due to the lower price of ads on mobile devices.

Still, "Google had a great quarter," CFO Patrick Pichette said in a statement.

The company also said that Nikesh Arora, Google's chief business officer, will be leaving the company after 10 years with Google. He will be replaced for now by Omid Kordestani, Google's business founder, the company said.

Google shares were trading up after hours Thursday at $582.33, after closing at $573.73.