After years of collecting photos and personal data from its billion-plus members, Facebook Inc. Tuesday unveiled a search tool that sifts through people's profiles—and pushes the social network deeper into Google Inc.'s home turf.

The two companies are vying to become the primary gateway to the Internet. Google has long served as a destination to find websites and information; Facebook, to share gossip and photos with friends. But those distinctions are increasingly blurring, and billions in advertising dollars are at stake.

...