A professional Python tool for comprehensive SEO analysis of web pages
Features โข Installation โข Usage โข Examples โข Roadmap
SEO Analyzer is a powerful command-line tool that performs comprehensive SEO audits on any website. Built with Python, it analyzes everything from basic meta tags to advanced technical SEO factors, providing actionable insights to improve your website's search engine ranking.
Whether you're an SEO specialist, web developer, or content creator, this tool helps you:
- โ Identify SEO issues instantly
- โ Get a detailed SEO score (0-100)
- โ Generate professional HTML reports
- โ Analyze multiple websites in batch
- โ Track SEO metrics over time
| Category | What We Check |
|---|---|
| Basic SEO | Title tags, Meta descriptions, Keyword optimization |
| Headings | H1-H6 structure, hierarchy validation |
| Links | Internal/External links, Nofollow detection, Broken links |
| Images | Alt text coverage, Missing attributes |
| Content | Word count, Paragraph analysis, Content quality |
- โ HTTPS - Secure connection verification
- โ Canonical URLs - Duplicate content prevention
- โ Viewport - Mobile-friendliness check
- โ Language - HTML lang attribute validation
- โ Favicon - Brand presence check
- โ Robots Meta - Indexability verification
- โ Schema.org - Structured data detection
- โก Load Time - Page speed measurement
- โก TTFB - Time to First Byte analysis
- ๐ HSTS - HTTP Strict Transport Security
- ๐ CSP - Content Security Policy
- ๐ X-Frame-Options - Clickjacking protection
- ๐ Open Graph - Facebook/LinkedIn optimization
- ๐ฆ Twitter Cards - Twitter sharing optimization
- ๐ Console - Beautiful formatted text with emojis
- ๐ JSON - Machine-readable for automation
- ๐ HTML - Professional visual reports
- ๐ฆ Batch Analysis - Analyze multiple URLs at once
- ๐พ Auto-Save - Automatic report saving with timestamps
- ๐ Summary Reports - Comparative analysis across sites
- ๐ฏ SEO Score - Overall score with color-coded indicators
# Install uv if you don't have it
# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Clone the repository
git clone https://github.com/pouriya-py/seo-analyzer.git
cd seo-analyzer
# Install dependencies
uv sync# Clone the repository
git clone https://github.com/pouriya-py/seo-analyzer.git
cd seo-analyzer
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Linux/macOS
source venv/bin/activate
# Windows
venv\Scripts\activate
# Install dependencies
pip install -e .# Analyze a single URL (console output)
uv run seo-analyze https://example.com
# Generate JSON output
uv run seo-analyze https://example.com --json
# Generate HTML report
uv run seo-analyze https://example.com --html
# Save HTML report with custom filename
uv run seo-analyze https://example.com --html -o my_report.html# Analyze multiple URLs from command line
uv run seo-analyze https://example.com https://google.com https://github.com -o reports/
# Analyze URLs from a text file
uv run seo-analyze --file urls.txt -o reports/ --html
# Generate both JSON and HTML reports
uv run seo-analyze --file urls.txt -o reports/ --htmlCreate a file named urls.txt:
# My websites to analyze
https://example.com
https://google.com
https://github.com
https://en.wikipedia.org/wiki/Python_(programming_language)Then run:
uv run seo-analyze --file urls.txt -o reports/ --html======================================================================
๐ SEO Report for: https://example.com
======================================================================
๐ก SEO SCORE: 63/100
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ BASIC SEO
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Title: Example Domain
Title Length: 14 chars โ ๏ธ
Meta Description: โ Missing
๐ HEADINGS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
H1: 1 | H2: 0 | H3: 0
๐ LINKS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total: 1 | Internal: 0 | External: 1 | Nofollow: 0
๐ IMAGES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total: 0 | With Alt: 0 โ
| Without Alt: 0 โ
๐ CONTENT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Word Count: 25
Paragraphs: 1
๐ TECHNICAL
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HTTPS: โ
Yes
Page Size: 0.55 KB โ
Load Time: 0.45s | TTFB: 0.12s
Viewport: โ
Yes
Canonical: โ No
Language: en
Favicon: โ
Yes
Indexable: โ
Yes
๐ SECURITY
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HSTS: โ
Yes
CSP: โ No
X-Frame-Options: โ
Yes
๐ SOCIAL MEDIA
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Open Graph: โ No
Twitter Card: โ No
๐ STRUCTURED DATA
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ No Schema.org markup found
๐ SUMMARY
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Issues (1):
โข Missing meta description
โ ๏ธ Warnings (4):
โข Title is too short (14 chars, recommended: 30-60)
โข Missing Open Graph tags (for social media)
โข Missing Twitter Card tags
โข No Schema.org markup found
โ
Passed (5):
โข H1 tag structure is correct
โข Viewport meta tag is set (mobile-friendly)
โข Language attribute is set (en)
โข Favicon is set
โข Page is indexable (no robots meta restrictions)
======================================================================
The HTML report provides a beautiful, responsive visualization with:
- ๐จ Modern gradient design
- ๐ Visual score indicator with color coding
- ๐ฑ Mobile-friendly layout
- ๐ Detailed breakdown of all metrics
- ๐ก Actionable recommendations
Test the tool with these sample URLs:
# Simple test site
uv run seo-analyze https://example.com
# E-commerce sandbox
uv run seo-analyze https://books.toscrape.com/
# Large website
uv run seo-analyze https://en.wikipedia.org/wiki/Python_(programming_language)# Install with dev dependencies
uv sync --dev
# Format code with Black
uv run black src/
# Check code with Ruff
uv run ruff check src/
# Run tests (when available)
uv run pytestseo-analyzer/
โโโ src/
โ โโโ seo_analyzer/
โ โโโ __init__.py # Package initialization
โ โโโ analyzer.py # Core SEO analysis logic
โ โโโ cli.py # Command-line interface
โ โโโ report_generator.py # HTML report generation
โโโ tests/ # Test suite (future)
โโโ reports/ # Generated reports (gitignored)
โโโ pyproject.toml # Project configuration
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ .gitignore # Git ignore rules
The SEO score (0-100) is calculated based on:
| Factor | Points | Description |
|---|---|---|
| Title Tag | 15 | Presence and optimal length (30-60 chars) |
| Meta Description | 15 | Presence and optimal length (120-160 chars) |
| H1 Tag | 10 | Single H1 tag present |
| HTTPS | 10 | Secure connection |
| Viewport | 10 | Mobile-friendly |
| Images Alt | 10 | All images have alt text |
| Canonical | 5 | Canonical URL set |
| Language | 5 | HTML lang attribute |
| Open Graph | 5 | Social media tags |
| Schema.org | 5 | Structured data |
| Indexable | 10 | Not blocked by robots |
Score Interpretation:
- ๐ข 80-100: Excellent - Well optimized
- ๐ก 60-79: Good - Minor improvements needed
- ๐ 40-59: Needs Work - Several issues found
- ๐ด 0-39: Poor - Critical SEO problems
- Basic SEO analysis
- Technical SEO checks
- HTML report generation
- Batch analysis
- JSON output
- JavaScript rendering with Playwright
- Core Web Vitals integration (LCP, INP, CLS)
- Sitemap.xml analysis
- Robots.txt validation
- Internal linking structure analysis
- Content quality analysis with NLP
- Keyword density analysis
- Readability scoring
- Competitor comparison
- Google Search Console API integration
- Web dashboard with FastAPI
- Automated monitoring & alerts
- Historical trend analysis
- Multi-user support
- API for SaaS integration
Contributions are what make the open source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Pouriya Bavinejad
- ๐ง Email: pouriya.pouriya@gmail.com
- ๐ผ LinkedIn: pouriya-bavinejad
- ๐ GitHub: @pouriya-py
- BeautifulSoup - HTML parsing library
- Requests - HTTP library for Python
- uv - Fast Python package installer
- Black - Python code formatter
- Ruff - Fast Python linter
Give a โญ๏ธ if this project helped you!
Built with โค๏ธ by Pouriya Bavinejad
Made for the SEO community

