Baidu (NASDAQ:BIDU), the Chinese tech giant that owns the country's leading search engine, recently posted its third-quarter earnings.

Its revenue rose 1% year-over-year to 28.32 billion yuan ($4.16 billion), matching estimates and growing for the first time in three quarters. Its adjusted net income increased 59% to 6.99 billion yuan ($1.03 billion), or $3.00 per American Depository Share (ADS), which beat expectations by $1.02.

Baidu expects its revenue to rise 4% at the midpoint for the fourth quarter, but it didn't provide any earnings guidance. Those numbers seem to suggest the worst is over for Baidu, which lost about 40% of its value over the past three years -- but is its out-of-favor stock worth buying?

A screen filled with stock tickers.

Image source: Getty Images.

Baidu's advertising revenue is still declining

Baidu's main problem is its core advertising business, which accounted for 72% of its top line during the quarter.

This business struggled as competitors like Tencent's (OTC:TCEHY) WeChat, Alibaba's (NYSE:BABA) marketplaces, Bilibili (NASDAQ:BILI), and ByteDance's Douyin and Toutiao lured away advertisers. Intense macro headwinds -- including China's economic slowdown, the trade war, and the COVID-19 pandemic -- exacerbated the pain.

Baidu's advertising revenue still dipped 1% year-over-year to 20.2 billion yuan ($2.98 billion) during the third quarter, marking the business' sixth straight quarter of declines. By comparison, Tencent's advertising revenue rose 16% year-over-year in the third quarter, and accelerated from its 13% growth in the previous quarter.

Baidu's advertising business is struggling because China's internet sector is evolving. Chinese internet users are pivoting from traditional search engines toward monolithic apps like WeChat, which hosts millions of Mini Programs for online orders, payments, and other services. They're consuming more content on digital media platforms like Douyin and Bilbili, and going directly to Alibaba's online marketplaces instead of searching for products on Baidu.

Baidu added Mini Programs to its mobile app and launched short video apps like Kankan to counter those trends, but those efforts aren't moving the needle yet. Baidu is also reducing its traffic acquisition costs (TAC) to boost its margins, but those cost-cutting moves could make it even tougher to turn around its ad business.

iQiyi is no longer Baidu's growth engine

Baidu's third-quarter revenue only rose because its "others" revenue grew 5% year-over-year to 8.03 billion yuan ($1.18 billion).

A streaming video plays on a laptop.

Image source: Getty Images.

Baidu's streaming video platform iQiyi (NASDAQ:IQ) generated 90% of that revenue. The rest mainly came from Baidu Cloud, which Canalys ranks as the fourth-largest cloud infrastructure player in China behind Alibaba, Huawei, and Tencent.

iQiyi was once the segment's core growth engine, but its revenue fell 3% year-over-year to 7.19 billion yuan ($1.06 billion) during the third quarter as its number of paid subscribers dipped 1% to 104.8 million.

That slowdown indicates that iQiyi is struggling against its top rival Tencent Video. iQiyi's net loss narrowed from 3.69 billion yuan to 1.18 billion yuan ($173 million), but it's still a dead weight on Baidu's bottom line.

However, Baidu Cloud's revenue surged 41% year-over-year, buoyed by strong demand across multiple sectors, and offset iQiyi's decline. But Baidu Cloud is still likely operating at a loss, since even Alibaba still can't squeeze out a profit from its market-leading cloud platform.

In short, Baidu shifted its dependence from iQiyi to Baidu Cloud to offset its declining ad revenue. Both businesses might prop up Baidu's top line as its core advertising business flounders, but neither one will boost its profits anytime soon.

Trying to break the cycle with YY

Baidu is trying to break out of this rut by buying JOYY's (NASDAQ:YY) YY Live video platform for $3.6 billion in cash. This deal makes sense for JOYY, which generates most of its revenue outside of China, but it's not a great move for Baidu.

YY Live's total number of mobile monthly active users (MAUs) rose 3% year-over-year to 41.3 million last quarter, but its number of paid users fell 5% to 4.1 million as the COVID-19 crisis throttled purchases of virtual gifts.

Integrating YY Live into Baidu's mobile app, which had 544 million MAUs in September, could bring more users to its Mini Programs, expand its video ecosystem, and widen its moat against Tencent's WeChat. But it's unclear if YY Live can turn around Baidu's online marketing business, curb its dependence on unprofitable platforms like iQiyi and Baidu Cloud, or improve the company's margins.

Improving margins and a reasonable valuation

Baidu's business is still messy, but tighter cost controls -- including its lower TAC, a shift toward higher-margin in-app marketing services, and iQiyi's narrower losses -- boosted its adjusted EBITDA margin year-over-year from 36% to 46% during the quarter.

Therefore, Baidu's revenue growth should remain anemic, but its profits should continue rising. That strategy makes it a less exciting stock than Alibaba or Tencent, but it's historically cheap at 14 times forward earnings.

But Baidu is also cheaper than Alibaba and Tencent for obvious reasons. I personally own shares of Baidu, but I won't add any more shares until it turns around its ailing advertising business, reduces its dependence on unprofitable platforms, and justifies its purchase of YY.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.