Facebook knows who your friends are. Google knows what you're interested in finding on the internet. Amazon knows what you've bought, and has a pretty good idea of what you might want to buy next.

If you were an advertiser, which company's data sounds most valuable to you? If you had a product you wanted to sell, which of those things would you most want to know?

In a digital economy where some of the internet's biggest companies and the country's richest people have built their fortunes on the ability to more precisely target ads, one company sits on a trove of data it has barely started to exploit. In internet advertising-speak, visitors to Amazon.com are further down the purchasing funnel than visitors to Google or Facebook. "The opportunity is huge," says Marcus Pratt, director of insights and technologies for Mediasmith, a San Francisco digital ad agency. "With rich data on its users, Amazon is uniquely positioned to match advertisers with shoppers."

In a recent note to investors, analysts at Baird Equity Research said they estimated Amazon would generate anywhere from $500 million to $1 billion in advertising revenue this year. Amazon won't break out those numbers, and the estimate doesn't put Amazon anywhere near the tens of billions Google makes from ads every year. But for a company whose main business isn't selling ads but selling stuff, a billion dollars is far from nothing. And Amazon is just getting started.

The company has kept its advertising ambitions mostly to itself until earlier this month when a high-ranking Amazon executive made a standing-room-only appearance at Advertising Week, Madison Avenue's biggest annual ad industry gathering. Amazon Vice President of Global Sales Lisa Utzschneider reportedly touted everything from display ads on ad-supported Kindles to the company's ad-targeting data based on clicks not just on Amazon.com but other popular Amazon-owned sites like Zappos, IMDB, and Diapers.com.

In an interview with Ad Age, Utzschneider described Amazon's ad business not so much as a money maker in itself but as a subsidy that would let the company push its retail prices lower: "If we think about Amazon in two worlds, one world is an Amazon with ads and lower prices. Another world is an Amazon with no ads and higher prices. Which one would we choose?"

But ads have the potential to do even more for Amazon's bottom line. The company's sites are viewed by more than 100 million different people in the U.S. every month, which ranks Amazon sixth behind just Google, Microsoft, Yahoo, Facebook, and AOL on the list of most-visited sites, according to comScore. The top five companies' web business models depend above all on advertising. Amazon's doesn't. But with traffic that ranks them up among the web's most valuable media properties, comScore analyst Andrew Lipsman says Amazon has no reason not to jump into the ad game.

"They've probably been more concerned with selling goods and rightly so," Lipsman says. "Now they're starting to take advantage of this opportunity that's right there in front of them."

One such opportunity is display ads on Amazon sites themselves. Lipsman describes such ads as the online equivalent of "endcaps," the sometimes elaborate displays at the ends of aisles at physical stores. As with physical endcaps that prompt you to buy that bag of chips or that thumb drive, digital endcaps would typically drive you to the Amazon product page where you can buy the advertised product. Ads for things Amazon doesn't sell, such as rental cars, are also starting to show up on the site.

Lipsman says comScore found that rates for Amazon display ads haven't yet reached the online average, suggesting the company is still figuring out its strategy. Some ad buyers say their clients aren't big fans of Amazon's display ads, since they say those ads can come with restrictions such as limits on where clicks on those ads lead and what data advertisers can track.

But those advertisers probably will find little to dislike about Amazon's less visible yet probably more powerful tool for aiming their ads at just-right targets anywhere on the internet. In online advertising jargon, Amazon has set up its own demand-side platform, or DSP, that the company has been pushing to ad agencies in recent months.

In essence, DSPs allow advertisers to bid on unused ad space on sites across the web. But they're not just bidding on the space. They're bidding on users who match a certain set of traits. In the case of an Amazon-powered DSP, to use a hypothetical example, let's say someone went to Amazon-owned Zappos and searched for basketball shoes, a search that Zappos saves in that person's browser in the form of a cookie. That same person then clicks over to ESPN.com. If ESPN's ads are wired to Amazon's DSP, the platform decodes the cookie and sees it has a person who's interested in buying basketball shoes on the hook. Nike puts in the highest bid to Amazon for the eyeballs of anyone who's searched Zappos for basketball shoes. Voilà: That person sees a Nike ad.

Utzschneider told Ad Age that Amazon shares two kinds of user data with advertisers: general categories that Amazon assigns to users based on their online behavior, such as "fashionista, gadget geek, mom or coffee enthusiast," as well as data on what a user has looked at on the site. There's nothing to suggest Amazon is sharing actual purchase data with advertisers.

"The Amazon Advertising Platform enables display advertisers to reach an active Amazon audience on the web and helps customers quickly find relevant information about products they may want to buy," Amazon said in a statement.

While DSPs aren't new, a DSP powered by Amazon's rich data changes the competitive landscape. "The winner in the media game is the one who can best identify a user and match that user up with an affiliation that an advertiser cares about," says Jay Habegger, CEO of OwnerIQ, a Boston-area ad firm. Habegger calls Amazon the "800-pound gorilla" in the room that includes his own company, which has developed a DSP that aggregates user data from other online retailers to create an ad network that competes with Amazon's, among others. But he's not worried. Habegger believes that while Amazon's data hits a certain "sweet spot," it's not the only retail data with value.

"I don't worry much about Amazon per se eating my lunch," he says. "We think this pie is going to get enormous."

Still, Amazon seems uniquely positioned to alter the terms of the online advertising business depending on how aggressively it pursues its opportunity. If advertisers still can't know what someone's bought on Amazon, they may soon find the next most valuable thing to know is what they've sought.

"I think Amazon is just starting to scale the use of shopper data in its advertiser offerings," says Mediasmith's Pratt. "There is definitely room for growth."