A lightweight Python SEO audit engine that returns Pydantic structured output.
Project description
SEOExtract
AI-Powered SEO Audit Engine for Python
Analyze websites using Large Language Models and receive structured, page-level SEO audits with actionable recommendations.
Built for developers, AI agents, automation pipelines, dashboards, and SEO applications.
Features
- AI-powered SEO auditing
- Website crawler
- Multi-page website analysis
- Technical SEO analysis
- Content quality evaluation
- Heading structure analysis
- Meta title & description analysis
- Internal & external link analysis
- Image SEO analysis
- Schema.org detection
- Open Graph detection
- Canonical tag detection
- Viewport detection
- Structured JSON output
- Pydantic models
- Page-level scoring
- Site-level scoring
- AI-generated recommendations
Installation
pip install seoextract
or
pip install -e .
Requirements
- Python 3.10+
- OpenAI API Key
API Key Setup
Create a .env file.
OPENAI_API_KEY=your_api_key
SEOExtract automatically loads the API key.
Quick Start
from seoextract import SEOExtract
result = SEOExtract.audit(
"https://example.com"
)
print(result.site_score)
print(result.grade)
Output
SEOExtract returns an AuditResult.
AuditResult
│
├── url
├── audit_date
├── pages_crawled
├── site_score
├── grade
├── total_issues
├── critical_count
├── warning_count
├── info_count
├── pages
└── page_audits
Each page audit contains:
Page Audit
│
├── page_url
├── page_score
├── grade
├── summary
├── strengths
├── priority_actions
└── issues
Example
from seoextract import SEOExtract
result = SEOExtract.audit("https://example.com")
print(result.site_score)
for page in result.page_audits:
print(page["page_url"])
print(page["page_score"])
print(page["summary"])
What SEOExtract Evaluates
Content
- Content quality
- Search intent alignment
- Readability
- Content depth
- Value proposition
Metadata
- Page title
- Meta description
- Open Graph metadata
Headings
- Heading hierarchy
- Heading clarity
- Heading relevance
Images
- Missing ALT text
- Image relevance
- Image optimization suggestions
Links
- Internal linking
- External linking
- Anchor text quality
Technical SEO
- Canonical tags
- Viewport meta tag
- Robots meta tag
- Schema markup
- Mobile readiness
- Overall technical quality
Overall
- Page SEO score
- Overall grade
- AI-generated recommendations
- Priority fixes
Example Result
AuditResult(
site_score=92.5,
grade="A",
pages_crawled=8,
total_issues=17
)
Project Structure
seoextract/
│
├── __init__.py
├── auditor.py
├── crawler.py
├── parser.py
├── prompts.py
├── llm.py
├── models.py
├── utils.py
└── reports/
Designed For
SEOExtract is ideal for:
- AI SEO Agents
- SEO automation
- FastAPI applications
- LangGraph workflows
- LangChain applications
- Streamlit dashboards
- CI/CD quality checks
- Report generators
- AI assistants
- Python automation
Dependencies
- beautifulsoup4
- lxml
- requests
- pydantic
- python-dotenv
- langchain-openai
Roadmap
- PDF reports
- Excel reports
- JSON export
- Custom LLM providers
- Local LLM support
- Batch website auditing
- Audit comparison
- Plugin architecture
License
MIT License
Author
Britto K
GitHub: https://github.com/Britto1221
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seoextract-0.2.0.tar.gz.
File metadata
- Download URL: seoextract-0.2.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93a98903caa735f64e9aaa1a4a06e73d910079b97e0b6faf3712c7b666e04a87
|
|
| MD5 |
21498343f59b0db5b793288b18de8596
|
|
| BLAKE2b-256 |
af7707db39f45e1b0215e02f167e0247d949dec9d5a58576c98f60971180992c
|
File details
Details for the file seoextract-0.2.0-py3-none-any.whl.
File metadata
- Download URL: seoextract-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e67c7eacfbbf00572773fa8f3bca70898fe365d5ab67e931696b07124dc372b0
|
|
| MD5 |
a4c8ef56c8bd39976a5cef78ec99ec26
|
|
| BLAKE2b-256 |
c6a41d6ca1e2ecbd39fcde04a5cdd39db6d2f29dc91e2bbaa3f03d34ddd4ac4f
|