Apple has acquired Shazam, the company announced today. The deal was first reported by TechCrunch last week and is worth $400 million, according to Recode. Shazam lets users identify songs, movies, TV shows, and commercials from short audio clips.

“We are thrilled that Shazam and its talented team will be joining Apple,” an Apple spokesperson told The Verge. "Apple Music and Shazam are a natural fit, sharing a passion for music discovery and delivering great music experiences to our users. We have exciting plans in store, and we look forward to combining with Shazam upon approval of today’s agreement."

“We are excited to announce that Shazam has entered into an agreement to become part of Apple,” Shazam said in a statement to The Verge. “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 acquisition cost is far from the $1 billion Shazam was valued at during its last funding round, but the company has had a hard time finding a viable business model, pulling in only $54 million in revenue in 2016.

Despite its low revenues, Shazam can help Apple in a number of ways. The most obvious would be with Apple Music, where Shazam’s team could help improve the experience of the service. If Apple decides to shut down the app, it would also take away referrals to Spotify, which together with Apple Music gets 1 million clicks per day from Shazam. Also, Shazam’s music and sound recognition, which is already integrated with Siri, could gain a deeper integration with iOS, much like Google has done with its song recognition feature on the Pixel.

Apple is also likely interested in Shazam’s augmented reality technology, which could help improve its own offerings. Shazam has visual recognition tech and an AR platform for brands that could help in the development of a Google Lens-type feature and improve its ARKit efforts.

The deal should close in the coming weeks pending regulatory approval.