Baidu has been trying to cut its dependence on its core search business, which accounts for three-quarters of the company's revenue. The company has had limited success so far with its cloud services and artificial intelligence businesses, but its listed subsidiary iQIYI, a Netflix-like video service, is popular with young people.

Third-quarter revenue from iQIYI, which competes with Alibaba-backed Youku and Tencent Holdings' Tencent Video, rose nearly 7% from a year earlier to 7.4 billion yuan ($1.06 billion), as the service crossed 105.8 million subscribers in September. IQIYI's shares rose 4% in extended trading.

A relatively new bet - offering mini-programmes within the Baidu App to boost traffic - is gathering steam as well. Traffic to the app surged 25% in the third quarter, the company said in a statement.

"The changes we initiated this year are paying off," Baidu Chief Executive Robin Li said in an internal letter reviewed by Reuters.

But revenue from Baidu's core business fell 3% in the quarter ended Sept. 30, weighing on overall sales that were flat from a year earlier at 28.08 billion yuan but ahead of the analyst estimate of 27.49 billion yuan, according to Refinitiv data.

Baidu reported a net loss of 6.37 billion yuan in the quarter mainly due to losses from the company's equity investments, versus a profit of 12.40 billion yuan a year earlier.

Excluding these losses and other one-time items, Baidu earned 12.61 yuan per American depository share (ADS), beating estimates of 7.88 yuan per ADS.

Baidu, like other Chinese internet companies, is dealing with tightening regulation even as the overall economy slows.

These issues were for now weighing on Baidu's revenue, Li said on a post-earnings call.

"These things, I think, will be temporary and we also think that the macro environment is stabilising. We do think that eventually revenue will catch up with traffic," he said.

Baidu, whose search engine dominates the market in China, forecast fourth-quarter revenue between 27.10 billion yuan and 28.70 billion yuan. Analysts expect 27.52 billion yuan.

The company's ADS, which have lost nearly a third of their value this year, were up about 5% at $112.74 in extended trading.

By Akanksha Rana and Brenda Goh