A woman walks past the Baidu booth at the China International Technology Fair in Shanghai.

Chinese internet search giant Baidu on Tuesday topped Wall Street estimates for quarterly profit on the back of strong growth in its online advertisement business.

Revenue for the segment rose 25 percent to 21.1 billion Chinese yuan ($3.10 billion) in the second quarter.

The company has seen rapid growth in its newsfeed product, an app that is similar to Facebook's feed, and has managed to escape the ire of regulators even as competitors continue to suffer temporary bans and fines for failing to censor content.

Net income attributable to Baidu rose to 6.4 billion Chinese yuan, or 18.14 yuan per American depositary share (ADS), in the second quarter ended June 30 from 4.42 billion yuan, or 11.31 yuan per ADS, from a year earlier.

Excluding one-time items, Baidu earned 21.06 yuan per ADS, above expectations of 16.46 yuan.

Total revenue rose 24.4 percent to 25.97 billion yuan from 20.87 billion yuan.

The company's U.S.-listed shares rose about 3 percent to $254 in after-hours trading.