The Gemini API has a new feature where you can ground results with Google search which reduces hallucinations and provides references to content.
Here's the important description of the feature "the model returns grounding sources (in-line supporting links) and Search Suggestions that point users to the search results corresponding to the grounded response."