Trying to send a news article or a restaurant suggestion to a friend with an iPhone? Google and Apple have teamed up to help. Google announced on Monday it will have a Search extension in Apple's iMessages app, which will allow iPhone or iPad users to search the web and seamlessly share their results within their text conversations. All iPhone and iPad users need is the latest version of the Google Search app on their devices.

"Whether you're messaging a friend about dinner plans or reading an article on sloths, sometimes you want to search for more information without having to drop what you're doing," said Google in a press release on Monday. "Today, we're introducing three new features to the Google app on iPhone and iPad to help you find what you need and get things done, without disrupting your flow."

In the past, the easiest way for iPhone and iPad users to share internet search results was by tapping the "Share" icon and then the iMessage icon on the search browser.

With the Google extension, users will be able to tap the Apps drawer on the bottom of iMessages and then the Google icon to start searching without leaving iMessages. To share a search result, the sender needs to tap a "Share" button that will add the item directly into an iMessage conversation as card.

In addition, Google will now be able to take over related search results in any browser on iOS, including Apple's Safari web browser.

Google's latest Search feature marks the latest chapter in an intertwined and increasingly complex relationship between Google and Apple. In the hardware space, from smartphones (Google Pixel versus the Apple iPhone) to smart home speakers (Google Home versus Apple HomePod), the two Silicon Valley giants are direct competitors.

However, both companies also rely on each other's services. In fiscal year 2017, Google paid Apple $3 billion to remain the lead search engine for iOS devices, according to Bernstein analyst A.M. Sacconaghi in a note to investors. Apple's devices contribute about 50 percent to Google's mobile search revenue, according to Sacconaghi.

Last month, Apple said in its iOS security guide that it uses Google and Amazon's cloud servers to store its customers' iCloud data, CNBC reported.