Yahoo disclosed the details of a new search deal it's formed with Google after releasing its third-quarter earnings results today. Under the terms of a new arrangement effective October 1st and lasting until the end of 2018, Google will provide Yahoo with search ads, algorithmic search, and image search services for both desktop and mobile. And according to a regulatory filing, Yahoo will also get to decide which search queries to send to Google and will not have to meet a minimum requirement of queries.

"In October, the Company reached an agreement with Google that provides Yahoo with additional flexibility to choose among suppliers of search results and ads," Yahoo wrote in its earnings release today. "Google’s offerings complement the search services provided by Microsoft, which remains a strong partner, as well as Yahoo’s own search technologies and ad products."

Yahoo now has search deals with its two bigger competitors

Yahoo is trying to squeeze more money out of its search engine, but lacks the technology to better manage queries and more adequately serve ads. By partnering with Google, the most dominant search engine on the planet, it can get a slice of the revenue from a company with more efficient and lucrative search and ad infrastructure. According to comScore, Yahoo's search network only notched 12.7 percent marketshare in US desktop searches in August, while Google has nearly 64 percent.

Yahoo's similar deal with Microsoft is in no way threatened by the Google pact, Yahoo stated. In 2010, Yahoo entered into a 10-year deal with Microsoft to help power its search engine in exchange for giving the Windows maker a single-digit cut of search ad revenue. Yahoo needed Microsoft's technology, while Microsoft needed Yahoo's reach that, when combined with Bing, would make help its own products compete better with Google's. The two companies loosened their arrangement back in April, adding in a termination clause that would let either company walk away from the deal with four months' notice.