Tech giant Baidu (BIDU 0.50%) owns China's largest search engine and mapping platform, the popular video site iQiyi, and links it all together with a vast ecosystem of internet and cloud-based services.

However, investors who are interested in Baidu should take a closer look at its revenue streams to understand the unique challenges that it faces. Today, we'll discuss how Baidu makes most of its money, the headwinds that it faces, and whether or not the stock is a good buy at current prices.

Baidu Image Search.

Baidu Image Search. Image source: Author's screenshot.

How does Baidu make money?

91% of Baidu's revenue came from online marketing in fiscal 2016. However, revenue at the unit rose just 0.8% to $9.3 billion during the year, due to two main factors.

First, Chinese regulators forced Baidu to remove ads (particularly for healthcare products and services) which were deemed misleading. That crackdown was sparked by the death of a college student who pursued a questionable cancer treatment advertised on Baidu. Several years ago, rival search engine Qihoo 360 notably accused Baidu of generating 30% of its ad revenues from fake healthcare ads. The resulting purge caused Baidu's number of active online marketing customers to drop 18.6% annually to 452,000 during the fourth quarter, resulting in an 8.2% year-over-year decline in marketing revenues.

BIDU Revenue (TTM) Chart

Source: YCharts

Second, Baidu swapped its 45% stake in online travel agency Qunar (QUNR) for a 25% stake in its bigger rival Ctrip (TCOM 1.76%). That move effectively merged the two competitors and ended their margin-crushing price war. However, the move also temporarily reduced Baidu's marketing revenues. Excluding the impact of the swap, Baidu's marketing revenues rose 5.4% in 2016, and its total revenues rose 11.9% -- compared to its reported growth of 6.3%.

Therefore, Baidu's revenue growth will likely accelerate again once it moves past the government probe and Qunar swap. That's why analysts expect Baidu's revenues to rise 21% this year. Moreover, Baidu's revenue per online marketing customer rose 7.9% to 65,300 yuan ($9,405) during the year, which may offset its temporary slowdown in customer growth.

How much of that revenue trickles down to the bottom line?

Another ongoing concern about Baidu is that it's investing too heavily in the expansion of its O2O (online-to-offline) ecosystem. That battle mainly focuses on the integration of ride hailing services, delivery services, online purchases, mobile payments, video games, videos, and other features into monolithic "super apps" -- like Tencent's (TCEHY -0.23%) WeChat and Baidu's mobile search app.

The goal is to keep users corralled within their apps and dependent on their ecosystems. To counter the growth of WeChat, which had 889 million monthly active users last quarter, Baidu is investing a lot of money into its O2O services. That's why its non-GAAP operating profit dropped nearly 10% in 2016, and why its net earnings declined 17% in 2016. That trend is expected to continue, with earnings growth expected to remain flat this year before rebounding 38% next year as spending eases and its O2O initiatives pay off.

BIDU Operating Margin (TTM) Chart

Source: YCharts

So it is the right time to buy Baidu?

Baidu doesn't look cheap at 38 times earnings, but that's still lower than the industry average of 50 for internet information providers. Moreover, investors should note that its earnings slowdown should be temporary, and will likely pick up again after it clears its near-term headwinds. Therefore, its forward P/E of 23 looks reasonable relative to its projected growth rates.

I personally own shares of Baidu, because I believe that fears about its peaking growth aren't justified. China's internet penetration rate is still at 52%, compared to 89% for the U.S. Hundreds of millions of mobile users still haven't upgraded to 4G networks yet. That's a huge untapped market for both Baidu and Tencent.

Tencent leads the social networking and gaming market, but Baidu dominates search and maps -- two markets with very wide moats. The market doesn't love Baidu, which dropped 8% over the past 12 months, but I think that investors who buy this dip could be well-rewarded over the next few years.