A Python tool that analyzes Google search results and generates optimized title tags using AI (GPT-4 and/or Claude).
- Scrapes Google search results for your target keyword
- Analyzes common terms and patterns in top-ranking titles
- Generates optimized title suggestions using GPT-4 and/or Claude
- Handles Google's bot detection gracefully with manual captcha solving
- Persists cookies to minimize captcha challenges
- Filters out non-relevant titles (ads, widgets, etc.)
- Customizable AI temperature for title generation
- Modifiable AI instructions for custom title requirements
- Works with either or both AI services (GPT-4, Claude)
- Python 3.8+
- Chrome browser installed
- At least one API key (OpenAI or Anthropic)
- Required Python packages (see requirements.txt)
- Clone the repository:
git clone https://github.com/jefflouella/ai-title-analyzer.git
cd ai-title-analyzer- Install required packages:
pip install -r requirements.txt- Create a
.envfile in the project root with your API key(s):
OPENAI_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here
Note: You only need to provide one API key, but can use both for comparison.
- Run the script:
python app.py-
Enter your target keyword when prompted.
-
If a captcha appears:
- A Chrome window will open automatically
- Solve the captcha manually
- Press Enter in the terminal to continue
- The cookies will be saved for future sessions to minimize captcha challenges
-
The tool will:
- Scrape and analyze Google search results
- Filter out non-relevant titles
- Show common terms and patterns
- Generate optimized title suggestions using available AI services
- Adjust the creativity level of AI-generated titles
- Range: 0.0 (more focused) to 1.0 (more creative)
- Default: 0.4
- Customize how titles are generated
- Modify the instructions in the UI
- Reset to default if needed
- Cookies are saved in
browser_data/google_cookies.json - Helps reduce captcha frequency
- Automatically managed by the tool
- If you see a captcha, a Chrome window will open automatically
- Solve the captcha manually
- Cookies will be saved to reduce future captchas
- Delete
browser_data/google_cookies.jsonif you want to reset cookies
- Check your internet connection
- Verify API keys are correct in
.env - Try solving a new captcha
- Ensure Chrome browser is installed
-
The tool respects Google's terms of service by:
- Using human verification for captchas
- Implementing reasonable delays between requests
- Not making excessive automated queries
-
For best results:
- Use specific, focused keywords
- Solve captchas when prompted
- Allow cookie persistence
- Adjust AI temperature based on needs
MIT License - See LICENSE file for details
