E-commerce is a massive and diverse part of the retail industry, but investors considering it often focus most of their attention on a few huge companies such as Amazon and Shopify. In doing that, they might be overlooking some smaller but strong niche players that could be excellent additions to their portfolios.

Here are three examples of quality e-commerce stocks with market caps under $50 billion that could provide you with great long-term returns.

Etsy: The crafts and specialty products specialist

Online marketplace Etsy (ETSY -0.86%) features homemade crafts, craft supplies, and other specialty products that aren't typically mass-produced. Its top product categories include homeware and furnishings, jewelry and personal accessories, masks, craft supplies, and apparel.

In its first quarter, Etsy's revenue rose 141% from the prior-year period to $551 million, its fourth consecutive quarter of triple-digit-percentage revenue growth. The number of active sellers on its platform rose 70% year over year to 4.5 million, as a growing number of people are using the site to help them develop side hustles or start their own businesses.

Person wearing a mask receives packages at the front door from a delivery person.

Image source: Getty Images

Etsy recently announced an agreement to acquire Depop, a social marketplace specializing in unique fashion, for $1.6 billion in cash. Nearly 90% of Depop's users are Gen Z-ers, so the deal will help Etsy make inroads with a younger demographic. 

The business is already profitable -- it posted net income of $143 million in the first quarter -- and it's positioned to continue growing as a leading platform for unique and crafted goods.

Farfetch: The online marketplace for luxury goods

High-dollar brands such as Rolex and Gucci are naturally selective about the platforms they sell on because they are deeply invested in protecting their image. Farfetch (FTCH -1.02%), an online marketplace that specializes in luxury fashion goods, gives these brands a unique way to reach buyers.

The company sells more than 1,300 brands to customers in 190 countries, giving it a wide presence within the $92 billion global luxury fashion market. Its revenues are expected to rise by 33% to $2.2 billion in 2021, but it isn't yet profitable -- it posted EBITDA losses of $19 million in Q1. Farfetch's growth rate hasn't been as impressive as some of its e-commerce peers, but its strong position in luxury could help it produce steady growth as consumers continue to gravitate toward online shopping.

In March, Farfetch launched on Tmall, the most popular e-commerce site in China. According to a late 2020 report from analysts at Bain & Co., China is on track to become the world's largest luxury market by 2025, so establishing a presence on Tmall could notably boost Farfetch's long-term growth prospects.

Pinterest: Combining social media and e-commerce

Pinterest (PINS -1.55%) is a visual search engine through which users can browse linked pictures of fashion, design, recipes, DIY projects, and more. The company has built up a base of 478 million monthly active users -- and only about 20% of them are in the United States.

The combination of visual inspiration and a way to act on it (by buying something) is a natural pairing, and Pinterest has steadily been increasing the tools it makes available for both buyers and sellers. Users can find products by either uploading a picture of something and allowing Pinterest to recommend similar items, or ask Pinterest to identify items within a Pin with visual search. Sellers can also advertise to buyers, promoting items related to what those users have searched for.

Pinterest's e-commerce segment is picking up steam. In the first quarter, product searches were up 20-fold year over year, and engagement with products on Pinterest grew 200%. The company's overall revenue for the quarter was $485 million, a 78% increase from the prior year, and the business is coming close to profitability with $84 million in EBITDA, but a bottom-line loss of $22 million.

Pinterest is in the early stages of growing its e-commerce business, but its strong brand position as "the" visual search engine could turn it into a larger player in e-commerce over time.

Here's the bottom line

Consumer spending is a cornerstone of the global economy, which is why e-commerce is still such a big opportunity, even after years of rapid growth. While companies like Amazon, MercadoLibre, and Alibaba may dominate generally, there is still a lot of potential upside to be had for the smaller niche players that hold sway over the market's sub-categories.