Multi-Agent SEO Blog Generator is an AI-powered tool that automates the process of researching, generating, and optimizing SEO-friendly blog content. It fetches trending topics, creates structured blog content, optimizes for search engines, and saves the output in multiple formats including Markdown, TXT, HTML, and PDF.
π Multi-Agent-SEO-Blog-Generator
βββ π blog
β βββ π trending_hr-related_topic
β βββ π trending_hr-related_topic.html
β βββ π trending_hr-related_topic.md
β βββ π trending_hr-related_topic.pdf
β βββ π trending_hr-related_topic.txt
βββ π img
β βββ π output.png
βββ π main.py # Entry point for the blog generation process
βββ π research.py # Fetches trending news topics
βββ π utils.py # Utility functions for blog creation
βββ π generate.py # AI-based text generation (uses Gemini API)
βββ π saveblogs.py # Handles file saving operations (MD, TXT, HTML, PDF)
βββ π APIkeys.py # Manages API keys securely (Gemini & SerpAPI)
βββ π README.md # Documentation
βββ π requirements.txt # Dependencies
- User Input: Enter the blog topic.
- Research: Fetches relevant news from Google News and Bing News using SerpAPI.
- Outline Creation: Generates a structured outline based on research.
- Content Generation: Uses Gemini AI to generate a full-length blog post.
- SEO Optimization: Enhances content with SEO best practices and keyword insertion.
- Review: Checks for grammar, clarity, and coherence.
- Save & Export: Saves the blog in Markdown, TXT, HTML, and PDF formats.
- Google Gemini API - AI-powered content generation
- SerpAPI (Bing News) - Fetching trending news topics
- Feedparser - Parsing Google News RSS feeds
- FPDF - Generating PDF files
- Markdown - Converting content to HTML
- OS & Time Libraries - File handling and execution control
git clone https://github.com/raghul-tech/Multi-Agent-SEO-Blog-Generator
cd Multi-Agent-SEO-Blog-Generator
- Python 3.7+
- It is recommended to use a virtual environment:
python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r requirements.txt
- Sign up at Google AI and create an account.
- Navigate to the Gemini AI section and click Get API Key at the top.
- Copy the key and add it to
APIkeys.py
:api_keys = { "GEMINI_API_KEY": "your-gemini-api-key-here", "SERPAPI_KEY": "your-serpapi-key-here" }
- Register at SerpAPI and create an account.
- Search for Bing News API to get your key .
- Copy the key and add it to
APIkeys.py
.
Execute the following command:
python main.py
Enter the blog topic when prompted, and the generated blog will be saved in the blogs/
directory.
The generated blog is saved in:
- Markdown (.md)
- Plain text (.txt)
- HTML (.html)
- PDF (.pdf)
This project is licensed under the MIT License.