A simple yet powerful search tool that leverages Google's Gemini AI with Search Grounding to provide comprehensive, up-to-date information on any topic. Built with the latest Google Gen AI SDK (google-genai
).
- Uses Gemini 2.0 Flash model for fast, accurate responses
- Integrates Google Search grounding for real-time information
- Generates conversational, easy-to-understand research results
- Automatically saves results with unique identifiers
- Includes Manila time (GMT+8) timestamps
- Verifies search usage and grounding
- Python 3.9 or higher
- Google AI Studio API key (Get it here)
- Clone the repository:
git clone https://github.com/llegomark/google-search-grounding.git
cd google-search-grounding
- Install the required packages:
pip install google-genai python-dotenv pytz
- Create a
.env
file in the project root and add your API key:
GOOGLE_API_KEY=your_api_key_here
Run the script:
python research_tool.py
Simply enter any topic you want to research, and the tool will:
- Generate comprehensive research using Gemini AI
- Ground the information using Google Search
- Save results automatically to
research_results/
directory - Display results in the console