Google made a deal with Reddit which will allow the search engine maker to train its AI models on Reddit’s vast catalog of user-generated content, the two companies announced. Under the agreement, Google will get access to Reddit’s data API, which will help the company “better understand” content from the site.

The deal also gives Google a valuable source of content it can use to train its AI models. “Google will now have efficient and structured access to more up-to-date information, as well as improved alerts that will help us better understand Reddit content and display, educate and otherwise use it in the most accurate and relevant ways “said the company in declaration.

Access to Reddit’s data became a hot-button issue last year when the company announced it would start charging developers to use its API. The changes resulted in many third parties being shut down, and thousands of subreddits temporarily going “dark”. Reddit justified the changes in part by saying that big AI companies are providing their data without paying. In a statement, Reddit noted that the new agreement with Google “does not change Reddit’s data API terms or developer terms” and that “access to the API remains free for non-commercial use.”

The deal comes as Reddit is expected to go public in the coming weeks. Neither Google nor Reddit disclosed the terms of their agreement, but Bloomberg last week, Reddit struck a licensing deal with a “major AI company” valued at “about $60 million” per year. This amount was also confirmed by , which first reported Google’s involvement.