Skip to content

coldxiangyu163/geo-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” GEO Analyzer

Python License CI

Check your website's visibility in AI search engines.

GEO (Generative Engine Optimization) is the next evolution of SEO β€” optimizing your content so AI search engines (ChatGPT, Perplexity, Gemini) can discover and cite your website.

GEO Analyzer scans your URL across multiple AI search engines and tells you:

  • βœ… Whether your site is mentioned in AI responses
  • πŸ”— Whether your site is cited with a URL
  • πŸ“ Where in the response you appear (early = better)
  • 🎯 Your overall visibility score (0-100, grade A-F)

Why GEO?

Traditional SEO is no longer enough. The way people search is fundamentally changing.

In 2025, 40%+ of information queries start in AI search engines like ChatGPT, Perplexity, and Gemini instead of Google. These AI engines don't return a list of 10 blue links β€” they synthesize a single answer from multiple sources, and your site may or may not be included.

Here's why traditional SEO falls short in the AI era:

Traditional SEO GEO (AI Search)
How it works Ranks pages by backlinks, keywords, authority AI reads & synthesizes content from many sources
What users see List of 10 links β€” user clicks through A single generated answer β€” user may never click
Citation Your URL appears as a search result Your URL may be cited inline β€” or not at all
Position Page 1 rank #1-#10 Early/middle/late mention in AI response
Optimization Meta tags, backlinks, keyword density Structured data, factual authority, clear claims

The problem: You can rank #1 on Google but be completely invisible to ChatGPT. GEO Analyzer tells you exactly where you stand in AI search β€” and how to improve.

Installation

GEO Analyzer is currently GitHub-first. PyPI publishing is paused for now.

Option 1 β€” pipx (recommended)

pipx install git+https://github.com/coldxiangyu163/geo-analyzer.git

This installs geo-analyzer as an isolated CLI and is the easiest way to use it globally.

Option 2 β€” pip from GitHub

pip install git+https://github.com/coldxiangyu163/geo-analyzer.git

Option 3 β€” clone and install locally

git clone https://github.com/coldxiangyu163/geo-analyzer.git
cd geo-analyzer
pip install -e .

Quick Start

# Install from GitHub
pipx install git+https://github.com/coldxiangyu163/geo-analyzer.git

# Set at least one API key
export OPENAI_API_KEY=sk-...
export PERPLEXITY_API_KEY=pplx-...
export GEMINI_API_KEY=AI...

# Scan your website
geo-analyzer scan https://yoursite.com -k "your product, your brand"

CLI Usage Examples

πŸ” scan β€” Check AI Visibility

$ geo-analyzer scan https://promptvault.dev -k "AI art prompts, prompt gallery"

Expected output:

πŸ” GEO Analysis: https://promptvault.dev    Grade: B  Score: 62/100

πŸ“ Keywords: AI art prompts, prompt gallery

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Engine      β”‚ Keyword          β”‚ Score β”‚ Status                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ChatGPT     β”‚ AI art prompts   β”‚  75   β”‚ βœ… Mentioned | πŸ”— Cited | πŸ“ early  β”‚
β”‚ ChatGPT     β”‚ prompt gallery   β”‚  55   β”‚ βœ… Mentioned | ⚠️ No URL | πŸ“ middleβ”‚
β”‚ Perplexity  β”‚ AI art prompts   β”‚  80   β”‚ βœ… Mentioned | πŸ”— Cited | πŸ“ early  β”‚
β”‚ Perplexity  β”‚ prompt gallery   β”‚  30   β”‚ βœ… Mentioned | ⚠️ No URL | πŸ“ late  β”‚
β”‚ Gemini      β”‚ AI art prompts   β”‚  55   β”‚ βœ… Mentioned | πŸ”— Cited | πŸ“ middle β”‚
β”‚ Gemini      β”‚ prompt gallery   β”‚   0   β”‚ ❌ Not mentioned                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Summary: Mentioned in 5/6 queries, Cited in 3/6 queries

πŸ’‘ Suggestions:
  1. Add FAQ schema markup to improve Gemini visibility
  2. Include more direct claims about "prompt gallery" for citation
  3. Add JSON-LD structured data for better AI comprehension

βš”οΈ compare β€” Competitor Comparison

$ geo-analyzer compare https://promptvault.dev https://competitor.com -k "AI art prompts"

Expected output:

βš”οΈ  Competitor Comparison: "AI art prompts"

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Engine      β”‚ promptvault.dev          β”‚ competitor.com           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ChatGPT     β”‚ 🟒 75  Cited, early     β”‚ 🟑 40  Mentioned, late  β”‚
β”‚ Perplexity  β”‚ 🟒 80  Cited, early     β”‚ 🟒 70  Cited, middle    β”‚
β”‚ Gemini      β”‚ 🟑 55  Cited, middle    β”‚ πŸ”΄  0  Not mentioned    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Average     β”‚ πŸ† 70  Grade: B         β”‚    37  Grade: D          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βœ… You lead on 3/3 engines for "AI art prompts"

