Competitor Analysis
Home/Tools/Keyword Research & SERP/Competitor Analysis
⚲ Keyword Research & SERP

SERP & Competitor Content Analysis

v1.0 documentation

Fetches and analyzes multiple competitor pages using NLP to find content gaps, common terms, entity coverage, and semantic similarity.

URL inputFile inputXLSX export
competitor_analysis.py320 lines6 paramsPython 3.8+
Quick start
1

Install

terminal
pip install -r requirements.txt
2

Run

terminal
python competitor_analysis.py --urls https://comp1.com https://comp2.com --target-keyword "cloud hosting"
terminal
python competitor_analysis.py --files comp1.html comp2.html comp3.html --target-keyword "crm software" --my-content my_page.html
terminal
python competitor_analysis.py --urls https://a.com https://b.com --target-keyword "seo tools" --output report.xlsx
3

Export

Add --output report.xlsx to save results as a spreadsheet.

Parameters
FlagDescription
--urlsCompetitor URLs to fetch. Multiple values allowed
--filesLocal HTML files for competitor pages. Multiple values allowed
--my-contentMy content
--target-keyword requiredPrimary keyword
--outputSave report as XLSX
--skip-similarityEnable skip similarity mode (flag, no value needed)
help
python competitor_analysis.py --help
Use cases
Keyword strategy
Client research
Competitor intelligence

Run before creating content. Use the output to plan which terms to target, group into clusters, and prioritize by difficulty. Export to XLSX and share with your content team.

Deliver keyword research as a paid service. Run the tool on a client's niche, export results, and present clusters as a content roadmap. Charge $100-300 per research package.

Analyze what keywords competitors rank for that you're missing. Feed the output into your content calendar to close gaps systematically.

Dependencies

Requires: beautifulsoup4, numpy, pandas, requests, scikit-learn, sentence-transformers, spacy. All included in requirements.txt.

Get all 154 Python SEO tools — $49

One-time payment. Lifetime access. No monthly fees.
Learn 25 tools and get 25% back. Earn from client work and get 50% back.

Get the full toolkit

AAIO Inc — aaioinc.com/tools/competitor_analysis/