Wall Street does not have high hopes for advertising companies. For businesses that serve niche audiences -- like Snap -- investors fear ad spending will continue falling during the economic downturn as business spending tightens. With Pinterest's (PINS -1.55%) niche focus on creativity and inspiration, investors believed Pinterest would face similar struggles.

However, that was not the case. Pinterest's quarter was strong, highlighted by robust advertising demand on its platform around the world. Shares surged nearly 20% after the company reported earnings on Aug. 1. Did investors miss the boat with this pop, or is there still a chance to see impressive returns over the long term?

International success took the spotlight

Pinterest's social media platform -- where users can go to find creative ideas and act on them with purchases -- saw healthy results worldwide in the second quarter. However, its international (all regions excluding Europe, the U.S., and Canada) performance was the primary highlight. Its average revenue per user (ARPU) soared 80% year over year for international users to $0.10. Additionally, monthly active users (MAUs) declined only 3% year over year, better than Europe's drop of 4% and the U.S. and Canada's decline of 8% over the same period.

International adoption is where Pinterest could explode higher from here. This cohort makes up over half of the company's total MAUs, yet Pinterest's monetization of this group is still in its infancy. This execution helped international revenue soar 71% during the quarter, pushing the company's total top line up 9% over the same period to $666 million.

That's not to say the rest of the business did poorly, however. ARPU in the U.S. and Canada, Pinterest's most mature segment, still increased 20% year over year, and total MAUs were up two million since the end of 2021, bouncing back from the sequential declines it reported last year.

Pinterest's new CEO impresses

Investors also heard from Bill Ready -- the new CEO -- for the first time. Ready took the reins in late June to shift the company toward e-commerce. Ready has experience in commerce and payments, previously having served as the president of commerce for Alphabet's Google and as Chief Operating Officer at PayPal. With his experience, Ready said he is prepared to "help unlock the company's potential" through e-commerce, where users can easily transition from idea to inspiration to purchase.

Ready explicitly mentioned that he does not "subscribe to a growth-at-all-costs mentality." But given the heavy investments Pinterest has made to push into e-commerce, the company's profitability has fallen sharply. In the second quarter, non-GAAP net income fell 54% year over year to $77 million. With Ready at the wheel, patient investors should see profitability improve over the coming years. 

Until then, Pinterest has a rock-solid balance sheet with tons of cash generation. The company has more than $2.6 billion in cash and securities on the balance sheet with no debt. And over the past year, it has generated $645 million in free cash flow. Therefore, Pinterest should be able to sustain its reduced profitability for a while.

Is Pinterest a buy?

The investing thesis for Pinterest lies in the company's ARPU expansion, not its MAU count. The company is quite saturated in terms of MAUs with over 433 million, so the real opportunity comes in driving advertising spending higher. The second-quarter report showed the company is on the right track. 

That doesn't mean there aren't risks. Shifting from an inspiration platform to a commerce platform will be difficult, and Pinterest has had its struggles in the past. While Ready looks qualified enough to drive this shift, there's no guarantee his experience will lead to success for the company. 

That said, shares look cheap enough to make Pinterest a small position in your portfolio. The stock trades at 22 times free cash flow, which is far below the company' historical levels, aside from the past few months. With the company executing where it's needed, Pinterest looks like a great opportunity at these prices. Investors might want to add this company to their diversified portfolios as a small bet with appealing prospects.