πŸ“ˆ history β€” Track Visibility Over Time

$ geo-analyzer history https://promptvault.dev -k "AI art prompts" --trend

Expected output:

πŸ“ˆ Visibility History: https://promptvault.dev β€” "AI art prompts"

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Date       β”‚ Score β”‚ Grade β”‚ Trend  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 2026-02-28 β”‚  45   β”‚  C    β”‚   β€”    β”‚
β”‚ 2026-03-01 β”‚  58   β”‚  C    β”‚  ↑ 13  β”‚
β”‚ 2026-03-02 β”‚  62   β”‚  B    β”‚  ↑  4  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Trend: +17 points over 3 scans (↑ improving)
πŸ’‘ Your structured data changes on 03-01 correlated with the biggest jump.

All Commands

# Scan a URL
geo-analyzer scan <url> -k "keyword1, keyword2"

# Use specific engines only
geo-analyzer scan <url> -k "keyword" -e chatgpt,perplexity

# JSON output
geo-analyzer scan <url> -k "keyword" -o json

# Compare two competing URLs
geo-analyzer compare <url1> <url2> -k "keyword1, keyword2"

# View scan history & trends
geo-analyzer history <url>
geo-analyzer history <url> -k "keyword" --trend

# Batch scan: multi-URL Γ— multi-keyword matrix
geo-analyzer batch -u "url1,url2" -k "kw1,kw2"
geo-analyzer batch -f urls.txt -k "kw1,kw2" -o json

# Check which engines are configured
geo-analyzer engines

Architecture

geo_analyzer/
β”œβ”€β”€ cli.py            # Click-based CLI entry point (scan, compare, history, batch, engines)
β”œβ”€β”€ scanner.py        # Core scanning orchestrator β€” dispatches queries to engines
β”œβ”€β”€ scorer.py         # Scoring algorithm: mention + citation + position + accuracy β†’ 0-100
β”œβ”€β”€ reporter.py       # Rich-powered terminal output (tables, colors, grades)
β”œβ”€β”€ advisor.py        # GEO optimization suggestions based on scan results
β”œβ”€β”€ comparator.py     # Side-by-side competitor comparison logic
β”œβ”€β”€ storage.py        # SQLite-based local storage for scan history & trends
β”œβ”€β”€ batch.py          # Multi-URL Γ— multi-keyword batch scanning
β”œβ”€β”€ config.py         # API key management & engine configuration
β”œβ”€β”€ engines/
β”‚   β”œβ”€β”€ base.py       # Abstract base class for engine adapters
β”‚   β”œβ”€β”€ chatgpt.py    # OpenAI ChatGPT adapter (GPT-4o + web browsing)
β”‚   β”œβ”€β”€ perplexity.py # Perplexity API adapter (with source citations)
β”‚   └── gemini.py     # Google Gemini adapter (Gemini Pro)
└── __main__.py       # `python -m geo_analyzer` support

Data flow:

User CLI Input β†’ Scanner β†’ Engine Adapters β†’ Raw AI Responses
                                                    ↓
              Reporter ← Scorer ← Response Analysis (mention/cite/position)
                 ↓            ↓
            Terminal Output   Storage (SQLite) β†’ History & Trends
                              ↓
                          Advisor β†’ Optimization Suggestions

API Keys

Engine Environment Variable Get Key
ChatGPT OPENAI_API_KEY platform.openai.com
Perplexity PERPLEXITY_API_KEY perplexity.ai/settings/api
Gemini GEMINI_API_KEY aistudio.google.com

Scoring

Each query is scored 0-100:

Factor Points Description
Mentioned 30 Is your site mentioned in the AI response?
Cited 25 Is there a direct URL link to your site?
Position 25 Where? Early (25) > Middle (15) > Late (5)
Accuracy 20 How accurately is your site described?

Grades: A (80+) Β· B (60-79) Β· C (40-59) Β· D (20-39) Β· F (<20)

Roadmap

  • CLI skeleton + scoring algorithm
  • ChatGPT, Perplexity, Gemini engine adapters
  • GEO optimization suggestions
  • Competitor comparison (geo-analyzer compare)
  • Historical tracking (geo-analyzer history)
  • Batch scanning (geo-analyzer batch)
  • MCP Server integration
  • Web dashboard

License

MIT

About

Analyze your website's visibility in AI search engines (ChatGPT, Perplexity, Gemini). CLI tool for Generative Engine Optimization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages