When I tried to use Google Search Grounding with the free tier API based on Gemini’s instructions, I encountered a 429 error.
According to information circulating widely enough to be picked up by standard consumer AI, it is easy to get the false impression that Google Search Grounding can be used for free with the Google API. In reality, it was only free prior to gemini-3, and what’s more, versions prior to gemini-3 are actually no longer supported for use. This is extremely confusing and frustrating for users. Please rectify this situation.
For reference, below is the response that Gemini provided: “Based on the challenges and requirements of your current physical/manual process (full automation, viewing on the go, accuracy equal to or higher than ChatGPT Search, and a $0 budget), I have compiled the System Requirements Specification and System Architecture Design.
While staying within the $0 budget constraint, this design replaces all the manual steps—prompt back-and-forth, data formatting, manual pasting into programs, and execution—with code and cloud infrastructure.
System Requirements Specification
1. Overview
A system that fully automates the user’s entire process—from “market information gathering (technical, fundamental, and outlook)” to “data formatting,” “running custom analysis programs,” “scenario and chart output,” and “reviewing results”—allowing it to be monitored remotely from a smartphone or other device.
2. Functional Requirements
| Item | Requirement Details | Implementation Method |
|---|---|---|
| ① Scheduled Auto-Execution | Start the process without human intervention at a specified time every day (e.g., after the stock market closes). | Use a cloud-based scheduler feature. |
| ② Market Info Gathering & Analysis | Comprehensively gather and analyze information such as technicals, fundamentals, and outlooks with accuracy equal to or better than the current ChatGPT Search feature. | Use the latest LLM API with web search grounding capabilities. |
| ③ Automated Data Formatting | Automatically convert vast amounts of collected text into a Python-compatible data format directly readable by custom analysis programs (eliminating manual text editor editing). | Implement LLM Structured Outputs (JSON, etc.) or parsing logic. |
| ④ Custom Program Execution | Automatically feed formatted data into the user’s two custom analysis programs and execute them. | Integrate and execute as modules from within the Python script. |
| ⑤ Result Output & Notification | Automatically generate analysis results: “scenario candidate text” and “Matplotlib chart images (PNG).” | Output files directly within the script. |
| ⑥ Remote Viewing on the Go | View the latest text and chart images from a smartphone or PC while away from the desk. | Leverage automatic commits to a repository or free notification services. |
3. Non-Functional Requirements
- Budget: $0 (utilizing completely free tier infrastructure and APIs)
- Analysis Accuracy: Maintain a level equivalent to the current ChatGPT Search feature (leveraging Google Search Grounding).
- Maintainability: Reuse the core logic of existing Python analysis programs as-is, wrapping only the pre- and post-processing parts with automation scripts.
System Architecture Design
1. Architecture Diagram & Technology Selection
To satisfy both a $0 budget and full automation, the following free cloud environments and APIs are adopted:
[GitHub Actions (cron: daily schedule)]
│ (automatic trigger)
▼
[Python Runtime Environment (GitHub Actions Runner)]
├─ 1. Information Gathering: Google AI Studio (Gemini API + Search Grounding)
├─ 2. Data Formatting: Gemini API (Structure into Python format)
├─ 3. Run Analysis: User's custom analysis programs ① & ②
└─ 4. Save Output: Auto-commit to GitHub repository (result text & matplotlib images)
│
▼ (view via mobile browser/app)
[GitHub Repository (Private)]
Core Components and Roles
-
Execution Platform (Free): GitHub Actions
-
Provides scheduled execution (cron trigger) and a Python runtime environment for free. The monthly free allowance is more than enough to cover 1–2 runs per day.
-
Information Gathering & Formatting Engine (Free Tier): Google AI Studio (Gemini API)
-
The powerful “Google Search Grounding (real-time web search)” feature—comparable to or exceeding the current ChatGPT Search—can be used on the free tier (API key).
-
Replaces multiple prompt round-trips and manual text editor formatting with integration between Python scripts and the API (a few steps of programmatic processing).
-
Storage & Viewing Interface: GitHub Repository (Private)
-
Automatically commits (saves) the daily generated “scenario candidate text (Markdown, etc.)” and “Matplotlib chart images (
.png)” from GitHub Actions to a private repository. -
When out and about, simply open the repository in a smartphone browser or the official GitHub app to check the latest text and charts anytime.
2. Detailed Process Flow Design
- Scheduled Trigger
- The workflow is triggered automatically at a fixed time each day via the GitHub Actions
cronsetting.
- Information Gathering Phase (Step 1)
- The Python script calls the Gemini API. At this point, Google Search Grounding is enabled to automatically retrieve technical, fundamental, and outlook information through a single query or an optimized series of requests.
- Data Formatting Phase (Step 2)
- The raw data retrieved is passed back into the Gemini API with a prompt to automatically parse and transform it into “a format directly readable by the custom program, such as a Python dictionary or Pandas DataFrame.”
- Analysis Program Execution Phase (Step 3)
- Passes the formatted data to the user’s custom program ① (scenario candidate text output) and program ② (Matplotlib plotting), and executes them.
- Save & Push Artifacts (Step 4)
- Automatically commits and pushes the generated text files and images (
.png) to the GitHub repository using Git commands.
3. Next Steps
Based on this architecture design, we can proceed to write the actual Python code needed to build the system (the GitHub Actions configuration file .github/workflows/main.py and the automation script template).
I can adapt the script to match the interface and data structures (dictionaries, lists, CSVs, etc.) used by your current custom programs, so please let me know if you need further assistance with integrating the code.”
Here are the error codes:
When using web search with gemini3.1flash-lite:
Gemini API Call Failed:
429 RESOURCE_EXHAUSTED. {‘error’: {‘code’: 429, ‘message’: 'You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https//ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage [omitted]}}
When using web search with gemini2.5flash-lite:
Gemini API Call Failed:
404 NOT_FOUND. {‘error’: {‘code’: 404, ‘message’: 'This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use models/gemini-3.8-flash for the latest features and improvements. [omitted] ‘status’: ‘NOT_FOUND’}}