Apple marketing chief Phil Schiller gave the opening keynote address at the Apple Worldwide Developer Conference in San Jose in June. (Justin Sullivan/Getty Images)

Apple on Monday confirmed it has bought Shazam, the music app that can identify a song by hearing just a snippet of it. The acquisition boosts Apple's position in the music world and advances its artificial intelligence efforts.

Shazam, launched in 1999, claims that at least 1 billion people have downloaded its app and used it to identify songs at least 30 billion times. Its service was one of the first AI products to be used by a broad audience. As Apple faces other tech giants in this increasingly competitive arena, analysts say Shazam could add significant value not only with its own service but also by making Apple's AI products — namely Siri — smarter about music.

“We are thrilled that Shazam and its talented team will be joining Apple. Since the launch of the App Store, Shazam has consistently ranked as one of the most popular apps for iOS,” Apple said in a statement Monday. “We have exciting plans in store, and we look forward to combining with Shazam upon approval of today’s agreement.”

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 $400 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 tech giant also continues to build out Apple Music, its subscription streaming music service. Apple Music has roughly 30 million subscribers and gives users access to an on-demand library of songs, plus recommendations and radio stations.

The purchase also dovetails with Apple's interest in augmented reality — blending the digital world with the real one. Shazam was a pioneer in audio identification. But it has also developed visual recognition technology, which lets smartphone users scan a logo or code to bring up digital content on their phones. Shazam has partnered with companies including Target and Disney on advertising campaigns that use this technology.

Analyst said this 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.”