Shazam confirmed the acquisition in a statement of its own, which seemed to open the possibility that the service would continue after the acquisition. "Shazam is one of the highest-rated apps in the world and loved by hundreds of millions of users and we can't imagine a better home for Shazam to enable us to continue innovating and delivering magic for our users," the statement said.

Apple did not share further details about the agreement. TechCrunch reported the deal is valued at $US400 million ($431 million), and that Snap and Spotify were also potential buyers.

Music is an important part of Apple's business, particularly as the company prepares to launch its HomePod smart speaker. The speaker was originally slated for release this year, but Apple said last month that it would delay its debut until early next year.

The acquisition is similar to one that Spotify, which leads Apple in the streaming music market, made in 2014 when it purchased a music intelligence firm called The Echo Nest. The Echo Nest creates technology that generates music recommendations. Some saw the Shazam acquisition as an answer to that deal.

"Shazam is Apple's answer to Spotify's Echo Nest," wrote music industry analyst Mark Mulligan in a blog post. "Now, Apple will be hoping that Shazam will provide it with the tools to start playing catch up. And that's not even mentioning the user acquisition potential Shazam could have when it switches to exclusively pointing to Apple Music. Game on."