Chinese search engine Baidu has just wrapped up negotiations with major Western music labels and signed distribution deals that will effectively give Baidu users legitimate access to free music.

The deal is between Baidu and One-Stop China, a venture that represents Universal Music, Warner Music and Sony Music in China. Baidu gets a license to the entire catalogues of each label in exchange for royalties paid on each song that is played or downloaded, CNET reports.

Baidu will be offering these songs through its music service Ting, which doesn’t cost users a dime but means advertising is part of the package.

Companies like Google and Amazon have forged ahead with cloud music products while forgoing the music licensing that makes such packages attractive, and it’s a surprise to see Baidu beat them to it — a company that’s got a reputation for music copyright infringement.